Add a note about the pager to the console documentation, with some more information in the developer section. Also include the pager API. Series-to: concept Cover-letter: Introduce a pager for the console Some U-Boot commands can produce a lot of output and this can run off top of the display. This series introduces a simple pager feature, to allow the output to be read, before pressing SPACE to continue. A fixed buffer size (4K) is used, which sets a limit on the permmited output before paging fails and the output is simply written all in one lot. In most cases this is plenty, but 'env print' does print the whole environment as one string, so if the legacy distro-boot scripts are used it could happen. The default number of visible lines is set with a Kconfig option. Where a video terminal is being used, the page size is set to match that. In general U-Boot cannot guess the number of visible lines, since a serial terminal may be in use. There is also a 'pager' environment variable which can override any detected value. This initial series only counts newlines. It has no support for counting characters so the result will be sub-optimal if very long lines are written. This could be addressed in a future patch. Some effort is made to handle common cases correctly. For example, if stdout is changed to a serial or vidconsole device, that is used to determine the page length. When redirecting sandbox to a file, no attempt is made. Future work may detect the terminal size by sending an ANSI sequence. END Signed-off-by: Simon Glass <sjg@chromium.org> Series-version: 2
11 lines
187 B
ReStructuredText
11 lines
187 B
ReStructuredText
.. SPDX-License-Identifier: GPL-2.0+
|
|
.. Copyright Simon Glass <sjg@chromium.org>
|
|
|
|
Console Pager
|
|
=============
|
|
|
|
See :doc:`/develop/console`.
|
|
|
|
.. kernel-doc:: include/pager.h
|
|
:internal:
|