X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=udevinfo.c;h=9ba302cbdc2c5e6afda8e0102822efe423a54a2c;hb=8a0dc204e902a47a5b251c6d4a29eddb8f4a634a;hp=013068541e82eba50ebd62fdd5c479ab8f5b8085;hpb=fc2aa296137017ad748ef2a7fa08bf9de1336272;p=elogind.git diff --git a/udevinfo.c b/udevinfo.c index 013068541..9ba302cbd 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 */ @@ -401,7 +401,7 @@ print: break; case PATH: - strfieldcpy(result, path); + strfieldcpy(result, udev.devpath); break; case ALL: