X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=udevinfo.c;h=340496b42b339b707137f65322c51633f23266e4;hb=f01a9ca1a2824e07908457ef01db238b77d21f96;hp=013068541e82eba50ebd62fdd5c479ab8f5b8085;hpb=fc2aa296137017ad748ef2a7fa08bf9de1336272;p=elogind.git diff --git a/udevinfo.c b/udevinfo.c index 013068541..340496b42 100644 --- a/udevinfo.c +++ b/udevinfo.c @@ -30,7 +30,7 @@ #include "libsysfs/sysfs/libsysfs.h" #include "libsysfs/dlist.h" #include "udev.h" -#include "udev_lib.h" +#include "udev_utils.h" #include "udev_version.h" #include "udev_db.h" #include "logging.h" @@ -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 */ @@ -439,7 +439,7 @@ exit: } help: - printf("Usage: [-anpqrdVh]\n" + printf("Usage: udevinfo [-anpqrdVh]\n" " -q TYPE query database for the specified value:\n" " 'name' name of device node\n" " 'symlink' pointing to node\n"