summaryrefslogtreecommitdiff
path: root/src/journal/journal-file.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2012-08-20 16:11:42 +0200
committerLennart Poettering <lennart@poettering.net>2012-08-20 16:11:42 +0200
commit8088cbd3cfcf539c984d8042cd2b92ebbfda6d82 (patch)
tree564b151870105cb540313774907181c1bf85c3b1 /src/journal/journal-file.h
parentf7fab8a5ae7a3b378040203821383f5a8fc91126 (diff)
journal: use a macro to check for file header flags
Diffstat (limited to 'src/journal/journal-file.h')
-rw-r--r--src/journal/journal-file.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/journal/journal-file.h b/src/journal/journal-file.h
index 7358173e7a..5b1530e7a7 100644
--- a/src/journal/journal-file.h
+++ b/src/journal/journal-file.h
@@ -137,6 +137,12 @@ static inline bool VALID_EPOCH(uint64_t u) {
#define JOURNAL_HEADER_CONTAINS(h, field) \
(le64toh((h)->header_size) >= offsetof(Header, field) + sizeof((h)->field))
+#define JOURNAL_HEADER_SEALED(h) \
+ (!!(le32toh((h)->compatible_flags) & HEADER_COMPATIBLE_SEALED))
+
+#define JOURNAL_HEADER_COMPRESSED(h) \
+ (!!(le32toh((h)->incompatible_flags) & HEADER_INCOMPATIBLE_COMPRESSED))
+
int journal_file_move_to_object(JournalFile *f, int type, uint64_t offset, Object **ret);
uint64_t journal_file_entry_n_items(Object *o);