Merge "Use f_bavail to calculate free space"

This commit is contained in:
Tao Bao
2015-05-29 06:21:06 +00:00
committed by Gerrit Code Review
+1 -1
View File
@@ -662,7 +662,7 @@ size_t FreeSpaceForFile(const char* filename) {
printf("failed to statfs %s: %s\n", filename, strerror(errno)); printf("failed to statfs %s: %s\n", filename, strerror(errno));
return -1; return -1;
} }
return sf.f_bsize * sf.f_bfree; return sf.f_bsize * sf.f_bavail;
} }
int CacheSizeCheck(size_t bytes) { int CacheSizeCheck(size_t bytes) {