chiark / gitweb /
journalctl: be more friendly when informing about seal verification
authorLennart Poettering <lennart@poettering.net>
Tue, 21 Aug 2012 21:03:20 +0000 (23:03 +0200)
committerLennart Poettering <lennart@poettering.net>
Tue, 21 Aug 2012 21:03:20 +0000 (23:03 +0200)
TODO
src/journal/journal-verify.c
src/journal/journalctl.c

diff --git a/TODO b/TODO
index 56e264c..7f53535 100644 (file)
--- a/TODO
+++ b/TODO
@@ -49,6 +49,12 @@ Bugfixes:
 
 Features:
 
+* cleanup ellipsation for log output in journalctl and systemctl status: have a sane way to disable ellipsation, and disable it by default when invoked in less/more
+
+* enforce limits on fds openened by socket units
+
+* proper service failure code for services which hit the restart limit
+
 * explore multiple service instances per listening socket idea
 
 * testing tool for socket activation: some binary that listens on a socket and passes it on using the usual socket activation protocol to some server.
index 9156fd5..2401293 100644 (file)
@@ -1118,7 +1118,7 @@ int journal_file_verify(
         close_nointr_nofail(entry_array_fd);
 
         if (first_validated)
-                *first_validated = last_tag_realtime ? le64toh(f->header->head_entry_realtime) : 0;
+                *first_validated = last_sealed_realtime > 0 ? le64toh(f->header->head_entry_realtime) : 0;
         if (last_validated)
                 *last_validated = last_sealed_realtime;
         if (last_contained)
index 36c3d2b..bee26fd 100644 (file)
@@ -681,11 +681,18 @@ static int verify(sd_journal *j) {
                         char a[FORMAT_TIMESTAMP_MAX], b[FORMAT_TIMESTAMP_MAX], c[FORMAT_TIMESPAN_MAX];
                         log_info("PASS: %s", f->path);
 
-                        if (arg_verify_key && JOURNAL_HEADER_SEALED(f->header))
-                                log_info("=> Validated from %s to %s, %s missing",
-                                         format_timestamp(a, sizeof(a), from),
-                                         format_timestamp(b, sizeof(b), to),
-                                         format_timespan(c, sizeof(c), total > to ? total - to : 0));
+                        if (arg_verify_key && JOURNAL_HEADER_SEALED(f->header)) {
+                                if (from > 0) {
+                                        log_info("=> Validated from %s to %s, final %s entries not sealed.",
+                                                 format_timestamp(a, sizeof(a), from),
+                                                 format_timestamp(b, sizeof(b), to),
+                                                 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));
+                                else
+                                        log_info("=> No sealing yet, no entries in file.");
+                        }
                 }
         }