console: Plumb in the pager

Send all console output via the pager. If it is disabled, it will do
nothing.

The pager is only supported if CONSOLE_MUX and SYS_CONSOLE_IS_IN_ENV are
enabled. This is the common case for more richly featured boards, i.e.
those that can cope with the extra code size of this feature.

Series-changes: 2
- Drop an unnecessary direct call to the pager
- Repeat the old code in console_puts_pager() to avoid 16-byte growth

Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass
2025-08-21 18:30:52 -06:00
parent 149fe34151
commit d3d493c8a3
3 changed files with 76 additions and 6 deletions

View File

@@ -344,6 +344,15 @@ config CONSOLE_PAGER
controlled by the 'pager' environment variable. If the variable is
not set or is empty, paging is disabled.
config CONSOLE_PAGER_LINES
int "Number of lines per page"
depends on CONSOLE_PAGER
default 25
help
Sets the default number of lines that the pager assumes is visible on
the display. This is used as a default if the "pager" environment
variable is unset.
endmenu
menu "Logging"