[PATCH] common: cli_hush: clear Ctrl-C pressed flag before exiting loop commands
Shiji Yang
yangshiji66 at outlook.com
Thu Dec 11 07:38:38 CET 2025
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/
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
More information about the U-Boot
mailing list