Let's pick up the boot ID early if unspecified, in journal_file_append_entry(). This is symmetric to the fact that we already pick up the monotonic timestamp in journal_file_append_entry() if unspecified, and given that the monotonic clock is not too useful without its boot ID it makes a lot of sense to pick them up at the same time. There are two relevant callers of journal_file_append_entry() right now: journald (which leaves the boot ID unspecified) and journal-remote (there are also some tests, but those don't matter too much). The former calls it to store new entries in the journal file, the latter for converting/processing/merging existing ones (where it passes along the original boot ID). This new code hence only is relevant on the former, and using the boot ID of the current system is the right choice for live generated entries. Note that this effectively changes little, since the lower-level function journal_file_append_entry_internal() will copy boot ID stored in the file header into all records if unspecified, and typically that's the one of the local system. But strictly speaking this is not the right thing to do, since we actually might end up appending to journal files from previous boots. (The lower level function is indirectly used by various tests, where the copying-from-header logic kinda makes sense since they are detached from any live messages streaming in from the host after all).
System and Service Manager
Details
Most documentation is available on systemd's web site.
Assorted, older, general information about systemd can be found in the systemd Wiki.
Information about build requirements is provided in the README file.
Consult our NEWS file for information about what's new in the most recent systemd versions.
Please see the Code Map for information about this repository's layout and content.
Please see the Hacking guide for information on how to hack on systemd and test your modifications.
Please see our Contribution Guidelines for more information about filing GitHub Issues and posting GitHub Pull Requests.
When preparing patches for systemd, please follow our Coding Style Guidelines.
If you are looking for support, please contact our mailing list or join our IRC channel.
Stable branches with backported patches are available in the stable repo.
