[systemd-commits] 2 commits - src/journal

Zbigniew Jędrzejewski-Szmek zbyszek at kemper.freedesktop.org
Sat Oct 13 12:38:43 PDT 2012


 src/journal/journal-verify.c |   10 +++++++---
 src/journal/journalctl.c     |    7 +------
 2 files changed, 8 insertions(+), 9 deletions(-)

New commits:
commit e3ed66c52ede243081a18f7bc99bf6ba3f885b86
Author: Zbigniew Jędrzejewski-Szmek <zbyszek at in.waw.pl>
Date:   Sat Oct 13 19:21:07 2012 +0000

    journalctl: make --follow work again
    
    Stopped working after cfbc22ab 'journalctl: implement --since= and
    --until for filtering by time'.

diff --git a/src/journal/journalctl.c b/src/journal/journalctl.c
index 54ee6d8..58ca807 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) {

commit 0ab5c3ed8750734124c7a1f7fb8a7944f71d6e25
Author: Zbigniew Jędrzejewski-Szmek <zbyszek at in.waw.pl>
Date:   Sat Oct 13 17:50:53 2012 +0000

    journal-verify: get rid of an unused variable
    
    When compiling without gcrypt, gcc emits an annoying warning.

diff --git a/src/journal/journal-verify.c b/src/journal/journal-verify.c
index 7d2e5eb..551f04a 100644
--- a/src/journal/journal-verify.c
+++ b/src/journal/journal-verify.c
@@ -670,7 +670,8 @@ int journal_file_verify(
                 bool show_progress) {
         int r;
         Object *o;
-        uint64_t p = 0, last_tag = 0, last_epoch = 0, last_tag_realtime = 0, last_sealed_realtime = 0;
+        uint64_t p = 0, last_epoch = 0, last_tag_realtime = 0, last_sealed_realtime = 0;
+
         uint64_t entry_seqnum = 0, entry_monotonic = 0, entry_realtime = 0;
         sd_id128_t entry_boot_id;
         bool entry_seqnum_set = false, entry_monotonic_set = false, entry_realtime_set = false, found_main_entry_array = false;
@@ -682,7 +683,9 @@ int journal_file_verify(
                 entry_array_path[] = "/var/tmp/journal-entry-array-XXXXXX";
         unsigned i;
         bool found_last;
-
+#ifdef HAVE_GCRYPT
+        uint64_t last_tag = 0;
+#endif
         assert(f);
 
         if (key) {
@@ -981,9 +984,10 @@ int journal_file_verify(
                                 last_tag_realtime = rt;
                                 last_sealed_realtime = entry_realtime;
                         }
-#endif
 
                         last_tag = p + ALIGN64(le64toh(o->object.size));
+#endif
+
                         last_epoch = le64toh(o->tag.epoch);
 
                         n_tags ++;



More information about the systemd-commits mailing list