chiark / gitweb /
virt: move caching of virtualization check results into detect_vm() and detect_contai...
[elogind.git] / src / detect-virt / detect-virt.c
index 8b8fc45ea0d61f4ad7d5076788f7adc199fe47a9..72ff2a858542efe55ecf40c33ae69c530c3c0404 100644 (file)
@@ -61,7 +61,7 @@ static int parse_argv(int argc, char *argv[]) {
                 { "version",   no_argument,       NULL, ARG_VERSION   },
                 { "container", no_argument,       NULL, 'c'           },
                 { "vm",        optional_argument, NULL, 'v'           },
-                { "quiet",     required_argument, NULL, 'q'           },
+                { "quiet",     no_argument,       NULL, 'q'           },
                 { NULL,        0,                 NULL, 0             }
         };
 
@@ -80,7 +80,6 @@ static int parse_argv(int argc, char *argv[]) {
 
                 case ARG_VERSION:
                         puts(PACKAGE_STRING);
-                        puts(DISTRIBUTION);
                         puts(SYSTEMD_FEATURES);
                         return 0;
 
@@ -115,8 +114,8 @@ static int parse_argv(int argc, char *argv[]) {
 
 int main(int argc, char *argv[]) {
         const char *id = NULL;
-        int r;
         int retval = EXIT_SUCCESS;
+        int r;
 
         /* This is mostly intended to be used for scripts which want
          * to detect whether we are being run in a virtualized