]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
Fix the behaviour of the 'run' command
authorTimo Ketola <timo@exertus.fi>
Sun, 22 Apr 2012 23:57:27 +0000 (23:57 +0000)
committerWolfgang Denk <wd@denx.de>
Mon, 23 Apr 2012 20:07:00 +0000 (22:07 +0200)
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>
common/main.c

index db181d319b85f44fb88de1204601c885adb3cfdb..3b9e39a9805b9da3831edef2177c44b00c72893e 100644 (file)
@@ -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 ())