]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
pstore: refuse to run if arguments are specified
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 22 Jul 2019 08:43:19 +0000 (10:43 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 22 Jul 2019 08:43:19 +0000 (10:43 +0200)
(This is why the --help chech passed.)

src/pstore/pstore.c

index 0c4e2f08a33b089696409344474c4596a9540ee1..60519e117e8216fb475ae26e9804b260363edb70 100644 (file)
@@ -361,6 +361,10 @@ static int run(int argc, char *argv[]) {
 
         log_open();
 
+        if (argc > 1)
+                return log_error_errno(SYNTHETIC_ERRNO(EINVAL),
+                                       "This program takes no arguments.");
+
         /* Ignore all parse errors */
         (void) parse_config();