[PATCH 19/21] console: Add a function to read a line of the output / eof
Heinrich Schuchardt
xypron.debian at gmx.de
Wed Feb 12 18:14:49 CET 2020
On 2/5/20 6:55 PM, sjg at google.com wrote:
> When recording the console output for testing it is useful to be able to
> read the output a line at a time to check that the output is correct. Also
> we need to check that we get to the end of the output.
>
> Add a console function to return the next line and another to see how must
> data is left.
>
> Signed-off-by: Simon Glass <sjg at chromium.org>
> ---
>
> common/console.c | 11 +++++++++++
> include/console.h | 19 +++++++++++++++++++
> 2 files changed, 30 insertions(+)
>
> Applied to u-boot-dm, thanks!
>
With this merged patch U-Boot does not compile:
common/console.c:629:26: error: passing argument 1 of ‘membuff_readline’
discards ‘volatile’ qualifier from pointer target type
[-Werror=discarded-qualifiers]
629 | return membuff_readline(&gd->console_out, str, maxlen, ' ');
| ^~~~~~~~~~~~~~~~
In file included from include/asm-generic/global_data.h:24,
from ./arch/arm/include/asm/global_data.h:87,
from include/common.h:36,
from common/console.c:7:
Best regards
Heinrich
More information about the U-Boot
mailing list