chiark / gitweb /
udev: hwdb validate() return when the database is not opened
authorKay Sievers <kay@vrfy.org>
Thu, 25 Oct 2012 20:08:33 +0000 (22:08 +0200)
committerKay Sievers <kay@vrfy.org>
Thu, 25 Oct 2012 20:08:33 +0000 (22:08 +0200)
src/udev/udev-builtin-hwdb.c

index 4c3d5aea62d481b2424cc67573f8409f6dca034e..0746698c46177d82256f4faa2d4d5dd52a7dcf5c 100644 (file)
@@ -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))