all repos — slstatus @ 0f46c675d326435065dec2dd3a5695bd16201c9f

my build of slstatus (tools.suckless.org/slstatus/)

corrected calculations for disk space on openbsd
Tobias Tschinkowitz he4d@posteo.de
Thu, 17 May 2018 12:43:21 +0200
commit

0f46c675d326435065dec2dd3a5695bd16201c9f

parent

1b3fafd77ed332e423c174f175416e14090cef75

1 files changed, 4 insertions(+), 4 deletions(-)

jump to
M components/disk.ccomponents/disk.c

@@ -17,7 +17,7 @@ return NULL;

} return bprintf("%f", - (float)fs.f_bsize * (float)fs.f_bfree / 1024 / 1024 / 1024); + (float)fs.f_frsize * (float)fs.f_bavail / 1024 / 1024 / 1024); } const char *

@@ -31,7 +31,7 @@ return NULL;

} return bprintf("%d", (int)(100 * - (1.0f - ((float)fs.f_bfree / (float)fs.f_blocks)))); + (1.0f - ((float)fs.f_bavail / (float)fs.f_blocks)))); } const char *

@@ -45,7 +45,7 @@ return NULL;

} return bprintf("%f", - (float)fs.f_bsize * (float)fs.f_blocks / 1024 / 1024 / 1024); + (float)fs.f_frsize * (float)fs.f_blocks / 1024 / 1024 / 1024); } const char *

@@ -59,6 +59,6 @@ return NULL;

} return bprintf("%f", - (float)fs.f_bsize * ((float)fs.f_blocks - + (float)fs.f_frsize * ((float)fs.f_blocks - (float)fs.f_bfree) / 1024 / 1024 / 1024); }