]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/detect-virt/detect-virt.c
resolved: rework parsing of /etc/hosts
[thirdparty/systemd.git] / src / detect-virt / detect-virt.c
index f1259fdcd595e1cd4a23b4d4befc52cd9c155cad..f05f2279b35ef157dcecd1ffa842ed94a3882d0a 100644 (file)
@@ -7,8 +7,8 @@
 
 #include "alloc-util.h"
 #include "main-func.h"
+#include "pretty-print.h"
 #include "string-table.h"
-#include "terminal-util.h"
 #include "util.h"
 #include "virt.h"
 
@@ -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;
 }