And a bandaid so that the output of "available space" is correct when

using -m and -g switches and "available space" is negative (i.e. when
the file system is already using the root-reserved minimum free space).

Obtained from:   Stefan Farfeleder <stefan@fafoe.narf.at>
PR:              bin/62536
Submitted by:    Peter van Dijk <peter@dataloss.nl>
Approved by:     grog (mentor), bde
This commit is contained in:
Lukas Ertl 2004-03-09 10:02:44 +00:00
parent 664e22ad1e
commit ae21f5ad2c
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=126770

View File

@ -400,7 +400,8 @@ prthumanval(double bytes)
*/
#define fsbtoblk(num, fsbs, bs) \
(((fsbs) != 0 && (fsbs) < (bs)) ? \
(num) / ((bs) / (fsbs)) : (num) * ((fsbs) / (bs)))
(num) / (intmax_t)((bs) / (fsbs)) : \
(num) * (intmax_t)((fsbs) / (bs)))
/*
* Print out status about a file system.