public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Farhan Ali <farhan.ali@broadcom.com>
To: u-boot@lists.denx.de
Cc: Farhan Ali <farhan.ali@broadcom.com>,
	Simon Glass <sjg@chromium.org>, Sean Anderson <seanga2@gmail.com>,
	Rasmus Villemoes <rasmus.villemoes@prevas.dk>,
	"peng.wang@smartm.com" <peng.wang@smartm.com>,
	Patrick Delaunay <patrick.delaunay@foss.st.com>
Subject: [PATCH] common: The do_repeat flag interferes with commands issued via run_command API
Date: Thu, 27 May 2021 14:24:04 -0700	[thread overview]
Message-ID: <20210527212404.38250-1-farhan.ali@broadcom.com> (raw)

Must clear the do_repeat flag once it is consumed.

Signed-off-by: Farhan Ali <farhan.ali@broadcom.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Sean Anderson <seanga2@gmail.com>
Cc: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
Cc: Farhan Ali <farhan.ali@broadcom.com>
Cc: "peng.wang@smartm.com" <peng.wang@smartm.com>
Cc: Patrick Delaunay <patrick.delaunay@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	other threads:[~2021-05-27 21:24 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-27 21:24 Farhan Ali [this message]
2021-05-27 23:24 ` [PATCH] common: The do_repeat flag interferes with commands issued via run_command API Sean Anderson
2021-05-28 18:34   ` Farhan Ali
2021-05-29 15:49     ` Sean Anderson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210527212404.38250-1-farhan.ali@broadcom.com \
    --to=farhan.ali@broadcom.com \
    --cc=patrick.delaunay@foss.st.com \
    --cc=peng.wang@smartm.com \
    --cc=rasmus.villemoes@prevas.dk \
    --cc=seanga2@gmail.com \
    --cc=sjg@chromium.org \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox