diff options
author | Anthony G. Basile <blueness@gentoo.org> | 2012-11-23 18:56:16 -0500 |
---|---|---|
committer | Anthony G. Basile <blueness@gentoo.org> | 2012-11-23 18:56:16 -0500 |
commit | 6cb86c3a330caedc323599cb11fbed4138958271 (patch) | |
tree | 6b0f1e44d69ed1d043b23f5f64e9f7e8b9830c07 /src/libudev/libudev-hwdb.c | |
parent | e5cc2b881fd1db175b0d80bcccf21ae70857a532 (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/libudev/libudev-hwdb.c')
-rw-r--r-- | src/libudev/libudev-hwdb.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/libudev/libudev-hwdb.c b/src/libudev/libudev-hwdb.c index 751b34209e..7521942eff 100644 --- a/src/libudev/libudev-hwdb.c +++ b/src/libudev/libudev-hwdb.c @@ -271,30 +271,30 @@ _public_ struct udev_hwdb *udev_hwdb_new(struct udev *udev) { hwdb->refcount = 1; udev_list_init(udev, &hwdb->properties_list, true); - hwdb->f = fopen("/etc/udev/hwdb.bin", "re"); + hwdb->f = fopen(UDEV_HWDB_BIN, "re"); if (!hwdb->f) { - log_debug("error reading /etc/udev/hwdb.bin: %m"); + log_debug("error reading " UDEV_HWDB_BIN ": %m"); udev_hwdb_unref(hwdb); return NULL; } if (fstat(fileno(hwdb->f), &hwdb->st) < 0 || (size_t)hwdb->st.st_size < offsetof(struct trie_header_f, strings_len) + 8) { - log_debug("error reading /etc/udev/hwdb.bin: %m"); + log_debug("error reading " UDEV_HWDB_BIN ": %m"); udev_hwdb_unref(hwdb); return NULL; } hwdb->map = mmap(0, hwdb->st.st_size, PROT_READ, MAP_SHARED, fileno(hwdb->f), 0); if (hwdb->map == MAP_FAILED) { - log_debug("error mapping /etc/udev/hwdb.bin: %m"); + log_debug("error mapping " UDEV_HWDB_BIN ": %m"); udev_hwdb_unref(hwdb); return NULL; } if (memcmp(hwdb->map, sig, sizeof(hwdb->head->signature)) != 0 || (size_t)hwdb->st.st_size != le64toh(hwdb->head->file_size)) { - log_debug("error recognizing the format of /etc/udev/hwdb.bin"); + log_debug("error recognizing the format of " UDEV_HWDB_BIN); udev_hwdb_unref(hwdb); return NULL; } |