chiark / gitweb /
[PATCH] Don't try to print major/minor for devices without a dev file.
authorkay.sievers@vrfy.org <kay.sievers@vrfy.org>
Fri, 19 Nov 2004 03:03:52 +0000 (04:03 +0100)
committerGreg KH <gregkh@suse.de>
Wed, 27 Apr 2005 05:30:27 +0000 (22:30 -0700)
udevinfo.c

index 013068541e82eba50ebd62fdd5c479ab8f5b8085..901990ede6ca52527ac0e895e429317a0d5b83c1 100644 (file)
@@ -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 */