Skip to content

Commit

Permalink
journalctl: also check arg_file_stdin with other journal location
Browse files Browse the repository at this point in the history
options

Prompted by #32491

(cherry picked from commit 821bf13)
(cherry picked from commit 2c1ce9f)
  • Loading branch information
YHNdnzj authored and bluca committed May 9, 2024
1 parent 2b822b9 commit a32da72
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/journal/journalctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1063,7 +1063,7 @@ static int parse_argv(int argc, char *argv[]) {
arg_boot_offset = 0;
}

if (!!arg_directory + !!arg_file + !!arg_machine + !!arg_root + !!arg_image > 1)
if (!!arg_directory + !!arg_file + arg_file_stdin + !!arg_machine + !!arg_root + !!arg_image > 1)
return log_error_errno(SYNTHETIC_ERRNO(EINVAL),
"Please specify at most one of -D/--directory=, --file=, -M/--machine=, --root=, --image=.");

Expand Down

0 comments on commit a32da72

Please sign in to comment.