X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=udev%2Flib%2Flibudev-device.c;h=a7722b3f6e824319e37153d2ab603042f2cf2167;hp=0cb59212815459924f7319187ff7e5b0d81e9f21;hb=3d7b2831cd661afd7d946791110b6ad5a7156d7f;hpb=34ac42b98d75c401520b9f69ff29b6832b6ab668 diff --git a/udev/lib/libudev-device.c b/udev/lib/libudev-device.c index 0cb592128..a7722b3f6 100644 --- a/udev/lib/libudev-device.c +++ b/udev/lib/libudev-device.c @@ -1059,6 +1059,20 @@ struct udev_list_entry *udev_device_add_property_from_string(struct udev_device return udev_device_add_property(udev_device, name, val); } +const char *udev_device_get_property_value(struct udev_device *udev_device, const char *key) +{ + struct udev_list_entry *list_entry; + + if (udev_device == NULL) + return NULL; + if (key == NULL) + return NULL; + + list_entry = udev_device_get_properties_list_entry(udev_device); + list_entry = udev_list_entry_get_by_name(list_entry, key); + return udev_list_entry_get_value(list_entry); +} + #define ENVP_SIZE 128 #define MONITOR_BUF_SIZE 4096 static int update_envp_monitor_buf(struct udev_device *udev_device)