mirror of
https://github.com/AuxXxilium/eudev.git
synced 2025-03-06 20:59:19 +07:00
[PATCH] Don't try to print major/minor for devices without a dev file.
This commit is contained in:
parent
fc2aa29613
commit
c02ae2fe33
@ -142,7 +142,7 @@ static int print_device_chain(const char *path)
|
||||
|
||||
/* look for the 'dev' file */
|
||||
attr = sysfs_get_classdev_attr(class_dev, "dev");
|
||||
if (attr == NULL)
|
||||
if (attr != NULL)
|
||||
printf("device '%s' has major:minor %s", class_dev->path, attr->value);
|
||||
|
||||
/* open sysfs class device directory and print all attributes */
|
||||
|
Loading…
Reference in New Issue
Block a user