diff options
-rw-r--r-- | networking/tftp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/networking/tftp.c b/networking/tftp.c index bfa9897b9..02ddb4ded 100644 --- a/networking/tftp.c +++ b/networking/tftp.c | |||
@@ -267,7 +267,7 @@ static inline int tftp(const int cmd, const struct hostent *host, | |||
267 | block_nr++; | 267 | block_nr++; |
268 | 268 | ||
269 | if (cmd_put && (opcode == TFTP_DATA)) { | 269 | if (cmd_put && (opcode == TFTP_DATA)) { |
270 | len = read(localfd, cp, tftp_bufsize - 4); | 270 | len = bb_full_read(localfd, cp, tftp_bufsize - 4); |
271 | 271 | ||
272 | if (len < 0) { | 272 | if (len < 0) { |
273 | bb_perror_msg("read"); | 273 | bb_perror_msg("read"); |
@@ -444,7 +444,7 @@ static inline int tftp(const int cmd, const struct hostent *host, | |||
444 | 444 | ||
445 | if (tmp == block_nr) { | 445 | if (tmp == block_nr) { |
446 | 446 | ||
447 | len = write(localfd, &buf[4], len - 4); | 447 | len = bb_full_write(localfd, &buf[4], len - 4); |
448 | 448 | ||
449 | if (len < 0) { | 449 | if (len < 0) { |
450 | bb_perror_msg("write"); | 450 | bb_perror_msg("write"); |