svn commit: trunk/busybox: libbb networking/udhcp shell

aldot at busybox.net aldot at busybox.net
Fri May 19 13:12:25 UTC 2006


Author: aldot
Date: 2006-05-19 06:12:21 -0700 (Fri, 19 May 2006)
New Revision: 15133

Log:
- replace _PATH_DEVNULL with bb_dev_null


Modified:
   trunk/busybox/libbb/vfork_daemon_rexec.c
   trunk/busybox/networking/udhcp/common.c
   trunk/busybox/shell/ash.c


Changeset:
Modified: trunk/busybox/libbb/vfork_daemon_rexec.c
===================================================================
--- trunk/busybox/libbb/vfork_daemon_rexec.c	2006-05-19 13:02:27 UTC (rev 15132)
+++ trunk/busybox/libbb/vfork_daemon_rexec.c	2006-05-19 13:12:21 UTC (rev 15133)
@@ -1,3 +1,4 @@
+/* vi: set sw=4 ts=4: */
 /*
  * Rexec program for system have fork() as vfork() with foreground option
  *
@@ -11,19 +12,7 @@
  *
  * Modified for uClibc by Erik Andersen <andersee at debian.org>
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
  */
 
 #include <unistd.h>
@@ -46,7 +35,7 @@
 	if (!nochdir)
 		chdir("/");
 
-	if (!noclose && (fd = open(_PATH_DEVNULL, O_RDWR, 0)) != -1) {
+	if (!noclose && (fd = open(bb_dev_null, O_RDWR, 0)) != -1) {
 		dup2(fd, STDIN_FILENO);
 		dup2(fd, STDOUT_FILENO);
 		dup2(fd, STDERR_FILENO);

Modified: trunk/busybox/networking/udhcp/common.c
===================================================================
--- trunk/busybox/networking/udhcp/common.c	2006-05-19 13:02:27 UTC (rev 15132)
+++ trunk/busybox/networking/udhcp/common.c	2006-05-19 13:12:21 UTC (rev 15133)
@@ -42,8 +42,10 @@
 static inline void sanitize_fds(void)
 {
 	int zero;
-	if ((zero = open(_PATH_DEVNULL, O_RDWR, 0)) < 0) return;
-	while (zero < 3) zero = dup(zero);
+	if ((zero = open(bb_dev_null, O_RDWR, 0)) < 0)
+		return;
+	while (zero < 3)
+		zero = dup(zero);
 	close(zero);
 }
 
@@ -76,7 +78,7 @@
 
 	va_start(p, fmt);
 	__va_copy(p2, p);
-	if(!daemonized) {
+	if (!daemonized) {
 		vprintf(fmt, p);
 		putchar('\n');
 	}
@@ -103,7 +105,7 @@
 	va_list p;
 
 	va_start(p, fmt);
-	if(!daemonized) {
+	if (!daemonized) {
 		printf("%s, ", syslog_level_msg[level]);
 		vprintf(fmt, p);
 		putchar('\n');

Modified: trunk/busybox/shell/ash.c
===================================================================
--- trunk/busybox/shell/ash.c	2006-05-19 13:02:27 UTC (rev 15132)
+++ trunk/busybox/shell/ash.c	2006-05-19 13:12:21 UTC (rev 15133)
@@ -7147,8 +7147,8 @@
 		ignoresig(SIGQUIT);
 		if (jp->nprocs == 0) {
 			close(0);
-			if (open(_PATH_DEVNULL, O_RDONLY) != 0)
-				sh_error("Can't open %s", _PATH_DEVNULL);
+			if (open(bb_dev_null, O_RDONLY) != 0)
+				sh_error("Can't open %s", bb_dev_null);
 		}
 	}
 	if (!oldlvl && iflag) {




More information about the busybox-cvs mailing list