]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
journalctl: also check arg_file_stdin with other journal location
authorMike Yuan <me@yhndnzj.com>
Mon, 29 Apr 2024 08:47:11 +0000 (16:47 +0800)
committerLuca Boccassi <luca.boccassi@gmail.com>
Mon, 29 Apr 2024 12:18:38 +0000 (14:18 +0200)
options

Prompted by #32491

src/journal/journalctl.c

index 8b60e890ee04eb7f3f78a26ed402a94dfbe8d109..f634d33a975bae8987e596a1fd28e983484341c2 100644 (file)
@@ -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=.");