chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
9e8a535
)
journalctl: show "Reboot" markers in output only when showing local-only entries
author
Lennart Poettering
<lennart@poettering.net>
Wed, 5 Sep 2012 23:52:46 +0000
(16:52 -0700)
committer
Lennart Poettering
<lennart@poettering.net>
Wed, 5 Sep 2012 23:52:46 +0000
(16:52 -0700)
src/journal/journalctl.c
patch
|
blob
|
history
diff --git
a/src/journal/journalctl.c
b/src/journal/journalctl.c
index 73e8cb8809edab382c78f716f5268d265d6de069..1a6464d5e7ac9d72864524149910517b1409c39f 100644
(file)
--- a/
src/journal/journalctl.c
+++ b/
src/journal/journalctl.c
@@
-823,7
+823,6
@@
int main(int argc, char *argv[]) {
for (;;) {
for (;;) {
for (;;) {
for (;;) {
- sd_id128_t boot_id;
int flags =
arg_show_all * OUTPUT_SHOW_ALL |
have_pager * OUTPUT_FULL_WIDTH |
int flags =
arg_show_all * OUTPUT_SHOW_ALL |
have_pager * OUTPUT_FULL_WIDTH |
@@
-840,14
+839,18
@@
int main(int argc, char *argv[]) {
if (r == 0)
break;
if (r == 0)
break;
- r = sd_journal_get_monotonic_usec(j, NULL, &boot_id);
- if (r >= 0) {
- if (previous_boot_id_valid &&
- !sd_id128_equal(boot_id, previous_boot_id))
- printf(ANSI_HIGHLIGHT_ON "----- Reboot -----" ANSI_HIGHLIGHT_OFF "\n");
+ if (!arg_merge) {
+ sd_id128_t boot_id;
- previous_boot_id = boot_id;
- previous_boot_id_valid = true;
+ r = sd_journal_get_monotonic_usec(j, NULL, &boot_id);
+ if (r >= 0) {
+ if (previous_boot_id_valid &&
+ !sd_id128_equal(boot_id, previous_boot_id))
+ printf(ANSI_HIGHLIGHT_ON "----- Reboot -----" ANSI_HIGHLIGHT_OFF "\n");
+
+ previous_boot_id = boot_id;
+ previous_boot_id_valid = true;
+ }
}
line ++;
}
line ++;