[PATCH v2 1/2] console: add console_flush_stdin()

Sverdlin, Alexander alexander.sverdlin at siemens.com
Wed Apr 1 15:23:39 CEST 2026


Hi Gregor!

On Wed, 2026-04-01 at 14:40 +0200, Gregor Herburger wrote:
> Add a common helper console_flush_stdin() to drain all pending
> characters from stdin. This consolidates the open-coded
> while (tstc()) getchar() pattern that appeared in multiple places
> across the tree.
> 
> Signed-off-by: Gregor Herburger <gregor.herburger at linutronix.de>

Reviewed-by: Alexander Sverdlin <alexander.sverdlin at siemens.com>

> ---
> 
> (no changes since v1)
> 
>  cmd/conitrace.c              |  4 ++--
>  cmd/eficonfig.c              |  6 +++---
>  cmd/eficonfig_sbkey.c        |  4 ++--
>  common/autoboot.c            | 11 +----------
>  common/console.c             | 12 ++++++++++--
>  include/console.h            |  5 +++++
>  lib/efi_loader/efi_console.c |  7 +++----
>  7 files changed, 26 insertions(+), 23 deletions(-)

-- 
Alexander Sverdlin
Siemens AG
www.siemens.com


More information about the U-Boot mailing list