From 8cac80f8c91692e1a00be9fb82406aa24f2d6c4d Mon Sep 17 00:00:00 2001 From: le Date: Tue, 9 Mar 2004 10:02:44 +0000 Subject: 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(-) (limited to 'bin/df/df.c') diff --git a/bin/df/df.c b/bin/df/df.c index 2147e78..830f49a 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. -- cgit v1.1