[BusyBox-cvs] busybox/networking tftp.c,1.22,1.23
Glenn McGrath
bug1 at busybox.net
Sun Feb 22 07:20:28 UTC 2004
Update of /var/cvs/busybox/networking
In directory nail:/tmp/cvs-serv31342/networking
Modified Files:
tftp.c
Log Message:
Patch from Hideki IWAMOTO, output debugging messages to stderr
Index: tftp.c
===================================================================
RCS file: /var/cvs/busybox/networking/tftp.c,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -d -r1.22 -r1.23
--- a/tftp.c 22 Feb 2004 03:33:53 -0000 1.22
+++ b/tftp.c 22 Feb 2004 07:20:25 -0000 1.23
@@ -292,10 +292,10 @@
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 @@
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 @@
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 @@
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);
More information about the busybox-cvs
mailing list