X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=src%2Fjournal%2Fjournal-verify.c;h=35c270cb3400df609a5bf25aa5d7f95f77bfac89;hp=b4e8f73c412e4c5d34bb264ee0afc5d97e17e5a4;hb=2eec67acbb00593e414549a7e5b35eb7dd776b1b;hpb=e8c108ca9f11a382742f212f5b42a02536b3d40f diff --git a/src/journal/journal-verify.c b/src/journal/journal-verify.c index b4e8f73c4..35c270cb3 100644 --- a/src/journal/journal-verify.c +++ b/src/journal/journal-verify.c @@ -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; @@ -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); @@ -825,21 +824,21 @@ int journal_file_verify( data_fd = open_tmpfile("/var/tmp", O_RDWR | O_CLOEXEC); if (data_fd < 0) { - log_error("Failed to create data file: %m"); + log_error_errno(errno, "Failed to create data file: %m"); r = -errno; goto fail; } entry_fd = open_tmpfile("/var/tmp", O_RDWR | O_CLOEXEC); if (entry_fd < 0) { - log_error("Failed to create entry file: %m"); + log_error_errno(errno, "Failed to create entry file: %m"); r = -errno; goto fail; } entry_array_fd = open_tmpfile("/var/tmp", O_RDWR | O_CLOEXEC); if (entry_array_fd < 0) { - log_error("Failed to create entry array file: %m"); + log_error_errno(errno, "Failed to create entry array file: %m"); r = -errno; 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;