svn commit: trunk/busybox: archival coreutils networking patches ut etc...

aldot at busybox.net aldot at busybox.net
Sat Jun 3 22:45:41 UTC 2006


Author: aldot
Date: 2006-06-03 15:45:37 -0700 (Sat, 03 Jun 2006)
New Revision: 15279

Log:
- use bb_msg_{read,write}_error where appropriate.
   text	   data	    bss	    dec	    hex	filename
 825015	   9100	 645216	1479331	 1692a3	busybox.old
 824919	   9100	 645216	1479235	 169243	busybox


Modified:
   trunk/busybox/archival/gzip.c
   trunk/busybox/coreutils/tail.c
   trunk/busybox/networking/tftp.c
   trunk/busybox/networking/wget.c
   trunk/busybox/patches/tftp_timeout_multicast.diff
   trunk/busybox/util-linux/fdformat.c


Changeset:
Modified: trunk/busybox/archival/gzip.c
===================================================================
--- trunk/busybox/archival/gzip.c	2006-06-03 21:40:11 UTC (rev 15278)
+++ trunk/busybox/archival/gzip.c	2006-06-03 22:45:37 UTC (rev 15279)
@@ -324,7 +324,7 @@
 	unsigned n;
 
 	while ((n = write(fd, buf, cnt)) != cnt) {
-		if (n == (unsigned) (-1)) bb_error_msg_and_die("can't write");
+		if (n == (unsigned) (-1)) bb_error_msg_and_die(bb_msg_write_error);
 		cnt -= n;
 		buf = (void *) ((char *) buf + n);
 	}

Modified: trunk/busybox/coreutils/tail.c
===================================================================
--- trunk/busybox/coreutils/tail.c	2006-06-03 21:40:11 UTC (rev 15278)
+++ trunk/busybox/coreutils/tail.c	2006-06-03 22:45:37 UTC (rev 15279)
@@ -70,7 +70,7 @@
 		end = sbuf.st_size;
 	lseek(fd, end < current ? 0 : current, SEEK_SET);
 	if ((r = safe_read(fd, buf, count)) < 0) {
-		bb_perror_msg("read");
+		bb_perror_msg(bb_msg_read_error);
 		status = EXIT_FAILURE;
 	}
 

Modified: trunk/busybox/networking/tftp.c
===================================================================
--- trunk/busybox/networking/tftp.c	2006-06-03 21:40:11 UTC (rev 15278)
+++ trunk/busybox/networking/tftp.c	2006-06-03 22:45:37 UTC (rev 15279)
@@ -266,7 +266,7 @@
 				len = bb_full_read(localfd, cp, tftp_bufsize - 4);
 
 				if (len < 0) {
-					bb_perror_msg("read");
+					bb_perror_msg(bb_msg_read_error);
 					break;
 				}
 
@@ -443,7 +443,7 @@
 				len = bb_full_write(localfd, &buf[4], len - 4);
 
 				if (len < 0) {
-					bb_perror_msg("write");
+					bb_perror_msg(bb_msg_write_error);
 					break;
 				}
 

Modified: trunk/busybox/networking/wget.c
===================================================================
--- trunk/busybox/networking/wget.c	2006-06-03 21:40:11 UTC (rev 15278)
+++ trunk/busybox/networking/wget.c	2006-06-03 22:45:37 UTC (rev 15279)
@@ -512,7 +512,7 @@
 	do {
 		while ((filesize > 0 || !got_clen) && (n = safe_fread(buf, 1, ((chunked || got_clen) && (filesize < sizeof(buf)) ? filesize : sizeof(buf)), dfp)) > 0) {
 			if (safe_fwrite(buf, 1, n, output) != n) {
-				bb_perror_msg_and_die("write error");
+				bb_perror_msg_and_die(bb_msg_write_error);
 			}
 #ifdef CONFIG_FEATURE_WGET_STATUSBAR
 			statbytes+=n;
@@ -532,7 +532,7 @@
 		}
 
 		if (n == 0 && ferror(dfp)) {
-			bb_perror_msg_and_die("network read error");
+			bb_perror_msg_and_die(bb_msg_read_error);
 		}
 	} while (chunked);
 #ifdef CONFIG_FEATURE_WGET_STATUSBAR

Modified: trunk/busybox/patches/tftp_timeout_multicast.diff
===================================================================
--- trunk/busybox/patches/tftp_timeout_multicast.diff	2006-06-03 21:40:11 UTC (rev 15278)
+++ trunk/busybox/patches/tftp_timeout_multicast.diff	2006-06-03 22:45:37 UTC (rev 15279)
@@ -848,7 +848,7 @@
 +					lseek(localfd, bn*(tftp_bufsize-4), SEEK_SET);
 +					len = write(localfd, &buf[4], len-4);
 +					if (len < 0) {
-+						bb_perror_msg("write");
++						bb_perror_msg(bb_msg_write_error);
 +						break;
 +					}
 +					bit_set(bn, mcblockmap);

Modified: trunk/busybox/util-linux/fdformat.c
===================================================================
--- trunk/busybox/util-linux/fdformat.c	2006-06-03 21:40:11 UTC (rev 15278)
+++ trunk/busybox/util-linux/fdformat.c	2006-06-03 22:45:37 UTC (rev 15279)
@@ -133,7 +133,7 @@
 			print_and_flush("%3d\b\b\b", cyl);
 			if((read_bytes = safe_read(fd,data,n))!= n ) {
 				if(read_bytes < 0) {
-					bb_perror_msg("Read: ");
+					bb_perror_msg(bb_msg_read_error);
 				}
 				bb_error_msg_and_die("Problem reading cylinder %d, expected %d, read %d", cyl, n, read_bytes);
 			}




More information about the busybox-cvs mailing list