From patchwork Mon Apr 23 09:57:27 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Timo Ketola X-Patchwork-Id: 154382 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 5CCC6B6EF1 for ; Mon, 23 Apr 2012 19:58:19 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 5C39F281BD; Mon, 23 Apr 2012 11:58:17 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 1QoA+JJuRcgx; Mon, 23 Apr 2012 11:58:17 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 0FEC9281D9; Mon, 23 Apr 2012 11:58:15 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 1FA56281D9 for ; Mon, 23 Apr 2012 11:58:13 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id A3ssieNL12WH for ; Mon, 23 Apr 2012 11:58:12 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from exertus.fi (unknown [193.210.47.2]) by theia.denx.de (Postfix) with ESMTP id 3728A281BD for ; Mon, 23 Apr 2012 11:58:10 +0200 (CEST) Received: from timo-CELSIUS ([10.3.1.192]) by exertus.fi with Microsoft SMTPSVC(6.0.3790.4675); Mon, 23 Apr 2012 12:58:07 +0300 Received: by timo-CELSIUS (sSMTP sendmail emulation); Mon, 23 Apr 2012 12:58:07 +0300 From: "Timo Ketola" To: u-boot@lists.denx.de Date: Mon, 23 Apr 2012 12:57:27 +0300 Message-Id: <1335175047-30984-1-git-send-email-timo@exertus.fi> X-Mailer: git-send-email 1.7.5.4 In-Reply-To: <20120423083937.B0867200261@gemini.denx.de> References: <20120423083937.B0867200261@gemini.denx.de> X-OriginalArrivalTime: 23 Apr 2012 09:58:07.0872 (UTC) FILETIME=[957FF000:01CD2137] X-MS-Exchange-Organization-SCL: 1 Cc: hs@denx.de Subject: [U-Boot] [PATCH] Fix the behaviour of the 'run' command X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de If one command fails, 'run' command should terminate and not execute any remaining variables. Signed-off-by: Timo Ketola Tested-by: Wolfgang Denk Tested-by: Simon Glass Acked-by: Simon Glass --- This is based on u-boot-imx.git next. I hope that doesn't cause too much trouble. common/main.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/common/main.c b/common/main.c index db181d3..3b9e39a 100644 --- a/common/main.c +++ b/common/main.c @@ -1338,7 +1338,8 @@ static int builtin_run_command(const char *cmd, int flag) continue; } - rc = cmd_process(flag, argc, argv, &repeatable); + if (cmd_process(flag, argc, argv, &repeatable)) + rc = -1; /* Did the user stop this? */ if (had_ctrlc ())