===== udevinfo.c 1.13 vs edited ===== --- 1.13/udevinfo.c Mon Feb 23 20:07:25 2004 +++ edited/udevinfo.c Wed Feb 25 14:44:02 2004 @@ -143,14 +143,12 @@ /* read the 'dev' file for major/minor*/ attr = sysfs_get_classdev_attr(class_dev, "dev"); - if (attr == NULL) { - printf("couldn't get the \"dev\" file\n"); - retval = -1; - goto exit; + if (attr) { + printf("\ndevice '%s' has major:minor %s", class_dev->path, + attr->value); + sysfs_close_attribute(attr); } - printf("\ndevice '%s' has major:minor %s", class_dev->path, attr->value); - sysfs_close_attribute(attr); - + /* open sysfs class device directory and print all attributes */ printf(" looking at class device '%s':\n", class_dev->path); if (print_all_attributes(class_dev->path) != 0) {