chiark / gitweb /
udev: hwdb validate() return when the database is not opened
[elogind.git] / 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))