summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2014-03-30 14:20:34 -0400
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2014-07-15 22:23:47 -0400
commitb3306e9c3c1e036396bc6bf74555eecea3f45ad9 (patch)
tree48bbd6e1c897540c633d162c15b7fc7e2fe6c6c4 /src
parentb7e6c03d3bb4e571ad3391862e3f5e4d6bb0cfbb (diff)
journal: allow files with no data whatsoever
If a file was opened for writing, and then closed immediately without actually writing any entries, on subsequent opening, it would be considered "corrupted". This should be totally fine, and even in read mode, an empty file can become non-empty later on.
Diffstat (limited to 'src')
-rw-r--r--src/journal/journal-file.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/src/journal/journal-file.c b/src/journal/journal-file.c
index dc041dd58a..6679ea46d6 100644
--- a/src/journal/journal-file.c
+++ b/src/journal/journal-file.c
@@ -279,12 +279,6 @@ static int journal_file_verify_header(JournalFile *f) {
!VALID64(le64toh(f->header->entry_array_offset)))
return -ENODATA;
- if (le64toh(f->header->data_hash_table_offset) < le64toh(f->header->header_size) ||
- le64toh(f->header->field_hash_table_offset) < le64toh(f->header->header_size) ||
- le64toh(f->header->tail_object_offset) < le64toh(f->header->header_size) ||
- le64toh(f->header->entry_array_offset) < le64toh(f->header->header_size))
- return -ENODATA;
-
if (f->writable) {
uint8_t state;
sd_id128_t machine_id;