chiark / gitweb /
journalctl: be more friendly when informing about seal verification
[elogind.git] / src / journal / journal-verify.c
index 90739a66c2cde0c2283540764b78fe3a3915c090..24012931d456e6b82ad658206e2b7801d48ad0b6 100644 (file)
@@ -249,7 +249,7 @@ static int contains_uint64(MMapCache *m, int fd, uint64_t n, uint64_t p) {
 
                 c = (a + b) / 2;
 
-                r = mmap_cache_get(m, fd, PROT_READ|PROT_WRITE, 0, c * sizeof(uint64_t), sizeof(uint64_t), (void **) &z);
+                r = mmap_cache_get(m, fd, PROT_READ|PROT_WRITE, 0, false, c * sizeof(uint64_t), sizeof(uint64_t), NULL, (void **) &z);
                 if (r < 0)
                         return r;
 
@@ -261,9 +261,8 @@ static int contains_uint64(MMapCache *m, int fd, uint64_t n, uint64_t p) {
 
                 if (p < *z)
                         b = c;
-                else {
+                else
                         a = c;
-                }
         }
 
         return 0;
@@ -1119,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)