chiark / gitweb /
journalctl: make --follow work again
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sat, 13 Oct 2012 19:21:07 +0000 (19:21 +0000)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sat, 13 Oct 2012 19:37:42 +0000 (21:37 +0200)
Stopped working after cfbc22ab 'journalctl: implement --since= and
--until for filtering by time'.

src/journal/journalctl.c

index 54ee6d8..58ca807 100644 (file)
@@ -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) {