chiark / gitweb /
more merge fixups
[elogind.git] / udevinfo.c
index 013068541e82eba50ebd62fdd5c479ab8f5b8085..340496b42b339b707137f65322c51633f23266e4 100644 (file)
@@ -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"