-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Closed
Labels
bug 🐛Programming errors, that need preferential fixingProgramming errors, that need preferential fixingjournal
Description
I'm running version 208 - unfortunately I can't install the latest version but the issues seems to be present in the master as well as of writing.
journalctl --version
systemd 208
+PAM +LIBWRAP +AUDIT +SELINUX +IMA +SYSVINIT +LIBCRYPTSETUP +GCRYPT +ACL +XZ
Consider the following log entries:
2015-01-01 log1
2015-02-02 log2
2015-03-03 log3
2015-04-04 log4
Issuing journalctl -n 2 properly shows this:
2015-03-03 log3
2015-04-04 log4
However issuing journalctl -r -n 2 shows this:
2015-02-02 log2
2015-01-01 log1
This is because in journalctl.c line 2087 skips journal by arg_lines but doesn't take into account arg_reverse. Consequently on line 2153 the journal is read from arg_lines backwards which ultimately skips first arg_lines lines.
The expected output of journalctl -r -n 2 is:
2015-04-04 log4
2015-03-03 log3
rogpeppe and fwjavox
Metadata
Metadata
Assignees
Labels
bug 🐛Programming errors, that need preferential fixingProgramming errors, that need preferential fixingjournal