In discover_next_boot(), first we find a new boot ID based on the value stored in the entry object. Then, find the tail (or head when we are going upwards) entry of the boot based on the _BOOT_ID= field data. If boot IDs of an entry in the entry object and _BOOT_ID field data are inconsistent, which may happen on corrupted journal, then previously discover_next_boot() failed with -ENODATA. This makes the function check if the two boot IDs in each entry are consistent, and skip the entry if not. Fixes the failure of `journalctl -b -1` for 'truncated' journal: https://github.com/systemd/systemd/pull/29334#issuecomment-1736567951
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.
