From d66ddafaf94386f8b92b190a09a0dc488a89149f Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Thu, 15 Nov 2018 18:44:03 -0700 Subject: sandbox: Add a new 'sb' command The old 'sb' command was deprecated in 2015 and replaced with 'host'. It is useful to be able to access some internal sandbox state, particularly for testing. Resurrect the old command and provide a way to print some basic state information (currently just the arguments to sandbox). Signed-off-by: Simon Glass --- arch/sandbox/cpu/start.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'arch/sandbox/cpu') diff --git a/arch/sandbox/cpu/start.c b/arch/sandbox/cpu/start.c index 28ca35392c9..b1566a81435 100644 --- a/arch/sandbox/cpu/start.c +++ b/arch/sandbox/cpu/start.c @@ -305,6 +305,16 @@ static void setup_ram_buf(struct sandbox_state *state) gd->ram_size = state->ram_size; } +void state_show(struct sandbox_state *state) +{ + char **p; + + printf("Arguments:\n"); + for (p = state->argv; *p; p++) + printf("%s ", *p); + printf("\n"); +} + int main(int argc, char *argv[]) { struct sandbox_state *state; -- cgit v1.2.3