From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CC575C47089 for ; Thu, 27 May 2021 21:24:18 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 93D67613E2 for ; Thu, 27 May 2021 21:24:17 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 93D67613E2 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=broadcom.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 3453A82D14; Thu, 27 May 2021 23:24:15 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=broadcom.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=broadcom.com header.i=@broadcom.com header.b="vxD3odsq"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 5F4A682D4B; Thu, 27 May 2021 23:24:14 +0200 (CEST) Received: from relay.smtp-ext.broadcom.com (saphodev.broadcom.com [192.19.11.229]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id BA0DB82CFE for ; Thu, 27 May 2021 23:24:11 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=broadcom.com Authentication-Results: phobos.denx.de; spf=fail smtp.mailfrom=farhan.ali@broadcom.com Received: from bld-lvn-bcawlan-34.lvn.broadcom.net (bld-lvn-bcawlan-34.lvn.broadcom.net [10.75.138.137]) by relay.smtp-ext.broadcom.com (Postfix) with ESMTP id 24CF524AB0; Thu, 27 May 2021 14:24:09 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 relay.smtp-ext.broadcom.com 24CF524AB0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=broadcom.com; s=dkimrelay; t=1622150649; bh=4A2ETVOS6JJxq4wTpcVNd2VlNMCz3DCH3MVCFlGkbFs=; h=From:To:Cc:Subject:Date:From; b=vxD3odsqmf8AElZs7oaiMGaklX5jQNiFjUaJvfiKr4zGNYZQMMlDSepHSA4Tet9bI FKS8aZz7al0ciuYsSHiX0qu/qOS0j7G0LPO+o6o//fd//KXFPOGYWO3lF5Yy9jIj1E 3ySshKAL8XI/qgwKPkpcYQzWvNPY5E/qrVAUtbuw= Received: from xl-irv-24.lvn.broadcom.net (xl-irv-24.lvn.broadcom.net [10.75.135.195]) by bld-lvn-bcawlan-34.lvn.broadcom.net (Postfix) with ESMTPSA id DB8471874BE; Thu, 27 May 2021 14:24:08 -0700 (PDT) From: Farhan Ali To: u-boot@lists.denx.de Cc: Farhan Ali , Simon Glass , Sean Anderson , Rasmus Villemoes , "peng.wang@smartm.com" , Patrick Delaunay Subject: [PATCH] common: The do_repeat flag interferes with commands issued via run_command API Date: Thu, 27 May 2021 14:24:04 -0700 Message-Id: <20210527212404.38250-1-farhan.ali@broadcom.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.4 at phobos.denx.de X-Virus-Status: Clean Must clear the do_repeat flag once it is consumed. Signed-off-by: Farhan Ali Cc: Simon Glass Cc: Sean Anderson Cc: Rasmus Villemoes Cc: Farhan Ali Cc: "peng.wang@smartm.com" Cc: Patrick Delaunay --- 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