
From: Simon Glass <sjg@chromium.org> The pager should be bypassed if the terminal was not detected. Fix the condition which actually says the opposite. Also fix a long line in pager_post() Signed-off-by: Simon Glass <sjg@chromium.org> --- common/console.c | 2 +- common/pager.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/common/console.c b/common/console.c index 77f70588488..561a859dc1e 100644 --- a/common/console.c +++ b/common/console.c @@ -1189,7 +1189,7 @@ static int on_console(const char *name, const char *value, enum env_op op, int lines = calc_check_console_lines(); /* Set bypass mode if not connected to a terminal */ - pager_set_bypass(gd_pager(), lines != 0); + pager_set_bypass(gd_pager(), lines == 0); if (lines) pager_set_page_len(gd_pager(), lines); } diff --git a/common/pager.c b/common/pager.c index 8991d2f93fa..a16937768b6 100644 --- a/common/pager.c +++ b/common/pager.c @@ -20,7 +20,8 @@ const char *pager_post(struct pager *pag, bool use_pager, const char *s) struct membuf old; int ret, len; - if (!pag || !use_pager || pag->test_bypass || pag->state == PAGERST_BYPASS) + if (!pag || !use_pager || pag->test_bypass || + pag->state == PAGERST_BYPASS) return s; len = strlen(s); -- 2.43.0