chiark / gitweb /
man,journal: add note about sd_journal_get_cutoff_monotonic_usec return value
[elogind.git] / src / journal / journal-file.c
index d3535d2fadcb2edad6756bc8915c93f76e09473b..6679ea46d6702514e55be367168f6e2cbf6aa522 100644 (file)
@@ -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;
@@ -819,6 +813,7 @@ int journal_file_find_data_object_with_hash(
                         goto next;
 
                 if (o->object.flags & OBJECT_COMPRESSION_MASK) {
+#if defined(HAVE_XZ) || defined(HAVE_LZ4)
                         uint64_t l, rsize;
 
                         l = le64toh(o->object.size);
@@ -843,7 +838,9 @@ int journal_file_find_data_object_with_hash(
 
                                 return 1;
                         }
-
+#else
+                        return -EPROTONOSUPPORT;
+#endif
                 } else if (le64toh(o->object.size) == osize &&
                            memcmp(o->data.payload, data, size) == 0) {
 
@@ -2772,6 +2769,7 @@ int journal_file_copy_entry(JournalFile *from, JournalFile *to, Object *o, uint6
                         return -E2BIG;
 
                 if (o->object.flags & OBJECT_COMPRESSION_MASK) {
+#if defined(HAVE_XZ) || defined(HAVE_LZ4)
                         uint64_t rsize;
 
                         r = decompress_blob(o->object.flags & OBJECT_COMPRESSION_MASK,
@@ -2781,6 +2779,9 @@ int journal_file_copy_entry(JournalFile *from, JournalFile *to, Object *o, uint6
 
                         data = from->compress_buffer;
                         l = rsize;
+#else
+                        return -EPROTONOSUPPORT;
+#endif
                 } else
                         data = o->data.payload;