summaryrefslogtreecommitdiff
path: root/udev/lib/test-libudev.c
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@vrfy.org>2008-10-02 11:54:33 +0200
committerKay Sievers <kay.sievers@vrfy.org>2008-10-02 11:54:33 +0200
commit13ddea815496b32bd0ae0a648cdc50af28d69bb1 (patch)
treeb8737fbc7b0afa6d6dd2db474c7380f88497f40d /udev/lib/test-libudev.c
parentd6b148cde2a8ca6dc32af2e1d95824ac3be926db (diff)
libudev: enumerate - add_device() -> add_syspath()
Diffstat (limited to 'udev/lib/test-libudev.c')
-rw-r--r--udev/lib/test-libudev.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/udev/lib/test-libudev.c b/udev/lib/test-libudev.c
index 7291e8c89a..5d19d5dd75 100644
--- a/udev/lib/test-libudev.c
+++ b/udev/lib/test-libudev.c
@@ -73,23 +73,19 @@ static void print_device(struct udev_device *device)
printf("devnum: %u:%u\n", major(devnum), minor(devnum));
count = 0;
- list_entry = udev_device_get_devlinks_list_entry(device);
- while (list_entry != NULL) {
+ udev_list_entry_foreach(list_entry, udev_device_get_devlinks_list_entry(device)) {
printf("link: '%s'\n", udev_list_entry_get_name(list_entry));
count++;
- list_entry = udev_list_entry_get_next(list_entry);
}
if (count > 0)
printf("found %i links\n", count);
count = 0;
- list_entry = udev_device_get_properties_list_entry(device);
- while (list_entry != NULL) {
+ udev_list_entry_foreach(list_entry, udev_device_get_properties_list_entry(device)) {
printf("property: '%s=%s'\n",
udev_list_entry_get_name(list_entry),
udev_list_entry_get_value(list_entry));
count++;
- list_entry = udev_list_entry_get_next(list_entry);
}
if (count > 0)
printf("found %i properties\n", count);