[PATCH] common: cli_hush: clear Ctrl-C pressed flag before exiting loop commands
Shiji Yang
yangshiji66 at outlook.com
Sun Dec 28 06:34:38 CET 2025
On Sat, 27 Dec 2025 07:24:15 -0700, Simon Glass <sjg at chromium.org> wrote:
> Hi Shiji,
>
> On Wed, 10 Dec 2025 at 23:39, Shiji Yang <yangshiji66 at outlook.com> wrote:
> >
> > If the Ctrl-C flag is not cleared before exiting the for/until/while
> > loop, the next loop command will be unconditionally interrupted.
> >
> > Closes: https://lore.kernel.org/u-boot/OS7PR01MB138341D2719717E66B069F33FBCA0A@OS7PR01MB13834.jpnprd01.prod.outlook.com/
>
> What is this, please? The link does not seem to work for me. But
> really the detail there should be copied into this commit message, so
> we can see what is going on.
>
> > Signed-off-by: Shiji Yang <yangshiji66 at outlook.com>
> > ---
> > common/cli_hush.c | 1 +
> > 1 file changed, 1 insertion(+)
> >
> > diff --git a/common/cli_hush.c b/common/cli_hush.c
> > index 7bd6943d3ed..ec07bf6b3be 100644
> > --- a/common/cli_hush.c
> > +++ b/common/cli_hush.c
> > @@ -1798,6 +1798,7 @@ static int run_list_real(struct pipe *pi)
> > /* check Ctrl-C */
> > ctrlc();
> > if ((had_ctrlc())) {
> > + clear_ctrlc();
> > return 1;
> > }
> > #endif
> > --
> > 2.51.0
> >
>
> Regards,
> Simon
>
Hi! Thanks for your review. I've send a new patch to address this
Ctrl-C and cc to you.
https://lists.denx.de/pipermail/u-boot/2025-December/606342.html
https://lore.kernel.org/u-boot/OS7PR01MB13834BB74CEC85C67277849A2BCBEA@OS7PR01MB13834.jpnprd01.prod.outlook.com/
Regards,
Shiji
More information about the U-Boot
mailing list