aboutsummaryrefslogtreecommitdiffstats
path: root/src/nnn.c
diff options
context:
space:
mode:
authorGravatar Arun Prakash Jana <engineerarun@gmail.com>2020-01-17 20:08:45 +0530
committerGravatar Arun Prakash Jana <engineerarun@gmail.com>2020-01-17 20:08:45 +0530
commit679374680fa8b961a30e5af47b779153f32734ad (patch)
treeee7f53eed3381f25df1f6501a7dfe7b8c43f1d54 /src/nnn.c
parent64667b377d132cd915d128d91c2ab7b38c1ba683 (diff)
downloadnnn-679374680fa8b961a30e5af47b779153f32734ad.tar.gz
Revert "Revert "Fixed calculation of capacity on OpenBSD (#441)""
This reverts commit 681b22d5c76356912fe29eb5769a92634329ad9b. 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.
Diffstat (limited to 'src/nnn.c')
-rw-r--r--src/nnn.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nnn.c b/src/nnn.c
index 6bf40b8..43fd107 100644
--- a/src/nnn.c
+++ b/src/nnn.c
@@ -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));
}