From 030fca5228a2a1e946ac13ff8fae9ccb8c516d7b Mon Sep 17 00:00:00 2001 From: Timo Ketola Date: Sun, 22 Apr 2012 23:57:27 +0000 Subject: 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 Tested-by: Wolfgang Denk Tested-by: Simon Glass Acked-by: Simon Glass --- common/main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'common/main.c') diff --git a/common/main.c b/common/main.c index db181d319b..3b9e39a980 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 ()) -- cgit v1.2.3