[BusyBox-cvs] busybox/init init.c,1.188,1.189 reboot.c,1.28,1.29

Erik Andersen andersen at busybox.net
Tue Jul 22 08:57:19 UTC 2003


Update of /var/cvs/busybox/init
In directory winder:/tmp/cvs-serv29080/init

Modified Files:
	init.c reboot.c 
Log Message:
Remove remaining libc5 support code


Index: init.c
===================================================================
RCS file: /var/cvs/busybox/init/init.c,v
retrieving revision 1.188
retrieving revision 1.189
diff -u -d -r1.188 -r1.189
--- init.c	14 Jul 2003 21:20:53 -0000	1.188
+++ init.c	22 Jul 2003 08:56:45 -0000	1.189
@@ -42,6 +42,7 @@
 #include <sys/mount.h>
 #include <sys/types.h>
 #include <sys/wait.h>
+#include <sys/reboot.h>
 #include "busybox.h"
 
 #include "init_shared.h"
@@ -50,9 +51,6 @@
 #ifdef CONFIG_SYSLOGD
 # include <sys/syslog.h>
 #endif
-#if (__GNU_LIBRARY__ > 5) || defined(__dietlibc__)
-#include <sys/reboot.h>
-#endif
 
 
 #if defined(__UCLIBC__) && !defined(__UCLIBC_HAS_MMU__)
@@ -665,11 +663,7 @@
 	 * linux/kernel/sys.c, which can cause the machine to panic when 
 	 * the init process is killed.... */
 	if ((pid = fork()) == 0) {
-#if (__GNU_LIBRARY__ > 5) || defined(__dietlibc__)
 		reboot(magic);
-#else
-		reboot(0xfee1dead, 672274793, magic);
-#endif
 		_exit(0);
 	}
 	waitpid (pid, NULL, 0);

Index: reboot.c
===================================================================
RCS file: /var/cvs/busybox/init/reboot.c,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -d -r1.28 -r1.29
--- reboot.c	14 Jul 2003 21:20:54 -0000	1.28
+++ reboot.c	22 Jul 2003 08:56:45 -0000	1.29
@@ -25,18 +25,11 @@
 #include <stdlib.h>
 #include <unistd.h>
 #include <getopt.h>
-
+#include <sys/reboot.h>
 #include "busybox.h"
 #include "init_shared.h"
 
 
-#if (__GNU_LIBRARY__ > 5) || defined(__dietlibc__) 
-  #include <sys/reboot.h>
-  #define init_reboot(magic) reboot(magic)
-#else
-  #define init_reboot(magic) reboot(0xfee1dead, 672274793, magic)
-#endif
-
 #ifndef RB_ENABLE_CAD
 static const int RB_ENABLE_CAD = 0x89abcdef;
 static const int RB_AUTOBOOT = 0x01234567;
@@ -57,7 +50,7 @@
         setpgrp();
 
 		/* Allow Ctrl-Alt-Del to reboot system. */
-		init_reboot(RB_ENABLE_CAD);
+		reboot(RB_ENABLE_CAD);
 
 		message(CONSOLE|LOG, "\n\rThe system is going down NOW !!\n");
 		sync();
@@ -74,7 +67,7 @@
 
 		sync();
 
-		init_reboot(RB_AUTOBOOT);
+		reboot(RB_AUTOBOOT);
 		return 0; /* Shrug */
 #else
 	return kill_init(SIGTERM);




More information about the busybox-cvs mailing list