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:
le 2004-03-09 10:02:44 +00:00
parent 268956cf00
commit 8cac80f8c9

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.