diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2013-06-05 18:40:44 -0400 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2013-06-10 10:10:07 -0400 |
commit | 2765b7bb6924e2c26c7bf60bd692a4bc121d9582 (patch) | |
tree | aebad181db9c892d3e094a3cdb69e72aeda1f274 /src/journal/journal-file.c | |
parent | 507f22bd0172bff5e5d98145b1419bd472a2c57f (diff) |
journalctl: print proper IDs with --header
The same buffer was used for two different IDs, messing up
the output.
Diffstat (limited to 'src/journal/journal-file.c')
-rw-r--r-- | src/journal/journal-file.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/journal/journal-file.c b/src/journal/journal-file.c index 3cb8f79947..7f855743b8 100644 --- a/src/journal/journal-file.c +++ b/src/journal/journal-file.c @@ -2271,7 +2271,7 @@ fail: } void journal_file_print_header(JournalFile *f) { - char a[33], b[33], c[33]; + char a[33], b[33], c[33], d[33]; char x[FORMAT_TIMESTAMP_MAX], y[FORMAT_TIMESTAMP_MAX]; struct stat st; char bytes[FORMAT_BYTES_MAX]; @@ -2301,7 +2301,7 @@ void journal_file_print_header(JournalFile *f) { sd_id128_to_string(f->header->file_id, a), 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), + sd_id128_to_string(f->header->seqnum_id, d), f->header->state == STATE_OFFLINE ? "OFFLINE" : f->header->state == STATE_ONLINE ? "ONLINE" : f->header->state == STATE_ARCHIVED ? "ARCHIVED" : "UNKNOWN", |