summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2012-04-29 18:46:39 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2012-04-30 13:08:55 +0200
commite21a340e396bd61dc07e3d18910498b50045c9e8 (patch)
treeac7c05522ba57bb816a67e14f9e0bf0355aa4d7e /common
parentf034ed2044c8cf58a67984da1f6d096d92093cdd (diff)
downloadbarebox-e21a340e396bd61dc07e3d18910498b50045c9e8.tar.gz
barebox-e21a340e396bd61dc07e3d18910498b50045c9e8.tar.xz
hush: allow to run interactive shell in do_sh
This allows to call 'sh' in scripts without arguments in which case an interactive shell will be started. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'common')
-rw-r--r--common/hush.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/common/hush.c b/common/hush.c
index ab513af964..d915f9ed5b 100644
--- a/common/hush.c
+++ b/common/hush.c
@@ -1814,7 +1814,7 @@ int run_shell(void)
static int do_sh(int argc, char *argv[])
{
if (argc < 2)
- return COMMAND_ERROR_USAGE;
+ return run_shell();
return execute_script(argv[1], argc - 1, argv + 1);
}