From: kay.sievers@vrfy.org Date: Fri, 19 Nov 2004 03:03:52 +0000 (+0100) Subject: [PATCH] Don't try to print major/minor for devices without a dev file. X-Git-Tag: 046~1 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c02ae2fe332e871b3132bfbc20ba8db359a71657;p=systemd [PATCH] Don't try to print major/minor for devices without a dev file. --- diff --git a/udevinfo.c b/udevinfo.c index 01306854..901990ed 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 */