summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKay Sievers <kay@vrfy.org>2012-10-25 22:08:33 +0200
committerKay Sievers <kay@vrfy.org>2012-10-25 22:08:33 +0200
commit7ee40fc3e93fa97be28f129dd457de74c58e9de4 (patch)
tree0d783b63793895851ddc9816b57aaab1b676eee1
parent1c574591db5a62aa40aaac02645be1521ea85771 (diff)
udev: hwdb validate() return when the database is not opened
-rw-r--r--src/udev/udev-builtin-hwdb.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/udev/udev-builtin-hwdb.c b/src/udev/udev-builtin-hwdb.c
index 4c3d5aea62..0746698c46 100644
--- a/src/udev/udev-builtin-hwdb.c
+++ b/src/udev/udev-builtin-hwdb.c
@@ -357,6 +357,8 @@ static bool builtin_hwdb_validate(struct udev *udev)
{
struct stat st;
+ if (!trie.f)
+ return true;
if (fstat(fileno(trie.f), &st) < 0)
return true;
if (trie.file_time_usec != ts_usec(&st.st_mtim))