]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
make the warn message better for reading short files
authorRoger Dingledine <arma@torproject.org>
Tue, 28 Sep 2004 08:40:03 +0000 (08:40 +0000)
committerRoger Dingledine <arma@torproject.org>
Tue, 28 Sep 2004 08:40:03 +0000 (08:40 +0000)
svn:r2385

src/common/util.c

index 00a7587790919273f5b036f2ce7468f2adc67582..6dd06c7ce65fbaa07119a22dbdd4c50ec67885ad 100644 (file)
@@ -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;