summaryrefslogtreecommitdiff
path: root/src/journal
diff options
context:
space:
mode:
Diffstat (limited to 'src/journal')
-rw-r--r--src/journal/journalctl.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/journal/journalctl.c b/src/journal/journalctl.c
index a328ba11b0..0619b256b9 100644
--- a/src/journal/journalctl.c
+++ b/src/journal/journalctl.c
@@ -658,6 +658,11 @@ static int parse_argv(int argc, char *argv[]) {
return -EINVAL;
}
+ if (arg_action != ACTION_SHOW && optind < argc) {
+ log_error("Extraneous arguments starting with '%s'", argv[optind]);
+ return -EINVAL;
+ }
+
return 1;
}