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)
  • Loading branch information
YHNdnzj authored and keszybz committed May 8, 2024
1 parent c5c40a2 commit 2c1ce9f
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 @@ -1081,7 +1081,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 2c1ce9f

Please sign in to comment.