sandbox: Allow -c argument to provide a command list
authorSimon Glass <sjg@chromium.org>
Sat, 20 Apr 2013 08:42:48 +0000 (08:42 +0000)
committerTom Rini <trini@ti.com>
Wed, 1 May 2013 15:17:21 +0000 (11:17 -0400)
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

index 2fcec8b363b2a53338ef0ec7189a3dc6bcf1ff6d..ae6e16caba2d887b1e0a45a9a3459eca7ed62f76 100644 (file)
@@ -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);
        }