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 4c3d5ae..0746698 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))