[PATCH v3 2/2] cli: flush stdin before enabling cli
Simon Glass
sjg at chromium.org
Mon Apr 13 15:35:39 CEST 2026
Hi Gregor,
On Mon, 13 Apr 2026 at 00:18, Gregor Herburger
<gregor.herburger at linutronix.de> wrote:
>
> Hi Simon,
>
> On Sat, Apr 11, 2026 at 10:41:00AM -0600, Simon Glass wrote:
> > Hi Gregor,
> >
> > On 2026-04-07T06:33:10, Gregor Herburger <gregor.herburger at linutronix.de> wrote:
> > > cli: flush stdin before enabling cli
> > >
> > > 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.
> > >
> > > Signed-off-by: Gregor Herburger <gregor.herburger at linutronix.de>
> > >
> > > cmd/Kconfig | 8 ++++++++
> > > common/cli.c | 4 ++++
> > > 2 files changed, 12 insertions(+)
> >
> > > diff --git a/cmd/Kconfig b/cmd/Kconfig
> > > @@ -47,6 +47,14 @@ config HUSH_SELECTABLE
> > > +config CMDLINE_FLUSH_STDIN
> > > + bool "Enable flushing input before starting cli"
> > > + When this option is enabled the stdin buffer will be flushed before
> > > + starting the CLI. This is useful when stdin is changed during boot
> > > + (e.g. from nulldev to serial) and junk characters may be pending
> > > + in the buffer.
> >
> > Thanks for expanding the help text!
> >
> > Reviewed-by: Simon Glass <sjg at chromium.org>
>
> I just realized I didn't collected the Reviewed-by Tags from v2. Should
> I send a v4 with these or does a maintainer add them?
For a particular version, patchwork collects the tags in its database
and maintainers apply patches from there so the tags are colletced.
If you send a new version you must add the tags yourself (patman can
do this automatically).
So in this case, yes, you should send a new version with any tags that
were missed when you sent v3.
Regards,
Simon
More information about the U-Boot
mailing list