From c02ae2fe332e871b3132bfbc20ba8db359a71657 Mon Sep 17 00:00:00 2001 From: "kay.sievers@vrfy.org" Date: Fri, 19 Nov 2004 04:03:52 +0100 Subject: [PATCH] [PATCH] Don't try to print major/minor for devices without a dev file. --- udevinfo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/udevinfo.c b/udevinfo.c index 013068541..901990ede 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 */ -- 2.30.2