diff options
author | Rob Landley | 2006-08-10 21:46:43 +0000 |
---|---|---|
committer | Rob Landley | 2006-08-10 21:46:43 +0000 |
commit | a299efb7b0baea494bf1cb4f050879c29240e5c4 (patch) | |
tree | dd988607265cf5679a3e5d377e31eb2d58f3d03a /shell | |
parent | 10b36f94bb3e10681acaf43938f25622baf4d6b9 (diff) | |
download | busybox-a299efb7b0baea494bf1cb4f050879c29240e5c4.zip busybox-a299efb7b0baea494bf1cb4f050879c29240e5c4.tar.gz |
Make a warning go away when standalone shell is disabled.
Diffstat (limited to 'shell')
-rw-r--r-- | shell/msh.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/shell/msh.c b/shell/msh.c index b491a08..df6f321 100644 --- a/shell/msh.c +++ b/shell/msh.c @@ -3126,18 +3126,17 @@ static char *rexecve(char *c, char **v, char **envp) int i; char *sp, *tp; int eacces = 0, asis = 0; - -#ifdef CONFIG_FEATURE_SH_STANDALONE_SHELL char *name = c; - optind = 1; - if (find_applet_by_name(name)) { - /* We have to exec here since we vforked. Running - * run_applet_by_name() won't work and bad things - * will happen. */ - execve(CONFIG_BUSYBOX_EXEC_PATH, v, envp); + if (ENABLE_FEATURE_SH_STANDALONE_SHELL) { + optind = 1; + if (find_applet_by_name(name)) { + /* We have to exec here since we vforked. Running + * run_applet_by_name() won't work and bad things + * will happen. */ + execve(CONFIG_BUSYBOX_EXEC_PATH, v, envp); + } } -#endif DBGPRINTF(("REXECVE: c=%p, v=%p, envp=%p\n", c, v, envp)); |