summaryrefslogtreecommitdiff
path: root/src/journal
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2012-10-13 19:21:07 +0000
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2012-10-13 21:37:42 +0200
commite3ed66c52ede243081a18f7bc99bf6ba3f885b86 (patch)
tree3875c356afd37308c7e986b362b1de35ca34480c /src/journal
parent0ab5c3ed8750734124c7a1f7fb8a7944f71d6e25 (diff)
journalctl: make --follow work again
Stopped working after cfbc22ab 'journalctl: implement --since= and --until for filtering by time'.
Diffstat (limited to 'src/journal')
-rw-r--r--src/journal/journalctl.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/journal/journalctl.c b/src/journal/journalctl.c
index 54ee6d8cc8..58ca8071fc 100644
--- a/src/journal/journalctl.c
+++ b/src/journal/journalctl.c
@@ -917,14 +917,9 @@ int main(int argc, char *argv[]) {
}
for (;;) {
- for (;;) {
+ while (arg_lines == 0 || n_shown < arg_lines) {
int flags;
- if (arg_lines > 0 && n_shown >= arg_lines) {
- r = 0;
- goto finish;
- }
-
if (need_seek) {
r = sd_journal_next(j);
if (r < 0) {