+ return 0;
+}
+
+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);
+ list_for_each_entry(name_loop, &udev->env_list, node)
+ printf("E: %s\n", name_loop->name);
+}
+
+static void export_name_devpath(struct udevice *udev) {
+ printf("%s=%s/%s\n", udev->dev->devpath, udev_root, udev->name);
+}
+
+static void export_record(struct udevice *udev) {
+ print_record(udev);
+ printf("\n");
+}
+
+static void export_db(void fnct(struct udevice *udev)) {
+ 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)
+ fnct(udev_db);
+ udev_device_cleanup(udev_db);
+ }
+ name_list_cleanup(&name_list);