diff options
author | Glenn L McGrath <bug1@ihug.co.nz> | 2004-02-22 07:20:25 +0000 |
---|---|---|
committer | Glenn L McGrath <bug1@ihug.co.nz> | 2004-02-22 07:20:25 +0000 |
commit | d33278dea5667e24c35a5704b38b6b96deb2b648 (patch) | |
tree | 65e655f1099f5899365486aa1207dc6ccedc792e /networking | |
parent | 34e1469f2483ebf0c2177c44e8b9e2354bae7643 (diff) |
Patch from Hideki IWAMOTO, output debugging messages to stderr
Diffstat (limited to 'networking')
-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, len = cp - buf; #ifdef CONFIG_FEATURE_TFTP_DEBUG - printf("sending %u bytes\n", len); + fprintf(stderr, "sending %u bytes\n", len); for (cp = buf; cp < &buf[len]; cp++) - printf("%02x ", *cp); - printf("\n"); + fprintf(stderr, "%02x ", *cp); + fprintf(stderr, "\n"); #endif if (sendto(socketfd, buf, len, 0, (struct sockaddr *) &sa, sizeof(sa)) < 0) { @@ -371,7 +371,7 @@ static inline int tftp(const int cmd, const struct hostent *host, tmp = ntohs(*((unsigned short *) &buf[2])); #ifdef CONFIG_FEATURE_TFTP_DEBUG - printf("received %d bytes: %04x %04x\n", len, opcode, tmp); + fprintf(stderr, "received %d bytes: %04x %04x\n", len, opcode, tmp); #endif if (opcode == TFTP_ERROR) { @@ -420,7 +420,7 @@ static inline int tftp(const int cmd, const struct hostent *host, opcode = TFTP_ACK; } #ifdef CONFIG_FEATURE_TFTP_DEBUG - printf("using blksize %u\n", blksize); + fprintf(stderr, "using blksize %u\n", blksize); #endif tftp_bufsize = blksize + 4; block_nr = 0; @@ -567,7 +567,7 @@ int tftp_main(int argc, char **argv) port = bb_lookup_port(argv[optind + 1], "udp", 69); #ifdef CONFIG_FEATURE_TFTP_DEBUG - printf("using server \"%s\", remotefile \"%s\", " + fprintf(stderr, "using server \"%s\", remotefile \"%s\", " "localfile \"%s\".\n", inet_ntoa(*((struct in_addr *) host->h_addr)), remotefile, localfile); |