From: Mike Yuan Date: Mon, 29 Apr 2024 08:47:11 +0000 (+0800) Subject: journalctl: also check arg_file_stdin with other journal location X-Git-Tag: v256-rc2~166 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=821bf13b6e7a20ca05bebad2bc435e40a424ca18;p=thirdparty%2Fsystemd.git journalctl: also check arg_file_stdin with other journal location options Prompted by #32491 --- diff --git a/src/journal/journalctl.c b/src/journal/journalctl.c index 8b60e890ee0..f634d33a975 100644 --- a/src/journal/journalctl.c +++ b/src/journal/journalctl.c @@ -942,7 +942,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=.");