summaryrefslogtreecommitdiffstats
path: root/bin/df
diff options
context:
space:
mode:
authorle <le@FreeBSD.org>2004-03-09 10:02:44 +0000
committerle <le@FreeBSD.org>2004-03-09 10:02:44 +0000
commit8cac80f8c91692e1a00be9fb82406aa24f2d6c4d (patch)
tree5a6441a5e9d936831ca78d0872800c28e00e91cc /bin/df
parent268956cf00733a20994a257be6eac3cef680855b (diff)
downloadFreeBSD-src-8cac80f8c91692e1a00be9fb82406aa24f2d6c4d.zip
FreeBSD-src-8cac80f8c91692e1a00be9fb82406aa24f2d6c4d.tar.gz
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
Diffstat (limited to 'bin/df')
-rw-r--r--bin/df/df.c3
1 files changed, 2 insertions, 1 deletions
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.
OpenPOWER on IntegriCloud