]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/detect-virt/detect-virt.c
Merge pull request #16106 from yuwata/network-tc-ets
[thirdparty/systemd.git] / src / detect-virt / detect-virt.c
index 1812218dafb70c346c8f9955059eede0d93ab3a4..4f38de8e29fb8315bcae96c45222e9c7402441d6 100644 (file)
@@ -113,10 +113,10 @@ static int parse_argv(int argc, char *argv[]) {
                         assert_not_reached("Unhandled option");
                 }
 
-        if (optind < argc) {
-                log_error("%s takes no arguments.", program_invocation_short_name);
-                return -EINVAL;
-        }
+        if (optind < argc)
+                return log_error_errno(SYNTHETIC_ERRNO(EINVAL),
+                                       "%s takes no arguments.",
+                                       program_invocation_short_name);
 
         return 1;
 }
@@ -128,8 +128,7 @@ static int run(int argc, char *argv[]) {
          * to detect whether we are being run in a virtualized
          * environment or not */
 
-        log_parse_environment();
-        log_open();
+        log_setup_cli();
 
         r = parse_argv(argc, argv);
         if (r <= 0)