Merge pull request #1386 from uestczyh222/master

[Components][DFS]fix if disk free more than 4GB
This commit is contained in:
Bernard Xiong 2018-04-27 19:44:00 +08:00 committed by GitHub
commit aaece70c25
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -554,8 +554,8 @@ int df(const char *path)
return -1;
}
cap = buffer.f_bsize * buffer.f_bfree / 1024;
for (unit_index = 0; unit_index < 3; unit_index ++)
cap = ((long long)buffer.f_bsize) * ((long long)buffer.f_bfree) / 1024LL;
for (unit_index = 0; unit_index < 2; unit_index ++)
{
if (cap < 1024) break;