aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--archival/gzip.c2
-rw-r--r--coreutils/tail.c2
-rw-r--r--networking/tftp.c4
-rw-r--r--networking/wget.c4
-rw-r--r--patches/tftp_timeout_multicast.diff2
-rw-r--r--util-linux/fdformat.c2
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)
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);
}
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)
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;
}
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,
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 @@ static inline int tftp(const int cmd, const struct hostent *host,
len = bb_full_write(localfd, &buf[4], len - 4);
if (len < 0) {
- bb_perror_msg("write");
+ bb_perror_msg(bb_msg_write_error);
break;
}
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:
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 @@ read_response:
}
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
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
+ 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);
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)
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);
}