[PATCH] cli: flush stdin before enabling cli

Quentin Schulz quentin.schulz at cherry.de
Wed Apr 1 11:28:30 CEST 2026


Hi Gregor,

On 3/31/26 1:03 PM, Gregor Herburger wrote:
> [You don't often get email from gregor.herburger at linutronix.de. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]
> 
> Currently there is no possibility to flush stdin after autocommands are
> executed. If in the bootcmd the stdin is changed, e.g. from nulldev to
> serial, it could happen that junk characters sit in the fifo and appear
> on the cli.
> 
> Add a option to clear stdin before starting the CLI.
> 

Why does this need an option? I don't know enough (anything really) 
about the cli in general but the wording seems to indicate this fixes an 
issue or even a bug. Is there a case in which we wouldn't want to flush?

Cheers,
Quentin


More information about the U-Boot mailing list