udev: hwdb validate() return when the database is not opened

This commit is contained in:
Kay Sievers 2012-10-25 22:08:33 +02:00
parent 1c574591db
commit 7ee40fc3e9
1 changed files with 2 additions and 0 deletions

View 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))