summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2012-07-17 00:52:43 +0200
committerLennart Poettering <lennart@poettering.net>2012-07-17 00:59:03 +0200
commitdc36ac673356534b8b32c31e1892e55b8f891381 (patch)
tree97c49e4911d8a7a221d52f9c43c4cd6f56204bf7
parent4a92baf3fa97c73f04438b5814db58783f920b32 (diff)
journalctl: decode more header files in --header
-rw-r--r--src/journal/journal-file.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/journal/journal-file.c b/src/journal/journal-file.c
index 04564d989e..180b43a9c5 100644
--- a/src/journal/journal-file.c
+++ b/src/journal/journal-file.c
@@ -1904,6 +1904,9 @@ void journal_file_print_header(JournalFile *f) {
"Machine ID: %s\n"
"Boot ID: %s\n"
"Sequential Number ID: %s\n"
+ "State: %s\n"
+ "Compatible Flags:%s%s\n"
+ "Incompatible Flags:%s%s\n"
"Header size: %llu\n"
"Arena size: %llu\n"
"Data Hash Table Size: %llu\n"
@@ -1920,6 +1923,13 @@ void journal_file_print_header(JournalFile *f) {
sd_id128_to_string(f->header->machine_id, b),
sd_id128_to_string(f->header->boot_id, c),
sd_id128_to_string(f->header->seqnum_id, c),
+ f->header->state == STATE_OFFLINE ? "offline" :
+ f->header->state == STATE_ONLINE ? "online" :
+ f->header->state == STATE_ARCHIVED ? "archived" : "unknown",
+ (f->header->compatible_flags & HEADER_COMPATIBLE_SIGNED) ? " SIGNED" : "",
+ (f->header->compatible_flags & ~HEADER_COMPATIBLE_SIGNED) ? " ???" : "",
+ (f->header->incompatible_flags & HEADER_INCOMPATIBLE_COMPRESSED) ? " COMPRESSED" : "",
+ (f->header->incompatible_flags & ~HEADER_INCOMPATIBLE_COMPRESSED) ? " ???" : "",
(unsigned long long) le64toh(f->header->header_size),
(unsigned long long) le64toh(f->header->arena_size),
(unsigned long long) le64toh(f->header->data_hash_table_size) / sizeof(HashItem),