diff options
author | Chris Morin <cmtm@google.com> | 2019-03-14 11:24:52 -0700 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2019-04-02 10:32:21 +0200 |
commit | 924426a703a6923eedd63d23e6656655805598aa (patch) | |
tree | 72e4095e21e1bfbb6c3dc2e160e19afe86552495 /src/journal-remote/journal-remote-write.h | |
parent | 52cf2b13a091c759ed3d2bcab90e1b054c710704 (diff) | |
download | systemd-924426a703a6923eedd63d23e6656655805598aa.tar.gz |
journal-remote: use source's boot-id
systemd-journal-remote always wrote the boot-id of the device it was running on
to the header of its journal files. When the source had a different boot-id
(because it was generated on a different boot, or a different device), the
boot-ids in the file were inconsistent. The _BOOT_ID field was that of the
source, but the journal file header and each entry object header were that of
the device systemd-journal-remote ran on. This breaks journalctl --list-boots
on any of these files.
Set the boot-id in the header to be that of the source. This also fixes the
entry object headers.
Diffstat (limited to 'src/journal-remote/journal-remote-write.h')
-rw-r--r-- | src/journal-remote/journal-remote-write.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/journal-remote/journal-remote-write.h b/src/journal-remote/journal-remote-write.h index e445859ecf..d42256e673 100644 --- a/src/journal-remote/journal-remote-write.h +++ b/src/journal-remote/journal-remote-write.h @@ -28,6 +28,7 @@ DEFINE_TRIVIAL_CLEANUP_FUNC(Writer*, writer_unref); int writer_write(Writer *s, struct iovec_wrapper *iovw, dual_timestamp *ts, + sd_id128_t *boot_id, bool compress, bool seal); |