diff mbox

[U-Boot,RFC,01/22] sandbox: Allow -c argument to provide a command list

Message ID 1357829905-6579-2-git-send-email-sjg@chromium.org
State RFC
Headers show

Commit Message

Simon Glass Jan. 10, 2013, 2:58 p.m. UTC
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>
---
 arch/sandbox/cpu/start.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Comments

Marek Vasut Jan. 11, 2013, 11:06 a.m. UTC | #1
Dear Simon Glass,

> 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>

> ---
>  arch/sandbox/cpu/start.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/arch/sandbox/cpu/start.c b/arch/sandbox/cpu/start.c
> index 8589da2..ce47e7e 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);
>  	}

Best regards,
Marek Vasut
diff mbox

Patch

diff --git a/arch/sandbox/cpu/start.c b/arch/sandbox/cpu/start.c
index 8589da2..ce47e7e 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);
 	}