chiark / gitweb /
hwdb: return false if no property is found
authorKay Sievers <kay@vrfy.org>
Tue, 9 Jul 2013 13:47:11 +0000 (15:47 +0200)
committerKay Sievers <kay@vrfy.org>
Tue, 9 Jul 2013 13:48:36 +0000 (15:48 +0200)
src/udev/udev-builtin-hwdb.c

index 314587f..f1c0ca9 100644 (file)
@@ -178,9 +178,9 @@ static int builtin_hwdb(struct udev_device *dev, int argc, char *argv[], bool te
         } else
                 srcdev = dev;
 
         } else
                 srcdev = dev;
 
-        if (udev_builtin_hwdb_search(dev, srcdev, subsystem, prefix, filter, test) < 0)
-                return EXIT_FAILURE;
-        return EXIT_SUCCESS;
+        if (udev_builtin_hwdb_search(dev, srcdev, subsystem, prefix, filter, test) > 0)
+                return EXIT_SUCCESS;
+        return EXIT_FAILURE;
 }
 
 /* called at udev startup and reload */
 }
 
 /* called at udev startup and reload */