assert(source->importer.iovw.iovec);
- r = writer_write(source->writer, &source->importer.iovw, &source->importer.ts, compress, seal);
+ r = writer_write(source->writer,
+ &source->importer.iovw,
+ &source->importer.ts,
+ &source->importer.boot_id,
+ compress, seal);
if (r == -EBADMSG) {
log_error_errno(r, "Entry is invalid, ignoring.");
r = 0;
int writer_write(Writer *w,
struct iovec_wrapper *iovw,
dual_timestamp *ts,
+ sd_id128_t *boot_id,
bool compress,
bool seal) {
int r;
return r;
}
- r = journal_file_append_entry(w->journal, ts, NULL,
+ r = journal_file_append_entry(w->journal, ts, boot_id,
iovw->iovec, iovw->count,
&w->seqnum, NULL, NULL);
if (r >= 0) {
log_debug("%s: Successfully rotated journal", w->journal->path);
log_debug("Retrying write.");
- r = journal_file_append_entry(w->journal, ts, NULL,
+ r = journal_file_append_entry(w->journal, ts, boot_id,
iovw->iovec, iovw->count,
&w->seqnum, NULL, NULL);
if (r < 0)
int writer_write(Writer *s,
struct iovec_wrapper *iovw,
dual_timestamp *ts,
+ sd_id128_t *boot_id,
bool compress,
bool seal);
o->entry.realtime = htole64(ts->realtime);
o->entry.monotonic = htole64(ts->monotonic);
o->entry.xor_hash = htole64(xor_hash);
- o->entry.boot_id = boot_id ? *boot_id : f->header->boot_id;
+ if (boot_id)
+ f->header->boot_id = *boot_id;
+ o->entry.boot_id = f->header->boot_id;
#if HAVE_GCRYPT
r = journal_file_hmac_put_object(f, OBJECT_ENTRY, o, np);