]> git.ipfire.org Git - thirdparty/systemd.git/commit
journalctl: fix output when --since is used with --lines 26669/head
authorMike Yuan <me@yhndnzj.com>
Sat, 4 Mar 2023 11:38:35 +0000 (19:38 +0800)
committerMike Yuan <me@yhndnzj.com>
Sun, 5 Mar 2023 11:37:04 +0000 (19:37 +0800)
commitf58269510727964cb5c10e7d2f9849c442ea1f80
tree516a59d6032276d86ef6298eb717973298006a11
parent81fb5375b3b3bfc22d023d7908ad9eee4b3c1ffb
journalctl: fix output when --since is used with --lines

Before this commit, if --since is used with --lines=N,
we seek to the place of --since and search afterwards
there, resulting in outputing the first N lines.

After this commit, we only do the above if --since is used without
--reverse and --lines. Otherwise we seek to the tail first and check
if the entry is within the range of --since later.
src/journal/journalctl.c