summaryrefslogtreecommitdiff
path: root/src/journal/journalctl.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2012-10-18 23:34:37 +0200
committerLennart Poettering <lennart@poettering.net>2012-10-18 23:35:44 +0200
commitf89a3b6f5bf695186e7b9e6cc63993b1272e7569 (patch)
tree8478df8b23a18b3a8f2968522df0928cede5ec92 /src/journal/journalctl.c
parentcd4b13e0bfe9281a0d2c0c3bef1c589d0684950b (diff)
journalctl: unify ellipsation handling between journalctl and systemctl
Diffstat (limited to 'src/journal/journalctl.c')
-rw-r--r--src/journal/journalctl.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/journal/journalctl.c b/src/journal/journalctl.c
index 5185b4b398..d6f19e900a 100644
--- a/src/journal/journalctl.c
+++ b/src/journal/journalctl.c
@@ -840,7 +840,6 @@ int main(int argc, char *argv[]) {
bool need_seek = false;
sd_id128_t previous_boot_id;
bool previous_boot_id_valid = false;
- bool have_pager;
unsigned n_shown = 0;
log_parse_environment();
@@ -984,7 +983,9 @@ int main(int argc, char *argv[]) {
}
on_tty();
- have_pager = !arg_no_pager && !arg_follow && pager_open();
+
+ if (!arg_no_pager && !arg_follow)
+ pager_open();
if (!arg_quiet) {
usec_t start, end;
@@ -1048,7 +1049,7 @@ int main(int argc, char *argv[]) {
flags =
arg_all * OUTPUT_SHOW_ALL |
- (!on_tty() || have_pager) * OUTPUT_FULL_WIDTH |
+ (!on_tty() || pager_have()) * OUTPUT_FULL_WIDTH |
on_tty() * OUTPUT_COLOR;
r = output_journal(stdout, j, arg_output, 0, flags);