summaryrefslogtreecommitdiff
path: root/udevinfo.c
diff options
context:
space:
mode:
authorkay.sievers@vrfy.org <kay.sievers@vrfy.org>2004-11-19 04:03:52 +0100
committerGreg KH <gregkh@suse.de>2005-04-26 22:30:27 -0700
commitc02ae2fe332e871b3132bfbc20ba8db359a71657 (patch)
treeedd0617ce094d30ac3a36d71f80e06b725b53acb /udevinfo.c
parentfc2aa296137017ad748ef2a7fa08bf9de1336272 (diff)
[PATCH] Don't try to print major/minor for devices without a dev file.
Diffstat (limited to 'udevinfo.c')
-rw-r--r--udevinfo.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/udevinfo.c b/udevinfo.c
index 013068541e..901990ede6 100644
--- a/udevinfo.c
+++ b/udevinfo.c
@@ -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 */