Commit 05fe9a37 authored by Barry Perlman's avatar Barry Perlman Committed by Yoni Fogel

[t:2499] Set errno so that brtloader's bl_fwrite() function gets correct error...

[t:2499] Set errno so that brtloader's bl_fwrite() function gets correct error return if the real fwrite() produces an error.

git-svn-id: file:///svn/toku/tokudb@19934 c7de825b-a66e-492c-adef-691d508d4ae1
parent adab6c18
...@@ -93,6 +93,9 @@ static size_t bad_fwrite (const void *ptr, size_t size, size_t nmemb, FILE *stre ...@@ -93,6 +93,9 @@ static size_t bad_fwrite (const void *ptr, size_t size, size_t nmemb, FILE *stre
r = -1; r = -1;
} else { } else {
r = fwrite(ptr, size, nmemb, stream); r = fwrite(ptr, size, nmemb, stream);
if (r!=nmemb) {
errno = ferror(stream);
}
} }
return r; return r;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment