diff options
-rw-r--r-- | archival/gzip.c | 2 | ||||
-rw-r--r-- | coreutils/tail.c | 2 | ||||
-rw-r--r-- | networking/tftp.c | 4 | ||||
-rw-r--r-- | networking/wget.c | 4 | ||||
-rw-r--r-- | patches/tftp_timeout_multicast.diff | 2 | ||||
-rw-r--r-- | util-linux/fdformat.c | 2 |
6 files changed, 8 insertions, 8 deletions
diff --git a/archival/gzip.c b/archival/gzip.c index 4f60c6b24..91b294891 100644 --- a/archival/gzip.c +++ b/archival/gzip.c | |||
@@ -324,7 +324,7 @@ static void write_buf(int fd, void *buf, unsigned cnt) | |||
324 | unsigned n; | 324 | unsigned n; |
325 | 325 | ||
326 | while ((n = write(fd, buf, cnt)) != cnt) { | 326 | while ((n = write(fd, buf, cnt)) != cnt) { |
327 | if (n == (unsigned) (-1)) bb_error_msg_and_die("can't write"); | 327 | if (n == (unsigned) (-1)) bb_error_msg_and_die(bb_msg_write_error); |
328 | cnt -= n; | 328 | cnt -= n; |
329 | buf = (void *) ((char *) buf + n); | 329 | buf = (void *) ((char *) buf + n); |
330 | } | 330 | } |
diff --git a/coreutils/tail.c b/coreutils/tail.c index 48abc4b84..e63406e31 100644 --- a/coreutils/tail.c +++ b/coreutils/tail.c | |||
@@ -70,7 +70,7 @@ static ssize_t tail_read(int fd, char *buf, size_t count) | |||
70 | end = sbuf.st_size; | 70 | end = sbuf.st_size; |
71 | lseek(fd, end < current ? 0 : current, SEEK_SET); | 71 | lseek(fd, end < current ? 0 : current, SEEK_SET); |
72 | if ((r = safe_read(fd, buf, count)) < 0) { | 72 | if ((r = safe_read(fd, buf, count)) < 0) { |
73 | bb_perror_msg("read"); | 73 | bb_perror_msg(bb_msg_read_error); |
74 | status = EXIT_FAILURE; | 74 | status = EXIT_FAILURE; |
75 | } | 75 | } |
76 | 76 | ||
diff --git a/networking/tftp.c b/networking/tftp.c index bdba16727..73a5adae5 100644 --- a/networking/tftp.c +++ b/networking/tftp.c | |||
@@ -266,7 +266,7 @@ static inline int tftp(const int cmd, const struct hostent *host, | |||
266 | len = bb_full_read(localfd, cp, tftp_bufsize - 4); | 266 | len = bb_full_read(localfd, cp, tftp_bufsize - 4); |
267 | 267 | ||
268 | if (len < 0) { | 268 | if (len < 0) { |
269 | bb_perror_msg("read"); | 269 | bb_perror_msg(bb_msg_read_error); |
270 | break; | 270 | break; |
271 | } | 271 | } |
272 | 272 | ||
@@ -443,7 +443,7 @@ static inline int tftp(const int cmd, const struct hostent *host, | |||
443 | len = bb_full_write(localfd, &buf[4], len - 4); | 443 | len = bb_full_write(localfd, &buf[4], len - 4); |
444 | 444 | ||
445 | if (len < 0) { | 445 | if (len < 0) { |
446 | bb_perror_msg("write"); | 446 | bb_perror_msg(bb_msg_write_error); |
447 | break; | 447 | break; |
448 | } | 448 | } |
449 | 449 | ||
diff --git a/networking/wget.c b/networking/wget.c index 6cab1ba46..4b5b3192d 100644 --- a/networking/wget.c +++ b/networking/wget.c | |||
@@ -512,7 +512,7 @@ read_response: | |||
512 | do { | 512 | do { |
513 | while ((filesize > 0 || !got_clen) && (n = safe_fread(buf, 1, ((chunked || got_clen) && (filesize < sizeof(buf)) ? filesize : sizeof(buf)), dfp)) > 0) { | 513 | while ((filesize > 0 || !got_clen) && (n = safe_fread(buf, 1, ((chunked || got_clen) && (filesize < sizeof(buf)) ? filesize : sizeof(buf)), dfp)) > 0) { |
514 | if (safe_fwrite(buf, 1, n, output) != n) { | 514 | if (safe_fwrite(buf, 1, n, output) != n) { |
515 | bb_perror_msg_and_die("write error"); | 515 | bb_perror_msg_and_die(bb_msg_write_error); |
516 | } | 516 | } |
517 | #ifdef CONFIG_FEATURE_WGET_STATUSBAR | 517 | #ifdef CONFIG_FEATURE_WGET_STATUSBAR |
518 | statbytes+=n; | 518 | statbytes+=n; |
@@ -532,7 +532,7 @@ read_response: | |||
532 | } | 532 | } |
533 | 533 | ||
534 | if (n == 0 && ferror(dfp)) { | 534 | if (n == 0 && ferror(dfp)) { |
535 | bb_perror_msg_and_die("network read error"); | 535 | bb_perror_msg_and_die(bb_msg_read_error); |
536 | } | 536 | } |
537 | } while (chunked); | 537 | } while (chunked); |
538 | #ifdef CONFIG_FEATURE_WGET_STATUSBAR | 538 | #ifdef CONFIG_FEATURE_WGET_STATUSBAR |
diff --git a/patches/tftp_timeout_multicast.diff b/patches/tftp_timeout_multicast.diff index ca431fc60..5147a6714 100644 --- a/patches/tftp_timeout_multicast.diff +++ b/patches/tftp_timeout_multicast.diff | |||
@@ -848,7 +848,7 @@ diff -u -r1.25 tftp.c | |||
848 | + lseek(localfd, bn*(tftp_bufsize-4), SEEK_SET); | 848 | + lseek(localfd, bn*(tftp_bufsize-4), SEEK_SET); |
849 | + len = write(localfd, &buf[4], len-4); | 849 | + len = write(localfd, &buf[4], len-4); |
850 | + if (len < 0) { | 850 | + if (len < 0) { |
851 | + bb_perror_msg("write"); | 851 | + bb_perror_msg(bb_msg_write_error); |
852 | + break; | 852 | + break; |
853 | + } | 853 | + } |
854 | + bit_set(bn, mcblockmap); | 854 | + bit_set(bn, mcblockmap); |
diff --git a/util-linux/fdformat.c b/util-linux/fdformat.c index 5772e1309..691280833 100644 --- a/util-linux/fdformat.c +++ b/util-linux/fdformat.c | |||
@@ -133,7 +133,7 @@ int fdformat_main(int argc,char **argv) | |||
133 | print_and_flush("%3d\b\b\b", cyl); | 133 | print_and_flush("%3d\b\b\b", cyl); |
134 | if((read_bytes = safe_read(fd,data,n))!= n ) { | 134 | if((read_bytes = safe_read(fd,data,n))!= n ) { |
135 | if(read_bytes < 0) { | 135 | if(read_bytes < 0) { |
136 | bb_perror_msg("Read: "); | 136 | bb_perror_msg(bb_msg_read_error); |
137 | } | 137 | } |
138 | bb_error_msg_and_die("Problem reading cylinder %d, expected %d, read %d", cyl, n, read_bytes); | 138 | bb_error_msg_and_die("Problem reading cylinder %d, expected %d, read %d", cyl, n, read_bytes); |
139 | } | 139 | } |