From mboxrd@z Thu Jan 1 00:00:00 1970 From: Timo Ketola Date: Mon, 23 Apr 2012 12:57:27 +0300 Subject: [U-Boot] [PATCH] Fix the behaviour of the 'run' command In-Reply-To: <20120423083937.B0867200261@gemini.denx.de> References: <20120423083937.B0867200261@gemini.denx.de> Message-ID: <1335175047-30984-1-git-send-email-timo@exertus.fi> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de If one command fails, 'run' command should terminate and not execute any remaining variables. Signed-off-by: Timo Ketola --- 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 ()) -- 1.7.5.4