summaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authorRob Landley2006-08-10 21:46:43 +0000
committerRob Landley2006-08-10 21:46:43 +0000
commita299efb7b0baea494bf1cb4f050879c29240e5c4 (patch)
treedd988607265cf5679a3e5d377e31eb2d58f3d03a /shell
parent10b36f94bb3e10681acaf43938f25622baf4d6b9 (diff)
downloadbusybox-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.c17
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));