[BusyBox-cvs] busybox/shell ash.c,1.77,1.78 msh.c,1.14,1.15

Glenn McGrath bug1 at busybox.net
Tue Sep 2 02:36:43 UTC 2003


Update of /var/cvs/busybox/shell
In directory winder:/tmp/cvs-serv18900/shell

Modified Files:
	ash.c msh.c 
Log Message:
move all "-/bin/sh" "/bin/sh" and "sh" to libbb/messages.c file as one
constant.
Vodz last_patch_107


Index: msh.c
===================================================================
RCS file: /var/cvs/busybox/shell/msh.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- msh.c	14 Jul 2003 21:21:06 -0000	1.14
+++ msh.c	2 Sep 2003 02:36:18 -0000	1.15
@@ -668,7 +668,6 @@
 static int	heedint =1;
 static struct env e ={line, iostack, iostack-1, (xint *)NULL, FDBASE, (struct env *)NULL};
 static void (*qflag)(int) = SIG_IGN;
-static char	shellname[] = "/bin/sh";
 static	int	startl;
 static	int	peeksym;
 static	int	nlseen;
@@ -717,7 +716,7 @@
 
 	shell = lookup("SHELL");
 	if (shell->value == null)
-		setval(shell, shellname);
+		setval(shell, DEFAULT_SHELL);
 	export(shell);
 
 	homedir = lookup("HOME");
@@ -2871,7 +2870,7 @@
 			*v = e.linep;
 			tp = *--v;
 			*v = e.linep;
-			execve(shellname, v, envp);
+			execve(DEFAULT_SHELL, v, envp);
 			*v = tp;
 			return("no Shell");
 
@@ -3902,7 +3901,7 @@
 	dup2(pf[1], 1);
 	closepipe(pf);
 
-	argument_list[0] = shellname;
+	argument_list[0] = (char *)DEFAULT_SHELL;
 	argument_list[1] = "-c";
 	argument_list[2] = child_cmd;
 	argument_list[3] = 0;

Index: ash.c
===================================================================
RCS file: /var/cvs/busybox/shell/ash.c,v
retrieving revision 1.77
retrieving revision 1.78
diff -u -d -r1.77 -r1.78
--- ash.c	1 Sep 2003 08:53:32 -0000	1.77
+++ ash.c	2 Sep 2003 02:36:17 -0000	1.78
@@ -3729,7 +3729,7 @@
 		for (ap = argv; *ap; ap++)
 			;
 		ap = new = ckmalloc((ap - argv + 2) * sizeof(char *));
-		*ap++ = cmd = "/bin/sh";
+		*ap++ = cmd = (char *)DEFAULT_SHELL;
 		while ((*ap++ = *argv++))
 			;
 		argv = new;




More information about the busybox-cvs mailing list