svn commit: trunk/busybox: archival coreutils e2fsprogs e2fsprogs/b etc...

vodz at busybox.net vodz at busybox.net
Wed Oct 12 15:34:37 UTC 2005


Author: vodz
Date: 2005-10-12 08:34:25 -0700 (Wed, 12 Oct 2005)
New Revision: 11846

Log:
usage bb_dev_null

Modified:
   trunk/busybox/archival/gunzip.c
   trunk/busybox/coreutils/nohup.c
   trunk/busybox/e2fsprogs/blkid/cache.c
   trunk/busybox/e2fsprogs/blkid/devname.c
   trunk/busybox/e2fsprogs/blkid/probe.c
   trunk/busybox/e2fsprogs/blkid/resolve.c
   trunk/busybox/e2fsprogs/blkid/save.c
   trunk/busybox/e2fsprogs/e2fsck.c
   trunk/busybox/init/init.c
   trunk/busybox/libbb/messages.c
   trunk/busybox/networking/traceroute.c
   trunk/busybox/shell/msh.c


Changeset:
Modified: trunk/busybox/archival/gunzip.c
===================================================================
--- trunk/busybox/archival/gunzip.c	2005-10-12 15:21:32 UTC (rev 11845)
+++ trunk/busybox/archival/gunzip.c	2005-10-12 15:34:25 UTC (rev 11846)
@@ -116,7 +116,7 @@
 
 		/* Set output filename and number */
 		if (opt & GUNZIP_OPT_TEST) {
-			dst_fd = bb_xopen("/dev/null", O_WRONLY);	/* why does test use filenum 2 ? */
+			dst_fd = bb_xopen(bb_dev_null, O_WRONLY);	/* why does test use filenum 2 ? */
 		} else if (opt & GUNZIP_OPT_STDOUT) {
 			dst_fd = STDOUT_FILENO;
 		} else {

Modified: trunk/busybox/coreutils/nohup.c
===================================================================
--- trunk/busybox/coreutils/nohup.c	2005-10-12 15:21:32 UTC (rev 11845)
+++ trunk/busybox/coreutils/nohup.c	2005-10-12 15:34:25 UTC (rev 11846)
@@ -115,7 +115,7 @@
 	 Note that it is deliberately opened for *writing*,
 	 to ensure any read evokes an error.  */
 	if (isatty (STDIN_FILENO))
-		fd_reopen (STDIN_FILENO, "/dev/null", 0);
+		fd_reopen (STDIN_FILENO, bb_dev_null, 0);
 
 	/* If standard output is a tty, redirect it (appending) to a file.
 	 First try nohup.out, then $HOME/nohup.out.  */

Modified: trunk/busybox/e2fsprogs/blkid/cache.c
===================================================================
--- trunk/busybox/e2fsprogs/blkid/cache.c	2005-10-12 15:21:32 UTC (rev 11845)
+++ trunk/busybox/e2fsprogs/blkid/cache.c	2005-10-12 15:34:25 UTC (rev 11846)
@@ -111,7 +111,7 @@
 			argv[1] ? argv[1] : BLKID_CACHE_FILE);
 		exit(1);
 	}
-	if ((ret = blkid_get_cache(&cache, "/dev/null")) != 0) {
+	if ((ret = blkid_get_cache(&cache, bb_dev_null)) != 0) {
 		fprintf(stderr, "%s: error creating cache (%d)\n",
 			argv[0], ret);
 		exit(1);

Modified: trunk/busybox/e2fsprogs/blkid/devname.c
===================================================================
--- trunk/busybox/e2fsprogs/blkid/devname.c	2005-10-12 15:21:32 UTC (rev 11845)
+++ trunk/busybox/e2fsprogs/blkid/devname.c	2005-10-12 15:34:25 UTC (rev 11846)
@@ -355,7 +355,7 @@
 			"Probe all devices and exit\n", argv[0]);
 		exit(1);
 	}
-	if ((ret = blkid_get_cache(&cache, "/dev/null")) != 0) {
+	if ((ret = blkid_get_cache(&cache, bb_dev_null)) != 0) {
 		fprintf(stderr, "%s: error creating cache (%d)\n",
 			argv[0], ret);
 		exit(1);

Modified: trunk/busybox/e2fsprogs/blkid/probe.c
===================================================================
--- trunk/busybox/e2fsprogs/blkid/probe.c	2005-10-12 15:21:32 UTC (rev 11845)
+++ trunk/busybox/e2fsprogs/blkid/probe.c	2005-10-12 15:34:25 UTC (rev 11846)
@@ -680,7 +680,7 @@
 			"Probe a single device to determine type\n", argv[0]);
 		exit(1);
 	}
-	if ((ret = blkid_get_cache(&cache, "/dev/null")) != 0) {
+	if ((ret = blkid_get_cache(&cache, bb_dev_null)) != 0) {
 		fprintf(stderr, "%s: error creating cache (%d)\n",
 			argv[0], ret);
 		exit(1);

Modified: trunk/busybox/e2fsprogs/blkid/resolve.c
===================================================================
--- trunk/busybox/e2fsprogs/blkid/resolve.c	2005-10-12 15:21:32 UTC (rev 11845)
+++ trunk/busybox/e2fsprogs/blkid/resolve.c	2005-10-12 15:34:25 UTC (rev 11846)
@@ -121,7 +121,7 @@
 			argv[0], argv[0]);
 		exit(1);
 	}
