summaryrefslogtreecommitdiff
path: root/common/main.c
diff options
context:
space:
mode:
authorTimo Ketola <timo@exertus.fi>2012-04-22 23:57:27 +0000
committerWolfgang Denk <wd@denx.de>2012-04-23 22:07:00 +0200
commit030fca5228a2a1e946ac13ff8fae9ccb8c516d7b (patch)
tree71c7147d8841668e40447c890db542af1380a433 /common/main.c
parent2790bf69dc12fb9aeb9836904e5f57c7f83d5552 (diff)
downloadu-boot-imx-030fca5228a2a1e946ac13ff8fae9ccb8c516d7b.zip
u-boot-imx-030fca5228a2a1e946ac13ff8fae9ccb8c516d7b.tar.gz
u-boot-imx-030fca5228a2a1e946ac13ff8fae9ccb8c516d7b.tar.bz2
Fix the behaviour of the 'run' command
If one command fails, 'run' command should terminate and not execute any remaining variables. Signed-off-by: Timo Ketola <timo@exertus.fi> Tested-by: Wolfgang Denk <wd@denx.de> Tested-by: Simon Glass <sjg@chromium.org> Acked-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'common/main.c')
-rw-r--r--common/main.c3
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 ())