]> git.sur5r.net Git - u-boot/commit
sandbox: init cli for -c
authorRabin Vincent <rabin@rab.in>
Wed, 29 Oct 2014 22:21:38 +0000 (23:21 +0100)
committerTom Rini <trini@ti.com>
Fri, 7 Nov 2014 21:27:05 +0000 (16:27 -0500)
commit7dbcb76e77361970f7223c1bca4fdc9bb0436a08
treecb7ef79e3e9121c8cf5efea3c1a330647d78eb0a
parent854d2b9753e464b7c1add062702565ebdb464119
sandbox: init cli for -c

sandbox crashes if a variable is set in the -c command, because
hush's top_vars is not allocated.  Call cli_init() from sandbox
to ensure this is done before we execute the -c command.

 $ ./u-boot -c 'a=1'
 ...
 Segmentation fault (core dumped)

Signed-off-by: Rabin Vincent <rabin@rab.in>
Acked-by: Simon Glass <sjg@chromium.org)
Tested-by: Simon Glass <sjg@chromium.org)
arch/sandbox/cpu/start.c