-static void print_record(struct udevice *udev)
-{
- struct name_entry *name_loop;
-
- printf("P: %s\n", udev->dev->devpath);
- printf("N: %s\n", udev->name);
- list_for_each_entry(name_loop, &udev->symlink_list, node)
- printf("S: %s\n", name_loop->name);
- if (udev->link_priority != 0)
- printf("L: %i\n", udev->link_priority);
- if (udev->partitions != 0)
- printf("A:%u\n", udev->partitions);
- if (udev->ignore_remove)
- printf("R:%u\n", udev->ignore_remove);
- list_for_each_entry(name_loop, &udev->env_list, node)
- printf("E: %s\n", name_loop->name);
-}
-
-static void export_db(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_db = udev_device_init();
- if (udev_db == NULL)
- continue;
- if (udev_db_get_device(udev_db, name_loop->name) == 0)
- print_record(udev_db);
- printf("\n");
- udev_device_cleanup(udev_db);
- }
- name_list_cleanup(&name_list);
-}
-
-static int lookup_device_by_name(struct udevice **udev, const char *name)