]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
journalctl: fix --no-tail handling
authorYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 4 May 2023 01:09:37 +0000 (10:09 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Sun, 28 May 2023 05:52:32 +0000 (14:52 +0900)
Fixes a bug introduced by 62f21ec91ad8e7e24079962f4df066b0094fe68d.

src/journal/journalctl.c

index b59791d437a0d433f6ad644fbb93a8ce5cc6c324..35fb2d275fc255b6e1fcb6427bb8419f5e0970f2 100644 (file)
@@ -1047,7 +1047,10 @@ static int parse_argv(int argc, char *argv[]) {
                         assert_not_reached();
                 }
 
-        if (arg_follow && !arg_no_tail && !arg_since_set && arg_lines == ARG_LINES_DEFAULT)
+        if (arg_no_tail)
+                arg_lines = ARG_LINES_ALL;
+
+        if (arg_follow && !arg_since_set && arg_lines == ARG_LINES_DEFAULT)
                 arg_lines = 10;
 
         if (arg_follow && !arg_merge && !arg_boot) {