summaryrefslogtreecommitdiff
path: root/src/udev/udev-builtin-hwdb.c
diff options
context:
space:
mode:
authorKay Sievers <kay@vrfy.org>2012-10-25 22:58:02 +0200
committerKay Sievers <kay@vrfy.org>2012-10-25 22:58:02 +0200
commit5b4d50efe83851fe84837db795e14b1d64be530b (patch)
tree1b145528361ddcd4804651e4dacaaa4a65c4f37b /src/udev/udev-builtin-hwdb.c
parent3b0a5f2023cee149d2713327c04fc8103136bd91 (diff)
udev: kmod, hwdb - do not fail if databases are not available
Diffstat (limited to 'src/udev/udev-builtin-hwdb.c')
-rw-r--r--src/udev/udev-builtin-hwdb.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/udev/udev-builtin-hwdb.c b/src/udev/udev-builtin-hwdb.c
index 1458795e99..c1a6f5c791 100644
--- a/src/udev/udev-builtin-hwdb.c
+++ b/src/udev/udev-builtin-hwdb.c
@@ -307,6 +307,9 @@ static int builtin_hwdb_init(struct udev *udev)
struct stat st;
const char sig[] = HWDB_SIG;
+ if (trie.f)
+ return 0;
+
trie.f = fopen(SYSCONFDIR "/udev/hwdb.bin", "re");
if (!trie.f)
return -errno;
@@ -361,7 +364,7 @@ static bool builtin_hwdb_validate(struct udev *udev)
struct stat st;
if (!trie.f)
- return true;
+ return false;
if (fstat(fileno(trie.f), &st) < 0)
return true;
if (trie.file_time_usec != ts_usec(&st.st_mtim))