-	if (blkid_get_cache(&cache, "/dev/null") < 0) {
+	if (blkid_get_cache(&cache, bb_dev_null) < 0) {
 		fprintf(stderr, "Couldn't get blkid cache\n");
 		exit(1);
 	}

Modified: trunk/busybox/e2fsprogs/blkid/save.c
===================================================================
--- trunk/busybox/e2fsprogs/blkid/save.c	2005-10-12 15:21:32 UTC (rev 11845)
+++ trunk/busybox/e2fsprogs/blkid/save.c	2005-10-12 15:34:25 UTC (rev 11846)
@@ -166,7 +166,7 @@
 		exit(1);
 	}
 
-	if ((ret = blkid_get_cache(&cache, "/dev/null")) != 0) {
+	if ((ret = blkid_get_cache(&cache, bb_dev_null)) != 0) {
 		fprintf(stderr, "%s: error creating cache (%d)\n",
 			argv[0], ret);
 		exit(1);

Modified: trunk/busybox/e2fsprogs/e2fsck.c
===================================================================
--- trunk/busybox/e2fsprogs/e2fsck.c	2005-10-12 15:21:32 UTC (rev 11845)
+++ trunk/busybox/e2fsprogs/e2fsck.c	2005-10-12 15:34:25 UTC (rev 11846)
@@ -15086,7 +15086,7 @@
 	int     fd;
 
 	while (1) {
-		fd = open("/dev/null", O_RDWR);
+		fd = open(bb_dev_null, O_RDWR);
 		if (fd > 2)
 			break;
 		if (fd < 0) {

Modified: trunk/busybox/init/init.c
===================================================================
--- trunk/busybox/init/init.c	2005-10-12 15:21:32 UTC (rev 11845)
+++ trunk/busybox/init/init.c	2005-10-12 15:34:25 UTC (rev 11846)
@@ -353,7 +353,7 @@
 #ifndef CONFIG_SYSLOGD
 		log_console =
 #endif
-		safe_strncpy(console, "/dev/null", sizeof(console));
+		safe_strncpy(console, bb_dev_null, sizeof(console));
 	} else {
 		s = getenv("TERM");
 		/* check for serial console */
@@ -834,7 +834,7 @@
 	/* do not run entries if console device is not available */
 	if (access(cons, R_OK | W_OK))
 		return;
-	if (strcmp(cons, "/dev/null") == 0 && (action & ASKFIRST))
+	if (strcmp(cons, bb_dev_null) == 0 && (action & ASKFIRST))
 		return;
 
 	new_action = calloc((size_t) (1), sizeof(struct init_action));

Modified: trunk/busybox/libbb/messages.c
===================================================================
--- trunk/busybox/libbb/messages.c	2005-10-12 15:21:32 UTC (rev 11845)
+++ trunk/busybox/libbb/messages.c	2005-10-12 15:34:25 UTC (rev 11846)
@@ -97,7 +97,7 @@
 const char * const bb_default_login_shell = LIBBB_DEFAULT_LOGIN_SHELL;
 #endif
 
-#ifdef L_dev_null
-const char * const bb_dev_null = "dev/null";
+#ifdef L_bb_dev_null
+const char * const bb_dev_null = "/dev/null";
 #endif
 

Modified: trunk/busybox/networking/traceroute.c
===================================================================
--- trunk/busybox/networking/traceroute.c	2005-10-12 15:21:32 UTC (rev 11845)
+++ trunk/busybox/networking/traceroute.c	2005-10-12 15:34:25 UTC (rev 11846)
@@ -321,7 +321,6 @@
 static int pmtu;                       /* Path MTU Discovery (RFC1191) */
 
 static char *hostname;
-static const char devnull[] = "/dev/null";
 
 static u_short ident;
 static u_short port = 32768 + 666;     /* start udp dest port # for probe packets */
@@ -1090,7 +1089,7 @@
 		bb_perror_msg_and_die("unknown protocol %s", cp);
 
 	/* Insure the socket fds won't be 0, 1 or 2 */
-	do n = bb_xopen(devnull, O_RDONLY); while (n < 2);
+	do n = bb_xopen(bb_dev_null, O_RDONLY); while (n < 2);
 	if (n > 2)
 		close(n);
 

Modified: trunk/busybox/shell/msh.c
===================================================================
--- trunk/busybox/shell/msh.c	2005-10-12 15:21:32 UTC (rev 11845)
+++ trunk/busybox/shell/msh.c	2005-10-12 15:34:25 UTC (rev 11846)
@@ -2714,7 +2714,7 @@
 				interactive = 0;
 				if (pin == NULL) {
 					close(0);
-					open("/dev/null", 0);
+					open(bb_dev_null, 0);
 				}
 				_exit(execute(t->left, pin, pout, FEXEC));
 			}




More information about the busybox-cvs mailing list