chiark / gitweb /
Remove src/bootchart
[elogind.git] / src / journal / journal-verify.c
index 7e3c974b331124913b0295858b216997690f8b91..146c10b4d4002499e90c7edbdbd5e55aac545e33 100644 (file)
@@ -32,7 +32,6 @@
 #include "journal-verify.h"
 #include "lookup3.h"
 #include "compress.h"
-#include "fsprg.h"
 
 static void draw_progress(uint64_t p, usec_t *last_usec) {
         unsigned n, i, j, k;
@@ -368,7 +367,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, false, c * sizeof(uint64_t), sizeof(uint64_t), NULL, (void **) &z, NULL);
+                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;
 
@@ -427,7 +426,7 @@ static int entry_points_to_data(
 
         /* Check if this entry is also in main entry array. Since the
          * main entry array has already been verified we can rely on
-         * its consistency.*/
+         * its consistency. */
 
         i = 0;
         n = le64toh(f->header->n_entries);
@@ -818,7 +817,7 @@ int journal_file_verify(
                         return r;
                 }
 #else
-                return -ENOTSUP;
+                return -EOPNOTSUPP;
 #endif
         } else if (f->seal)
                 return -ENOKEY;
@@ -846,7 +845,7 @@ int journal_file_verify(
 
         if (le32toh(f->header->compatible_flags) & ~HEADER_COMPATIBLE_SUPPORTED) {
                 log_error("Cannot verify file with unknown extensions.");
-                r = -ENOTSUP;
+                r = -EOPNOTSUPP;
                 goto fail;
         }
 
@@ -865,7 +864,7 @@ int journal_file_verify(
                 if (show_progress)
                         draw_progress(0x7FFF * p / le64toh(f->header->tail_object_offset), &last_usec);
 
-                r = journal_file_move_to_object(f, -1, p, &o);
+                r = journal_file_move_to_object(f, OBJECT_UNUSED, p, &o);
                 if (r < 0) {
                         error(p, "invalid object");
                         goto fail;
@@ -1085,11 +1084,11 @@ int journal_file_verify(
                                         q = last_tag;
 
                                 while (q <= p) {
-                                        r = journal_file_move_to_object(f, -1, q, &o);
+                                        r = journal_file_move_to_object(f, OBJECT_UNUSED, q, &o);
                                         if (r < 0)
                                                 goto fail;
 
-                                        r = journal_file_hmac_put_object(f, -1, o, q);
+                                        r = journal_file_hmac_put_object(f, OBJECT_UNUSED, o, q);
                                         if (r < 0)
                                                 goto fail;
 
@@ -1097,7 +1096,7 @@ int journal_file_verify(
                                 }
 
                                 /* Position might have changed, let's reposition things */
-                                r = journal_file_move_to_object(f, -1, p, &o);
+                                r = journal_file_move_to_object(f, OBJECT_UNUSED, p, &o);
                                 if (r < 0)
                                         goto fail;