- attr_list = sysfs_get_classdev_attributes(class_dev);
- if (attr_list == NULL) {
- printf("couldn't open class device directory\n");
- retval = -1;
- goto exit;
- }
- print_all_attributes(attr_list);
-
- /* get the device link (if parent exists look here) */
- class_dev_parent = sysfs_get_classdev_parent(class_dev);
- if (class_dev_parent != NULL)
- sysfs_dev = sysfs_get_classdev_device(class_dev_parent);
- else
- sysfs_dev = sysfs_get_classdev_device(class_dev);
-
- if (sysfs_dev != NULL)
- printf("follow the class device's \"device\"\n");
-
- /* look the device chain upwards */
- while (sysfs_dev != NULL) {
- attr_list = sysfs_get_device_attributes(sysfs_dev);
- if (attr_list == NULL) {
- printf("couldn't open device directory\n");
- retval = -1;
- goto exit;
- }
+static void export_name_devpath(struct udevice *udev) {
+ printf("%s=%s/%s\n", udev->dev->devpath, udev_root, udev->name);
+}