summaryrefslogtreecommitdiff
path: root/udev/udevadm-info.c
diff options
context:
space:
mode:
Diffstat (limited to 'udev/udevadm-info.c')
-rw-r--r--udev/udevadm-info.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/udev/udevadm-info.c b/udev/udevadm-info.c
index e470ff624d..0a774b057f 100644
--- a/udev/udevadm-info.c
+++ b/udev/udevadm-info.c
@@ -183,13 +183,14 @@ static int stat_device(const char *name, int export, const char *prefix)
static int export_devices(struct udev *udev)
{
- struct udev_enumerate *enumerate;
+ struct udev_enumerate *udev_enumerate;
struct udev_list_entry *list_entry;
- enumerate = udev_enumerate_new_from_devices(udev, NULL);
- if (enumerate == NULL)
+ udev_enumerate = udev_enumerate_new(udev);
+ if (udev_enumerate == NULL)
return -1;
- udev_list_entry_foreach(list_entry, udev_enumerate_get_list_entry(enumerate)) {
+ udev_enumerate_scan_devices(udev_enumerate, NULL);
+ udev_list_entry_foreach(list_entry, udev_enumerate_get_list_entry(udev_enumerate)) {
struct udev_device *device;
device = udev_device_new_from_syspath(udev, udev_list_entry_get_name(list_entry));
@@ -199,7 +200,7 @@ static int export_devices(struct udev *udev)
udev_device_unref(device);
}
}
- udev_enumerate_unref(enumerate);
+ udev_enumerate_unref(udev_enumerate);
return 0;
}