-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
journalctl -r -n flags incorrectly processed #1596
Comments
This still applies to version |
I can confirm this bug in |
@timo-schluessler Could you submit your patch as a pull request? |
Sorry for my late reply. Please find the pull request at #14552. |
systemd#1596) (cherry picked from commit 23b3921) (cherry picked from commit d8fd387)
systemd#1596) (cherry picked from commit 23b3921)
I'm running version
208
- unfortunately I can't install the latest version but the issues seems to be present in themaster
as well as of writing.Consider the following log entries:
Issuing
journalctl -n 2
properly shows this:However issuing
journalctl -r -n 2
shows this:This is because in journalctl.c line 2087 skips journal by
arg_lines
but doesn't take into accountarg_reverse
. Consequently on line 2153 the journal is read fromarg_lines
backwards which ultimately skips firstarg_lines
lines.The expected output of
journalctl -r -n 2
is:The text was updated successfully, but these errors were encountered: