summaryrefslogtreecommitdiff
path: root/src/journal
diff options
context:
space:
mode:
Diffstat (limited to 'src/journal')
-rw-r--r--src/journal/journalctl.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/journal/journalctl.c b/src/journal/journalctl.c
index db11421e7a..69a2013df8 100644
--- a/src/journal/journalctl.c
+++ b/src/journal/journalctl.c
@@ -2091,6 +2091,13 @@ int main(int argc, char *argv[]) {
assert_not_reached("Unknown action");
}
+ if (arg_boot_offset != 0 &&
+ sd_journal_has_runtime_files(j) > 0 &&
+ sd_journal_has_persistent_files(j) == 0) {
+ log_info("Specifying boot ID has no effect, no persistent journal was found");
+ r = 0;
+ goto finish;
+ }
/* add_boot() must be called first!
* It may need to seek the journal to find parent boot IDs. */
r = add_boot(j);