From ae21f5ad2c4e82dab9ed96ed947f04a87916ae37 Mon Sep 17 00:00:00 2001 From: Lukas Ertl Date: Tue, 9 Mar 2004 10:02:44 +0000 Subject: [PATCH] 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 PR: bin/62536 Submitted by: Peter van Dijk Approved by: grog (mentor), bde --- bin/df/df.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/df/df.c b/bin/df/df.c index 2147e781336..830f49a4405 100644 --- a/bin/df/df.c +++ b/bin/df/df.c @@ -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.