From e3ed66c52ede243081a18f7bc99bf6ba3f885b86 Mon Sep 17 00:00:00 2001 From: Zbigniew Jędrzejewski-Szmek Date: Sat, 13 Oct 2012 19:21:07 +0000 Subject: journalctl: make --follow work again Stopped working after cfbc22ab 'journalctl: implement --since= and --until for filtering by time'. --- src/journal/journalctl.c | 7 +------ 1 file changed, 1 insertion(+), 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) { -- cgit v1.2.3-54-g00ecf