diff options
author | Lennart Poettering <lennart@poettering.net> | 2012-09-24 15:02:43 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2012-09-24 15:02:43 +0200 |
commit | 2a7b539a82a45202c0e990c45da25ccdc487d633 (patch) | |
tree | 8d651025b2475a61ce68a1f3c654088883b3ae04 /src/journal/journalctl.c | |
parent | 73726ac8983f46f9a39ad76c395e86d9bbfb470c (diff) |
journald: always pass first entry timestamp back from journal_file_verify()
Diffstat (limited to 'src/journal/journalctl.c')
-rw-r--r-- | src/journal/journalctl.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/journal/journalctl.c b/src/journal/journalctl.c index b9be0c6ef7..62bdcb7c68 100644 --- a/src/journal/journalctl.c +++ b/src/journal/journalctl.c @@ -684,14 +684,14 @@ static int verify(sd_journal *j) { HASHMAP_FOREACH(f, j->files, i) { int k; - usec_t from, to, total; + usec_t first, validated, last; #ifdef HAVE_GCRYPT if (!arg_verify_key && JOURNAL_HEADER_SEALED(f->header)) log_notice("Journal file %s has sealing enabled but verification key has not been passed using --verify-key=.", f->path); #endif - k = journal_file_verify(f, arg_verify_key, &from, &to, &total, true); + k = journal_file_verify(f, arg_verify_key, &first, &validated, &last, true); if (k == -EINVAL) { /* If the key was invalid give up right-away. */ return k; @@ -703,14 +703,14 @@ static int verify(sd_journal *j) { log_info("PASS: %s", f->path); if (arg_verify_key && JOURNAL_HEADER_SEALED(f->header)) { - if (from > 0) { + if (validated > 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) + format_timestamp(a, sizeof(a), first), + format_timestamp(b, sizeof(b), validated), + format_timespan(c, sizeof(c), last > validated ? last - validated : 0)); + } else if (last > 0) log_info("=> No sealing yet, %s of entries not sealed.", - format_timespan(c, sizeof(c), total - f->header->head_entry_realtime)); + format_timespan(c, sizeof(c), last - first)); else log_info("=> No sealing yet, no entries in file."); } |