diff options
author | Lennart Poettering <lennart@poettering.net> | 2012-09-05 16:52:46 -0700 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2012-09-05 16:52:46 -0700 |
commit | cd931c0a464da9d0555e6a8e83c1aba176c0971b (patch) | |
tree | b2b73c905a19d5d46429294528bea6591ca2a0b7 | |
parent | 9e8a535faa370bab283cb2c3c52b0a0d44e9d193 (diff) |
journalctl: show "Reboot" markers in output only when showing local-only entries
-rw-r--r-- | src/journal/journalctl.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/src/journal/journalctl.c b/src/journal/journalctl.c index 73e8cb8809..1a6464d5e7 100644 --- a/src/journal/journalctl.c +++ b/src/journal/journalctl.c @@ -823,7 +823,6 @@ int main(int argc, char *argv[]) { for (;;) { for (;;) { - sd_id128_t boot_id; 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; - 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 ++; |