chiark / gitweb /
[PATCH] Allow GROUP to have modifiers in it
[elogind.git] / udevinfo.c
index 013068541e82eba50ebd62fdd5c479ab8f5b8085..9ba302cbdc2c5e6afda8e0102822efe423a54a2c 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 */
@@ -401,7 +401,7 @@ print:
                        break;
 
                case PATH:
-                       strfieldcpy(result, path);
+                       strfieldcpy(result, udev.devpath);
                        break;
 
                case ALL: