[BusyBox-cvs] busybox/init init.c,1.199,1.200

Erik Andersen andersen at busybox.net
Mon Apr 12 17:59:26 UTC 2004


Update of /var/cvs/busybox/init
In directory nail:/tmp/cvs-serv16540/init

Modified Files:
	init.c 
Log Message:
Jamie Guinan writes:

It looks like latest uClibc defines ARCH_HAS_MMU, but a few busybox files
test UCLIBC_HAS_MMU, resulting in vfork() getting called instead of
fork(), etc.

Patch below.   Only tested for lash.

Cheers,
-Jamie



Index: init.c
===================================================================
RCS file: /var/cvs/busybox/init/init.c,v
retrieving revision 1.199
retrieving revision 1.200
diff -u -d -r1.199 -r1.200
--- a/init.c	15 Mar 2004 08:28:40 -0000	1.199
+++ b/init.c	12 Apr 2004 17:59:23 -0000	1.200
@@ -53,7 +53,7 @@
 #endif
 
 
-#if defined(__UCLIBC__) && !defined(__UCLIBC_HAS_MMU__)
+#if defined(__UCLIBC__) && !defined(__ARCH_HAS_MMU__)
 #define fork	vfork
 #endif
 
@@ -913,7 +913,7 @@
 	if (check_free_memory() > 1000)
 		return;
 
-#if !defined(__UCLIBC__) || defined(__UCLIBC_HAS_MMU__)
+#if !defined(__UCLIBC__) || defined(__ARCH_HAS_MMU__)
 	if (stat("/etc/fstab", &statBuf) == 0) {
 		/* swapon -a requires /proc typically */
 		new_init_action(SYSINIT, "/bin/mount -t proc proc /proc", "");
@@ -957,7 +957,7 @@
 		new_init_action(CTRLALTDEL, "/sbin/reboot", "");
 		/* Umount all filesystems on halt/reboot */
 		new_init_action(SHUTDOWN, "/bin/umount -a -r", "");
-#if !defined(__UCLIBC__) || defined(__UCLIBC_HAS_MMU__)
+#if !defined(__UCLIBC__) || defined(__ARCH_HAS_MMU__)
 		/* Swapoff on halt/reboot */
 		new_init_action(SHUTDOWN, "/sbin/swapoff -a", "");
 #endif




More information about the busybox-cvs mailing list