diff options
-rw-r--r-- | networking/tftp.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/networking/tftp.c b/networking/tftp.c index 0bc562dd0..f00b64bf2 100644 --- a/networking/tftp.c +++ b/networking/tftp.c | |||
@@ -292,10 +292,10 @@ static inline int tftp(const int cmd, const struct hostent *host, | |||
292 | len = cp - buf; | 292 | len = cp - buf; |
293 | 293 | ||
294 | #ifdef CONFIG_FEATURE_TFTP_DEBUG | 294 | #ifdef CONFIG_FEATURE_TFTP_DEBUG |
295 | printf("sending %u bytes\n", len); | 295 | fprintf(stderr, "sending %u bytes\n", len); |
296 | for (cp = buf; cp < &buf[len]; cp++) | 296 | for (cp = buf; cp < &buf[len]; cp++) |
297 | printf("%02x ", *cp); | 297 | fprintf(stderr, "%02x ", *cp); |
298 | printf("\n"); | 298 | fprintf(stderr, "\n"); |
299 | #endif | 299 | #endif |
300 | if (sendto(socketfd, buf, len, 0, | 300 | if (sendto(socketfd, buf, len, 0, |
301 | (struct sockaddr *) &sa, sizeof(sa)) < 0) { | 301 | (struct sockaddr *) &sa, sizeof(sa)) < 0) { |
@@ -371,7 +371,7 @@ static inline int tftp(const int cmd, const struct hostent *host, | |||
371 | tmp = ntohs(*((unsigned short *) &buf[2])); | 371 | tmp = ntohs(*((unsigned short *) &buf[2])); |
372 | 372 | ||
373 | #ifdef CONFIG_FEATURE_TFTP_DEBUG | 373 | #ifdef CONFIG_FEATURE_TFTP_DEBUG |
374 | printf("received %d bytes: %04x %04x\n", len, opcode, tmp); | 374 | fprintf(stderr, "received %d bytes: %04x %04x\n", len, opcode, tmp); |
375 | #endif | 375 | #endif |
376 | 376 | ||
377 | if (opcode == TFTP_ERROR) { | 377 | if (opcode == TFTP_ERROR) { |
@@ -420,7 +420,7 @@ static inline int tftp(const int cmd, const struct hostent *host, | |||
420 | opcode = TFTP_ACK; | 420 | opcode = TFTP_ACK; |
421 | } | 421 | } |
422 | #ifdef CONFIG_FEATURE_TFTP_DEBUG | 422 | #ifdef CONFIG_FEATURE_TFTP_DEBUG |
423 | printf("using blksize %u\n", blksize); | 423 | fprintf(stderr, "using blksize %u\n", blksize); |
424 | #endif | 424 | #endif |
425 | tftp_bufsize = blksize + 4; | 425 | tftp_bufsize = blksize + 4; |
426 | block_nr = 0; | 426 | block_nr = 0; |
@@ -567,7 +567,7 @@ int tftp_main(int argc, char **argv) | |||
567 | port = bb_lookup_port(argv[optind + 1], "udp", 69); | 567 | port = bb_lookup_port(argv[optind + 1], "udp", 69); |
568 | 568 | ||
569 | #ifdef CONFIG_FEATURE_TFTP_DEBUG | 569 | #ifdef CONFIG_FEATURE_TFTP_DEBUG |
570 | printf("using server \"%s\", remotefile \"%s\", " | 570 | fprintf(stderr, "using server \"%s\", remotefile \"%s\", " |
571 | "localfile \"%s\".\n", | 571 | "localfile \"%s\".\n", |
572 | inet_ntoa(*((struct in_addr *) host->h_addr)), | 572 | inet_ntoa(*((struct in_addr *) host->h_addr)), |
573 | remotefile, localfile); | 573 | remotefile, localfile); |