From: Mike Yuan Date: Tue, 13 May 2025 20:55:15 +0000 (+0200) Subject: journalctl-show: check Context.has_cursor rather than arg_* X-Git-Tag: v258-rc1~627^2~3 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=df3c049fa52f3c9183ebfdebfc33330025b6793c;p=thirdparty%2Fsystemd.git journalctl-show: check Context.has_cursor rather than arg_* --- 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