Using ${STRIP} instead of strip in the Makefile

Diekema, Jon (AGRE) Jon.Diekema at smiths-aerospace.com
Sat Oct 14 09:57:00 PDT 2006


Here a couple of patches:

1. Use ${STRIP} instead of strip in the Makefile to support cross
compilation 
2. Remove unused variable in networking/ifupdown.c 
3. Allow ^C to work when using busybox through a serial interface --
Busybox needs to assign a controlling tty.

--- networking/ifupdown.c	(revision 16383)
+++ networking/ifupdown.c	(working copy)
@@ -1099,7 +1099,6 @@
 	llist_t *target_list = NULL;
 	const char *interfaces = "/etc/network/interfaces";
 	int any_failures = 0;
-	int i;
 
 	if (applet_name[2] == 'u') {
 		/* ifup command */
Index: coreutils/stty.c
--- Makefile	(revision 16383)
+++ Makefile	(working copy)
@@ -681,7 +685,7 @@
 	$(Q)rm -f .old_version
 
 busybox: busybox_unstripped
-	$(Q)strip -s --remove-section=.note --remove-section=.comment \
+	${Q}${STRIP} -s --remove-section=.note --remove-section=.comment
\
 		busybox_unstripped -o $@
 
 # The actual objects are generated when descending, 


--- init/init.c	(revision 16383)
+++ init/init.c	(working copy)
@@ -396,6 +396,7 @@
 	if ((pid = fork()) == 0) {
 
 		/* Clean up */
+		ioctl(0, TIOCNOTTY, 0);
 		close(0);
 		close(1);
 		close(2);
@@ -425,6 +426,8 @@
 		 * they point to the supplied terminal */
 		dup(0);
 		dup(0);
+		ioctl(0, TIOCSCTTY, 1);
+		tcsetpgrp(0, getpgrp());
 
 		/* If the init Action requires us to wait, then force
the
 		 * supplied terminal to be the controlling tty. */

******************************************
The information contained in, or attached to, this e-mail, may contain confidential information and is intended solely for the use of the individual or entity to whom they are addressed and may be subject to legal privilege.  If you have received this e-mail in error you should notify the sender immediately by reply e-mail, delete the message from your system and notify your system manager.  Please do not copy it for any purpose, or disclose its contents to any other person.  The views or opinions presented in this e-mail are solely those of the author and do not necessarily represent those of the company.  The recipient should check this e-mail and any attachments for the presence of viruses.  The company accepts no liability for any damage caused, directly or indirectly, by any virus transmitted in this email.
******************************************


More information about the busybox mailing list