diff options
author | Kay Sievers <kay.sievers@vrfy.org> | 2008-09-29 02:00:17 +0200 |
---|---|---|
committer | Kay Sievers <kay.sievers@vrfy.org> | 2008-09-29 02:00:17 +0200 |
commit | 438d4c3cd4b89381348f84ef9f8b8937814f8362 (patch) | |
tree | a7490a6be8c149fb785b80b817de2295dce9ccac /udev/udevadm-info.c | |
parent | b03e89cfbaa1fdd0c32bbd54f2b450e17014b522 (diff) |
libudev: enumerate - split new() and scan()
Diffstat (limited to 'udev/udevadm-info.c')
-rw-r--r-- | udev/udevadm-info.c | 11 |
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; } |