summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2004-09-28 08:40:03 +0000
committerRoger Dingledine <arma@torproject.org>2004-09-28 08:40:03 +0000
commit1e3b9e7d31fd60e40ff996740a9ee370946a3a8f (patch)
treee9dc3e38a0a4567f1d7acb806e0b9ea6c3c7959d
parent0d2f9b9b4b9c74fffcb5e47126ccb7f3cd535538 (diff)
downloadtor-1e3b9e7d31fd60e40ff996740a9ee370946a3a8f.tar.gz
tor-1e3b9e7d31fd60e40ff996740a9ee370946a3a8f.zip
make the warn message better for reading short files
svn:r2385
-rw-r--r--src/common/util.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/common/util.c b/src/common/util.c
index 00a7587790..6dd06c7ce6 100644
--- a/src/common/util.c
+++ b/src/common/util.c
@@ -1556,8 +1556,8 @@ char *read_file_to_str(const char *filename, int bin) {
} 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;