소스 검색

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>
Timo Ketola 13 년 전
부모
커밋
030fca5228
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      common/main.c

+ 2 - 1
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 ())