chiark / gitweb /
udevmonitor: add switch for kernel and udev events
[elogind.git] / udevinfo.c
index 2832ea0ee368677ca7325384bb7655108c7fd980..3f47add87cd6f7197ec2d81dc5603bbf56564d3a 100644 (file)
@@ -190,7 +190,7 @@ int main(int argc, char *argv[], char *envp[])
                { "attribute-walk", 0, NULL, 'a' },
                { "export-db", 0, NULL, 'e' },
                { "root", 0, NULL, 'r' },
-               { "version", 0, NULL, 'V' },
+               { "version", 0, NULL, 1 }, /* -V outputs braindead format */
                { "help", 0, NULL, 'h' },
                {}
        };
@@ -290,6 +290,9 @@ int main(int argc, char *argv[], char *envp[])
                case 'e':
                        export_db(export_record);
                        goto exit;
+               case 1:
+                       printf("%s\n", UDEV_VERSION);
+                       goto exit;
                case 'V':
                        printf("udevinfo, version %s\n", UDEV_VERSION);
                        goto exit;
@@ -308,7 +311,6 @@ int main(int argc, char *argv[], char *envp[])
                               "  --root            prepend to query result or print udev_root\n"
                               "  --attribute-walk  print all SYSFS_attributes along the device chain\n"
                               "  --export-db       export the content of the udev database\n"
-                              "  --verision        print udev version\n"
                               "  --help            print this text\n"
                               "\n");
                        goto exit;