Revert "Revert "Fixed calculation of capacity on OpenBSD (#441)""

This reverts commit 681b22d5c7.

The statvfs man page:
http://man7.org/linux/man-pages/man3/statvfs.3.html

says clearly:

fsblkcnt_t     f_blocks;   /* Size of fs in f_frsize units */

I missed this earlier.
This commit is contained in:
Arun Prakash Jana 2020-01-17 20:08:45 +05:30
parent 64667b377d
commit 679374680f
1 changed files with 1 additions and 1 deletions

View File

@ -3281,7 +3281,7 @@ static size_t get_fs_info(const char *path, bool type)
return 0;
if (type == CAPACITY)
return svb.f_blocks << ffs((int)(svb.f_bsize >> 1));
return svb.f_blocks << ffs((int)(svb.f_frsize >> 1));
return svb.f_bavail << ffs((int)(svb.f_frsize >> 1));
}