summaryrefslogtreecommitdiff
path: root/udev/lib/libudev-list.c
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@vrfy.org>2008-09-28 17:39:31 +0200
committerKay Sievers <kay.sievers@vrfy.org>2008-09-28 17:39:31 +0200
commitbc8184ede9cff156709fe053e3e02ef309cb2920 (patch)
tree60789acfeb936b123de0c311d5a7236dc9310267 /udev/lib/libudev-list.c
parent41b7a00922bdb1a501cbf2e39282fe64bb94cb6d (diff)
libudev: enumerate - accept list of subsystems to scan, or skip
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)