chiark / gitweb /
journalctl: print correct timespan in verify
authorMirco Tischler <mt-ml@gmx.de>
Sat, 22 Sep 2012 19:45:31 +0000 (21:45 +0200)
committerLennart Poettering <lennart@poettering.net>
Mon, 24 Sep 2012 12:56:52 +0000 (14:56 +0200)
The old code used a timestamp to print a timespan for unsealed journalfiles,
incorrectly showing things like 2230 days of unsealed entries. Print the timespan
between the first and last entry instead.

src/journal/journalctl.c

index e491c2766230a326f183639a86c2ee0ba5a4fc17..b9be0c6ef72b9cc6322083b781c320450e6986b9 100644 (file)
@@ -710,7 +710,7 @@ static int verify(sd_journal *j) {
                                                  format_timespan(c, sizeof(c), total > to ? total - to : 0));
                                 } else if (total > 0)
                                         log_info("=> No sealing yet, %s of entries not sealed.",
-                                                 format_timespan(c, sizeof(c), total));
+                                                 format_timespan(c, sizeof(c), total - f->header->head_entry_realtime));
                                 else
                                         log_info("=> No sealing yet, no entries in file.");
                         }