journalctl: fix support of --boot=ID±offset format
authorYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 26 Apr 2024 02:27:12 +0000 (11:27 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 10 May 2024 02:43:57 +0000 (11:43 +0900)
commita4675155190d7c17dc0fa6be9134837f32ad519a
tree27169eeebe14376786f18f0dcca8a8657ec401b4
parent87dfaba7e9d20d2e94cebc0a3f9fcb807d5473f5
journalctl: fix support of --boot=ID±offset format

Fixes a regression introduced by e44f06065bf20e8d0e4adacff61350ebd36f299e.

After the offending commit, if a boot ID suffixed with an offset is
specified to --boot=, the boot ID was ignored.
This fixes the issue.

To fix the issue, this merges journal_find_boot_by_id() and
journal_find_boot_by_offset().
src/journal/journalctl-util.c
src/libsystemd/sd-journal/test-journal-interleaving.c
src/shared/logs-show.c
src/shared/logs-show.h