svn commit: trunk/busybox: include libbb miscutils networking syskl etc...

aldot at busybox.net aldot at busybox.net
Wed May 31 10:19:54 UTC 2006


Author: aldot
Date: 2006-05-31 03:19:51 -0700 (Wed, 31 May 2006)
New Revision: 15244

Log:
- s/defined(__uClinux__)/BB_NOMMU/
This needs a second pass to:
+ add bb_daemon(unsigned char no_chdir, unsigned char no_close, const char*flag)
+ eventually globally export argc and argv, so we don't need to pass it to
  bb_daemon().


Modified:
   trunk/busybox/include/libbb.h
   trunk/busybox/libbb/vfork_daemon_rexec.c
   trunk/busybox/miscutils/crond.c
   trunk/busybox/networking/dnsd.c
   trunk/busybox/networking/inetd.c
   trunk/busybox/sysklogd/klogd.c
   trunk/busybox/sysklogd/syslogd.c


Changeset:
Modified: trunk/busybox/include/libbb.h
===================================================================
--- trunk/busybox/include/libbb.h	2006-05-31 10:04:03 UTC (rev 15243)
+++ trunk/busybox/include/libbb.h	2006-05-31 10:19:51 UTC (rev 15244)
@@ -492,7 +492,7 @@
 extern void print_login_issue(const char *issue_file, const char *tty);
 extern void print_login_prompt(void);
 
-#if defined(__uClinux__)
+#ifdef BB_NOMMU
 extern void vfork_daemon_rexec(int nochdir, int noclose,
 		int argc, char **argv, char *foreground_opt);
 #endif

Modified: trunk/busybox/libbb/vfork_daemon_rexec.c
===================================================================
--- trunk/busybox/libbb/vfork_daemon_rexec.c	2006-05-31 10:04:03 UTC (rev 15243)
+++ trunk/busybox/libbb/vfork_daemon_rexec.c	2006-05-31 10:19:51 UTC (rev 15244)
@@ -22,7 +22,7 @@
 #include "libbb.h"
 
 
-#if defined(__uClinux__)
+#ifdef BB_NOMMU
 void vfork_daemon_rexec(int nochdir, int noclose,
 		int argc, char **argv, char *foreground_opt)
 {
@@ -64,4 +64,4 @@
 		exit(0);
 	}
 }
-#endif /* uClinux */
+#endif /* BB_NOMMU */

Modified: trunk/busybox/miscutils/crond.c
===================================================================
--- trunk/busybox/miscutils/crond.c	2006-05-31 10:04:03 UTC (rev 15243)
+++ trunk/busybox/miscutils/crond.c	2006-05-31 10:19:51 UTC (rev 15244)
@@ -205,12 +205,12 @@
 	 */
 
 	if (!(opt & 4)) {
-#if defined(__uClinux__)
+#ifdef BB_NOMMU
 		/* reexec for vfork() do continue parent */
 		vfork_daemon_rexec(1, 0, ac, av, "-f");
-#else							/* uClinux */
+#else
 		bb_xdaemon(1, 0);
-#endif							/* uClinux */
+#endif
 	}
 
 	(void) startlogger();	/* need if syslog mode selected */

Modified: trunk/busybox/networking/dnsd.c
===================================================================
--- trunk/busybox/networking/dnsd.c	2006-05-31 10:04:03 UTC (rev 15243)
+++ trunk/busybox/networking/dnsd.c	2006-05-31 10:19:51 UTC (rev 15244)
@@ -92,7 +92,7 @@
 }
 
 /*
- * Insert length of substrings insetad of dots
+ * Insert length of substrings instead of dots
  */
 static void undot(uint8_t * rip)
 {
@@ -393,12 +393,12 @@
 	}
 
 	if(is_daemon())
-#if defined(__uClinux__)
+#ifdef BB_NOMMU
 		/* reexec for vfork() do continue parent */
 		vfork_daemon_rexec(1, 0, argc, argv, "-d");
-#else							/* uClinux */
+#else
 		bb_xdaemon(1, 0);
-#endif							/* uClinuvx */
+#endif
 
 	dnsentryinit(is_verbose());
 

Modified: trunk/busybox/networking/inetd.c
===================================================================
--- trunk/busybox/networking/inetd.c	2006-05-31 10:04:03 UTC (rev 15243)
+++ trunk/busybox/networking/inetd.c	2006-05-31 10:19:51 UTC (rev 15244)
@@ -1309,12 +1309,12 @@
 	bb_error_msg_and_die ("non-root must specify a config file");
 
   if (!(opt & 2)) {
-#if defined(__uClinux__)
+#ifdef BB_NOMMU
 	/* reexec for vfork() do continue parent */
 	vfork_daemon_rexec (0, 0, argc, argv, "-f");
 #else
-	daemon (0, 0); /* bb_xdaemon? */
-#endif /* uClinux */
+	bb_xdaemon (0, 0);
+#endif
   } else {
 	setsid ();
   }

Modified: trunk/busybox/sysklogd/klogd.c
===================================================================
--- trunk/busybox/sysklogd/klogd.c	2006-05-31 10:04:03 UTC (rev 15243)
+++ trunk/busybox/sysklogd/klogd.c	2006-05-31 10:19:51 UTC (rev 15244)
@@ -118,11 +118,11 @@
 	}
 
 	if (!(opt & OPT_FOREGROUND)) {
-#if defined(__uClinux__)
+#ifdef BB_NOMMU
 		vfork_daemon_rexec(0, 1, argc, argv, "-n");
-#else /* __uClinux__ */
+#else
 		bb_xdaemon(0, 1);
-#endif /* __uClinux__ */
+#endif
 	}
 	doKlogd(console_log_level);
 

Modified: trunk/busybox/sysklogd/syslogd.c
===================================================================
--- trunk/busybox/sysklogd/syslogd.c	2006-05-31 10:04:03 UTC (rev 15243)
+++ trunk/busybox/sysklogd/syslogd.c	2006-05-31 10:19:51 UTC (rev 15244)
@@ -670,11 +670,11 @@
 	umask(0);
 
 	if (doFork == TRUE) {
-#if defined(__uClinux__)
+#ifdef BB_NOMMU
 		vfork_daemon_rexec(0, 1, argc, argv, "-n");
-#else /* __uClinux__ */
+#else
 		bb_xdaemon(0, 1);
-#endif /* __uClinux__ */
+#endif
 	}
 	doSyslogd();
 




More information about the busybox-cvs mailing list