From df3c049fa52f3c9183ebfdebfc33330025b6793c Mon Sep 17 00:00:00 2001 From: Mike Yuan Date: Tue, 13 May 2025 22:55:15 +0200 Subject: [PATCH] journalctl-show: check Context.has_cursor rather than arg_* --- src/journal/journalctl-show.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/journal/journalctl-show.c b/src/journal/journalctl-show.c index f2b43a7f3e9..20b39da62de 100644 --- a/src/journal/journalctl-show.c +++ b/src/journal/journalctl-show.c @@ -313,7 +313,7 @@ static int on_first_event(sd_event_source *s, void *userdata) { if (r < 0) return r; - if (arg_follow && !arg_reverse && !arg_cursor && !arg_after_cursor && !arg_cursor_file && !arg_since_set) { + if (arg_follow && !arg_reverse && !c->has_cursor && !arg_since_set) { r = sd_journal_get_cursor(c->journal, /* ret_cursor= */ NULL); if (r == -EADDRNOTAVAIL) { /* If we shall operate in --follow mode, and we are unable to get a cursor after -- 2.47.3