journalctl-show: check Context.has_cursor rather than arg_*

This commit is contained in:
Mike Yuan
2025-05-13 22:55:15 +02:00
parent 2627c8e79e
commit df3c049fa5
+1 -1
View File
@@ -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