]> git.ipfire.org Git - thirdparty/u-boot.git/commit
console: add console_flush_stdin()
authorGregor Herburger <gregor.herburger@linutronix.de>
Mon, 13 Apr 2026 15:24:53 +0000 (17:24 +0200)
committerTom Rini <trini@konsulko.com>
Wed, 22 Apr 2026 20:23:49 +0000 (14:23 -0600)
commit2c8fdd7aea1d3c6c380ea5b5080147dc7fe9c38f
tree266330ba84691d7cbdabeab1f38ba7fd712c2aed
parent3abc7c1d46de4211b2d11051033566c9ad2c2740
console: add console_flush_stdin()

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@linutronix.de>
Reviewed-by: Alexander Sverdlin <alexander.sverdlin@siemens.com>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
cmd/conitrace.c
cmd/eficonfig.c
cmd/eficonfig_sbkey.c
common/autoboot.c
common/console.c
include/console.h
lib/efi_loader/efi_console.c