Patchwork [U-Boot,v3,2/5] Make 'run' use run_command_list() instead of run_command()

login
register
mail settings
Submitter Simon Glass
Date Oct. 26, 2013, 5:01 a.m.
Message ID <1382763695-2849-3-git-send-email-sjg@chromium.org>
Download mbox | patch
Permalink /patch/286250/
State New
Delegated to: Tom Rini
Headers show

Comments

Simon Glass - Oct. 26, 2013, 5:01 a.m.
In the case where an environment variable spans multiple lines, we should
use run_command_list() so that all lines are executed. This shold be
backwards compatible with existing behaviour for existing scripts.

Signed-off-by: Simon Glass <sjg@chromium.org>
---
Changes in v3: None
Changes in v2:
- Add new patch to adjust 'run' command to better support testing

 common/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch

diff --git a/common/main.c b/common/main.c
index 6f475f0..6650293 100644
--- a/common/main.c
+++ b/common/main.c
@@ -1544,7 +1544,7 @@  int do_run (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
 			return 1;
 		}
 
-		if (run_command(arg, flag) != 0)
+		if (run_command_list(arg, -1, flag) != 0)
 			return 1;
 	}
 	return 0;