Patchwork [U-Boot,v2,44/45] sandbox: Allow -c argument to provide a command list

login
register
mail settings
Submitter Simon Glass
Date March 18, 2013, 11:52 p.m.
Message ID <1363650725-30459-45-git-send-email-sjg@chromium.org>
Download mbox | patch
Permalink /patch/228877/
State Deferred
Delegated to: Tom Rini
Headers show

Comments

Simon Glass - March 18, 2013, 11:52 p.m.
This allows passing of entire scripts to sandbox with the -c argument,
which is useful for testing. Commands can be delimited with a newline
or semicolon.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Marek Vasut <marex@denx.de>
---
Changes in v2:
- Move sandbox's command list patch from a later series

 arch/sandbox/cpu/start.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch

diff --git a/arch/sandbox/cpu/start.c b/arch/sandbox/cpu/start.c
index 2fcec8b..ae6e16c 100644
--- a/arch/sandbox/cpu/start.c
+++ b/arch/sandbox/cpu/start.c
@@ -90,7 +90,7 @@  int sandbox_main_loop_init(void)
 
 	/* Execute command if required */
 	if (state->cmd) {
-		run_command(state->cmd, 0);
+		run_command_list(state->cmd, -1, 0);
 		os_exit(state->exit_type);
 	}