static int discover_next_boot(
sd_journal *j,
BootId **boot,
- bool advance_older,
- bool read_realtime) {
+ bool advance_older) {
int r;
char match[9+32+1] = "_BOOT_ID=";
if (r < 0)
return r;
- if (read_realtime) {
- r = sd_journal_get_realtime_usec(j, &next_boot->first);
- if (r < 0)
- return r;
- }
+ r = sd_journal_get_realtime_usec(j, &next_boot->first);
+ if (r < 0)
+ return r;
/* Now seek to the last occurrence of this boot ID. */
sd_id128_to_string(next_boot->id, match + 9);
else if (r == 0)
return -ENODATA; /* This shouldn't happen. We just came from this very boot ID. */
- if (read_realtime) {
- r = sd_journal_get_realtime_usec(j, &next_boot->last);
- if (r < 0)
- return r;
- }
+ r = sd_journal_get_realtime_usec(j, &next_boot->last);
+ if (r < 0)
+ return r;
*boot = next_boot;
next_boot = NULL;
for (;;) {
_cleanup_free_ BootId *current = NULL;
- r = discover_next_boot(j, ¤t, advance_older, !query_ref_boot);
+ r = discover_next_boot(j, ¤t, advance_older);
if (r < 0) {
boot_id_free_all(head);
return r;