From ee623f0d0c04a9c8da4953ddc29862c8c4945458 Mon Sep 17 00:00:00 2001 From: Zbigniew Jędrzejewski-Szmek Date: Fri, 16 Nov 2012 23:10:13 +0100 Subject: hwdb: use $(localstatedir)/lib/udev/hwdb.bin for the binary database It's not configuration, so it doesn't belong in udev. Also, remove the catalog when uninstalling udev. --- src/libudev/libudev-hwdb.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/libudev') diff --git a/src/libudev/libudev-hwdb.c b/src/libudev/libudev-hwdb.c index 6779e45b4e..12c8214ec5 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(HWDB_BIN, "re"); if (!hwdb->f) { - log_debug("error reading /etc/udev/hwdb.bin: %m"); + log_debug("error reading %s: %m", HWDB_BIN); 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 %s: %m", HWDB_BIN); 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 %s: %m", HWDB_BIN); 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 %s", HWDB_BIN); udev_hwdb_unref(hwdb); return NULL; } -- cgit v1.2.3