Must clear the do_repeat flag once it is consumed.

Signed-off-by: Farhan Ali <farhan....@broadcom.com>
Cc: Simon Glass <s...@chromium.org>
Cc: Sean Anderson <sean...@gmail.com>
Cc: Rasmus Villemoes <rasmus.villem...@prevas.dk>
Cc: Farhan Ali <farhan....@broadcom.com>
Cc: "peng.w...@smartm.com" <peng.w...@smartm.com>
Cc: Patrick Delaunay <patrick.delau...@foss.st.com>

---
 common/cli_hush.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/common/cli_hush.c b/common/cli_hush.c
index 1467ff81b3..1c9adf5683 100644
--- a/common/cli_hush.c
+++ b/common/cli_hush.c
@@ -1559,6 +1559,11 @@ static int run_pipe_real(struct pipe *pi)
 # endif
 #endif /* __U_BOOT__ */
 
+       /* Clear do_repeat after consumption, avoids conflicts
+        * with cmds issued  via run_command API
+        */
+       do_repeat = 0;
+
        nextin = 0;
 #ifndef __U_BOOT__
        pi->pgrp = -1;
-- 
2.27.0

Reply via email to