[or-cvs] make the warn message better for reading short files

Roger Dingledine arma at seul.org
Tue Sep 28 08:40:06 UTC 2004


Update of /home/or/cvsroot/src/common
In directory moria.mit.edu:/home2/arma/work/onion/cvs/src/common

Modified Files:
	util.c 
Log Message:
make the warn message better for reading short files


Index: util.c
===================================================================
RCS file: /home/or/cvsroot/src/common/util.c,v
retrieving revision 1.134
retrieving revision 1.135
diff -u -d -r1.134 -r1.135
--- util.c	26 Sep 2004 16:51:31 -0000	1.134
+++ util.c	28 Sep 2004 08:40:03 -0000	1.135
@@ -1556,8 +1556,8 @@
   } else if (bin && r != statbuf.st_size) {
     /* If we're in binary mode, then we'd better have an exact match for
      * size.  Otherwise, win32 encoding may throw us off, and that's okay. */
-    log_fn(LOG_WARN,"Couldn't read all %ld bytes of file '%s'.",
-           (long)statbuf.st_size,filename);
+    log_fn(LOG_WARN,"Could read only %d of %ld bytes of file '%s'.",
+           r, (long)statbuf.st_size,filename);
     tor_free(string);
     close(fd);
     return NULL;



More information about the tor-commits mailing list