chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
libudev: rework list handling
[elogind.git]
/
udev
/
lib
/
test-libudev.c
diff --git
a/udev/lib/test-libudev.c
b/udev/lib/test-libudev.c
index 19968a1738e71fc1b918c3123eaea2a9d13f96c4..f361ab12a4b1d6fa3a9f09606f19fc227dc7de16 100644
(file)
--- a/
udev/lib/test-libudev.c
+++ b/
udev/lib/test-libudev.c
@@
-63,18
+63,18
@@
static void print_device(struct udev_device *device)
count = 0;
list = udev_device_get_devlinks_list(device);
while (list != NULL) {
count = 0;
list = udev_device_get_devlinks_list(device);
while (list != NULL) {
- printf("link: '%s'\n", udev_list_get_name(list));
+ printf("link: '%s'\n", udev_list_
entry_
get_name(list));
count++;
count++;
- list = udev_list_get_next(list);
+ list = udev_list_
entry_
get_next(list);
}
printf("found %i links\n", count);
count = 0;
list = udev_device_get_properties_list(device);
while (list != NULL) {
}
printf("found %i links\n", count);
count = 0;
list = udev_device_get_properties_list(device);
while (list != NULL) {
- printf("property: '%s=%s'\n", udev_list_
get_name(list), udev_list
_get_value(list));
+ printf("property: '%s=%s'\n", udev_list_
entry_get_name(list), udev_list_entry
_get_value(list));
count++;
count++;
- list = udev_list_get_next(list);
+ list = udev_list_
entry_
get_next(list);
}
printf("found %i properties\n", count);
}
printf("found %i properties\n", count);
@@
-154,7
+154,7
@@
static int test_enumerate(struct udev *udev, const char *subsystem)
while (list != NULL) {
struct udev_device *device;
while (list != NULL) {
struct udev_device *device;
- device = udev_device_new_from_syspath(udev, udev_list_get_name(list));
+ device = udev_device_new_from_syspath(udev, udev_list_
entry_
get_name(list));
if (device != NULL) {
printf("device: '%s' (%s) '%s'\n",
udev_device_get_syspath(device),
if (device != NULL) {
printf("device: '%s' (%s) '%s'\n",
udev_device_get_syspath(device),
@@
-163,7
+163,7
@@
static int test_enumerate(struct udev *udev, const char *subsystem)
udev_device_unref(device);
count++;
}
udev_device_unref(device);
count++;
}
- list = udev_list_get_next(list);
+ list = udev_list_
entry_
get_next(list);
}
udev_enumerate_unref(enumerate);
printf("found %i devices\n\n", count);
}
udev_enumerate_unref(enumerate);
printf("found %i devices\n\n", count);