chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
update TODO
[elogind.git]
/
src
/
journal
/
journal-verify.c
diff --git
a/src/journal/journal-verify.c
b/src/journal/journal-verify.c
index 6c8ca8c268789965e5bc57bd545edeea2b15490e..b03335ef31c98faab8783c28d37d7004d4f6675e 100644
(file)
--- a/
src/journal/journal-verify.c
+++ b/
src/journal/journal-verify.c
@@
-427,7
+427,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
/* 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);
i = 0;
n = le64toh(f->header->n_entries);
@@
-804,7
+804,7
@@
int journal_file_verify(
usec_t last_usec = 0;
int data_fd = -1, entry_fd = -1, entry_array_fd = -1;
unsigned i;
usec_t last_usec = 0;
int data_fd = -1, entry_fd = -1, entry_array_fd = -1;
unsigned i;
- bool found_last;
+ bool found_last
= false
;
#ifdef HAVE_GCRYPT
uint64_t last_tag = 0;
#endif
#ifdef HAVE_GCRYPT
uint64_t last_tag = 0;
#endif
@@
-825,21
+825,21
@@
int journal_file_verify(
data_fd = open_tmpfile("/var/tmp", O_RDWR | O_CLOEXEC);
if (data_fd < 0) {
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) {
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) {
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;
}
r = -errno;
goto fail;
}
@@
-865,7
+865,7
@@
int journal_file_verify(
if (show_progress)
draw_progress(0x7FFF * p / le64toh(f->header->tail_object_offset), &last_usec);
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;
if (r < 0) {
error(p, "invalid object");
goto fail;
@@
-1085,11
+1085,11
@@
int journal_file_verify(
q = last_tag;
while (q <= p) {
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;
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;
if (r < 0)
goto fail;
@@
-1097,7
+1097,7
@@
int journal_file_verify(
}
/* Position might have changed, let's reposition things */
}
/* 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;
if (r < 0)
goto fail;