summaryrefslogtreecommitdiff
path: root/src/udev/udevadm-hwdb.c
diff options
context:
space:
mode:
authorAnthony G. Basile <blueness@gentoo.org>2012-11-23 18:56:16 -0500
committerAnthony G. Basile <blueness@gentoo.org>2012-11-23 18:56:16 -0500
commit6cb86c3a330caedc323599cb11fbed4138958271 (patch)
tree6b0f1e44d69ed1d043b23f5f64e9f7e8b9830c07 /src/udev/udevadm-hwdb.c
parente5cc2b881fd1db175b0d80bcccf21ae70857a532 (diff)
Propagation of configured installation paths to Makefile.am and .c code
This commit is a continuation of the previous one in which all the configured paths obtained in configure.ac are propagated to the Makefile.am and .c files via AM_CPPFLAGS of the form -DUDEV_CONF_FILE=\"$(udevconffile)\". This should address the issue in https://github.com/gentoo/eudev/issues/17 Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Diffstat (limited to 'src/udev/udevadm-hwdb.c')
-rw-r--r--src/udev/udevadm-hwdb.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/udev/udevadm-hwdb.c b/src/udev/udevadm-hwdb.c
index e545689f3d..279e9255f0 100644
--- a/src/udev/udevadm-hwdb.c
+++ b/src/udev/udevadm-hwdb.c
@@ -35,8 +35,8 @@
*/
static const char * const conf_file_dirs[] = {
- "/etc/udev/hwdb.d",
- UDEVLIBEXECDIR "/hwdb.d",
+ UDEV_HWDB_DIR,
+ UDEV_LIBEXEC_DIR "/hwdb.d",
NULL
};
@@ -570,10 +570,11 @@ static int adm_hwdb(struct udev *udev, int argc, char *argv[]) {
log_debug("strings dedup'ed: %8zu bytes (%8zu)\n",
trie->strings->dedup_len, trie->strings->dedup_count);
- mkdir_parents("/etc/udev/hwdb.bin", 0755);
- err = trie_store(trie, "/etc/udev/hwdb.bin");
+ mkdir_parents(UDEV_HWDB_BIN, 0755);
+ err = trie_store(trie, UDEV_HWDB_BIN);
if (err < 0) {
- log_error("Failure writing hardware database '%s': %s", "/etc/udev/hwdb.bin", strerror(-err));
+ log_error("Failure writing hardware database '%s': %s",
+ UDEV_HWDB_BIN, strerror(-err));
rc = EXIT_FAILURE;
}
}