1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-26 03:22:00 +03:00

journalctl: also refuse --cursor-file= with --since=

We already refuse the other two cursor-related options (--cursor= and
--after-cursor=) with --since=, so let's do the same with
--cursor-file=.

Closes: #20523
This commit is contained in:
Frantisek Sumsal 2023-12-18 17:06:43 +01:00
parent c2d5d8c401
commit 159d1e2659

View File

@ -1088,9 +1088,9 @@ static int parse_argv(int argc, char *argv[]) {
return log_error_errno(SYNTHETIC_ERRNO(EINVAL),
"--since= must be before --until=.");
if (!!arg_cursor + !!arg_after_cursor + !!arg_since_set > 1)
if (!!arg_cursor + !!arg_after_cursor + !!arg_cursor_file + !!arg_since_set > 1)
return log_error_errno(SYNTHETIC_ERRNO(EINVAL),
"Please specify only one of --since=, --cursor=, and --after-cursor=.");
"Please specify only one of --since=, --cursor=, --cursor-file=, and --after-cursor=.");
if (arg_follow && arg_reverse)
return log_error_errno(SYNTHETIC_ERRNO(EINVAL),