projects
/
platform
/
upstream
/
systemd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a505166
)
pstore: refuse to run if arguments are specified
author
Zbigniew Jędrzejewski-Szmek
<zbyszek@in.waw.pl>
Mon, 22 Jul 2019 08:43:19 +0000
(10:43 +0200)
committer
Zbigniew 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
patch
|
blob
|
history
diff --git
a/src/pstore/pstore.c
b/src/pstore/pstore.c
index
0c4e2f0
..
60519e1
100644
(file)
--- a/
src/pstore/pstore.c
+++ b/
src/pstore/pstore.c
@@
-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();