diff options
author | Kay Sievers <kay.sievers@vrfy.org> | 2008-12-29 07:42:19 +0100 |
---|---|---|
committer | Kay Sievers <kay.sievers@vrfy.org> | 2008-12-29 07:42:19 +0100 |
commit | f089350234e39b868a5e3df71a8f8c036aaae4fd (patch) | |
tree | 275b34cfa62c11a1b9f4aaaf1ab81872b9d84982 /udev/lib/test-libudev.c | |
parent | 109d114578a785c33fae01af2bea4ea88dda3def (diff) |
libudev: enumerate - add lookup by property
Diffstat (limited to 'udev/lib/test-libudev.c')
-rw-r--r-- | udev/lib/test-libudev.c | 9 |
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; } |