From a299efb7b0baea494bf1cb4f050879c29240e5c4 Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Thu, 10 Aug 2006 21:46:43 +0000 Subject: Make a warning go away when standalone shell is disabled. --- shell/msh.c | 17 ++++++++--------- 1 file 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)); -- cgit v1.1