]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
Merge pull request #13133 from keszybz/pstore-return-value
authorLennart Poettering <lennart@poettering.net>
Mon, 22 Jul 2019 16:29:52 +0000 (18:29 +0200)
committerGitHub <noreply@github.com>
Mon, 22 Jul 2019 16:29:52 +0000 (18:29 +0200)
pstore: refuse to run if arguments are specified

1  2 
src/pstore/pstore.c

index 4bb1293e15d94decdc1939535c0f67892baba3f4,60519e117e8216fb475ae26e9804b260363edb70..df3efb3c8d1d1f2b113a4f16dede86055f5be0eb
@@@ -357,8 -359,12 +357,12 @@@ static int run(int argc, char *argv[]) 
          _cleanup_(pstore_entries_reset) PStoreList list = {};
          int r;
  
 -        log_open();
 +        log_setup_service();
  
+         if (argc > 1)
+                 return log_error_errno(SYNTHETIC_ERRNO(EINVAL),
+                                        "This program takes no arguments.");
          /* Ignore all parse errors */
          (void) parse_config();