-static int print_dump(const char *devpath, const char *name) {
- printf("%s=%s/%s\n", devpath, udev_root, name);
- return 0;
+static void dump_names(void) {
+ LIST_HEAD(name_list);
+ struct name_entry *name_loop;
+
+ udev_db_get_all_entries(&name_list);
+ list_for_each_entry(name_loop, &name_list, node) {
+ struct udevice udev_db;
+
+ udev_init_device(&udev_db, NULL, NULL, NULL);
+ if (udev_db_get_device(&udev_db, name_loop->name) == 0)
+ printf("%s=%s/%s\n", udev_db.devpath, udev_root, udev_db.name);
+ udev_cleanup_device(&udev_db);
+ }
+ name_list_cleanup(&name_list);