]> err.no Git - systemd/commitdiff
libudev: device - export udev_device_has_tag()
authorKay Sievers <kay.sievers@vrfy.org>
Wed, 6 Jul 2011 15:01:11 +0000 (17:01 +0200)
committerKay Sievers <kay.sievers@vrfy.org>
Wed, 6 Jul 2011 15:01:11 +0000 (17:01 +0200)
Makefile.am
libudev/libudev-device.c

index 0ca351c82d8d81d7f654c3dc30ac3b0150e0529b..37840c34b984da853c7412f4bb4820e9a4c028bb 100644 (file)
@@ -41,9 +41,9 @@ dist_libexec_SCRIPTS =
 # ------------------------------------------------------------------------------
 # libudev
 # ------------------------------------------------------------------------------
-LIBUDEV_CURRENT=11
-LIBUDEV_REVISION=6
-LIBUDEV_AGE=11
+LIBUDEV_CURRENT=12
+LIBUDEV_REVISION=0
+LIBUDEV_AGE=12
 
 SUBDIRS += libudev/docs
 
index 1ac0760f9e1b9825810c58e6760165320973649f..1d4cb704c29794eb531404653102322663a6939d 100644 (file)
@@ -1646,17 +1646,18 @@ UDEV_EXPORT struct udev_list_entry *udev_device_get_tags_list_entry(struct udev_
        return udev_list_get_entry(&udev_device->tags_list);
 }
 
-int udev_device_has_tag(struct udev_device *udev_device, const char *tag)
+UDEV_EXPORT int udev_device_has_tag(struct udev_device *udev_device, const char *tag)
 {
        struct udev_list_entry *list_entry;
 
+       if (udev_device == NULL)
+               return NULL;
        if (!udev_device->info_loaded)
                udev_device_read_db(udev_device, NULL);
        list_entry = udev_device_get_tags_list_entry(udev_device);
-       list_entry =  udev_list_entry_get_by_name(list_entry, tag);
-       if (list_entry != NULL)
-               return 1;
-       return 0;
+       if (udev_list_entry_get_by_name(list_entry, tag) != NULL)
+               return true;
+       return false;
 }
 
 #define ENVP_SIZE                      128