summaryrefslogtreecommitdiff
path: root/udev/lib/test-libudev.c
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@vrfy.org>2008-12-29 07:42:19 +0100
committerKay Sievers <kay.sievers@vrfy.org>2008-12-29 07:42:19 +0100
commitf089350234e39b868a5e3df71a8f8c036aaae4fd (patch)
tree275b34cfa62c11a1b9f4aaaf1ab81872b9d84982 /udev/lib/test-libudev.c
parent109d114578a785c33fae01af2bea4ea88dda3def (diff)
libudev: enumerate - add lookup by property
Diffstat (limited to 'udev/lib/test-libudev.c')
-rw-r--r--udev/lib/test-libudev.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/udev/lib/test-libudev.c b/udev/lib/test-libudev.c
index 4c3bc16aed..5120626520 100644
--- a/udev/lib/test-libudev.c
+++ b/udev/lib/test-libudev.c
@@ -359,6 +359,15 @@ static int test_enumerate(struct udev *udev, const char *subsystem)
udev_enumerate_scan_subsystems(udev_enumerate);
test_enumerate_print_list(udev_enumerate);
udev_enumerate_unref(udev_enumerate);
+
+ printf("enumerate 'property IF_FS_*=filesystem'\n");
+ udev_enumerate = udev_enumerate_new(udev);
+ if (udev_enumerate == NULL)
+ return -1;
+ udev_enumerate_add_match_property(udev_enumerate, "ID_FS*", "filesystem");
+ udev_enumerate_scan_devices(udev_enumerate);
+ test_enumerate_print_list(udev_enumerate);
+ udev_enumerate_unref(udev_enumerate);
return 0;
}