summaryrefslogtreecommitdiff
path: root/udev/lib/libudev-list.c
diff options
context:
space:
mode:
Diffstat (limited to 'udev/lib/libudev-list.c')
-rw-r--r--udev/lib/libudev-list.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/udev/lib/libudev-list.c b/udev/lib/libudev-list.c
index 895c665e40..00e3b7c37d 100644
--- a/udev/lib/libudev-list.c
+++ b/udev/lib/libudev-list.c
@@ -192,6 +192,16 @@ struct udev_list_entry *udev_list_entry_get_next(struct udev_list_entry *list_en
return list_node_to_entry(next);
}
+struct udev_list_entry *udev_list_entry_get_by_name(struct udev_list_entry *list_entry, const char *name)
+{
+ struct udev_list_entry *entry;
+
+ udev_list_entry_foreach(entry, list_entry)
+ if (strcmp(udev_list_entry_get_name(entry), name) == 0)
+ return entry;
+ return NULL;
+}
+
const char *udev_list_entry_get_name(struct udev_list_entry *list_entry)
{
if (list_entry == NULL)