Commit Graph

121 Commits

Author SHA1 Message Date
christos fe8677c354 Document non-literal formats 2011-08-14 10:53:16 +00:00
joerg f95fad15ff \\ -> \e 2010-04-05 21:16:21 +00:00
mlelstv 61ace358f2 block numbers are measured in f_frsize units. Make -P option
use this instead of f_bsize. Also account for reserved blocks
like normal non-P output.
Fixes PR bin/41541.
2009-06-06 09:30:45 +00:00
lukem 46b57afcf7 Default to WARNS=4 (except for rcp & ksh) 2009-02-14 08:31:13 +00:00
lukem 4a566726c2 sign-compare fix for amd64 2009-01-25 14:18:21 +00:00
lukem c6144e484f fix -Wsign-compare issues 2009-01-18 00:24:29 +00:00
lukem 2fe2731d3f Remove the \n and tabs from the __COPYRIGHT() strings. 2008-07-20 00:52:39 +00:00
christos 9655f5c24c PR/38755: murray armfield: /bin posix programs missing setprogname and/or
setlocale
2008-05-26 14:21:08 +00:00
christos 935753c811 sort options from anon ymous 2008-03-04 20:11:00 +00:00
christos 7d01361f62 do the -g -G swap for real. 2008-03-04 18:55:57 +00:00
christos 7ca37f5cdc PR/36817: Zafer Aydogan: Don't use -g to implement the same named option
in solaris to display statvfs output, use -G instead. I researched this
and all other implementations except Solaris (OS/X, FreeBSD, us before June
24, 2007) use -g to signify gigabytes. So revert to that.
PR/38154: YAMAMOTO Takashi: df -P doesn't work without -k. Fix from Anon Ymous
together with passing lint, and exiting with the right values.
2008-03-04 17:59:55 +00:00
yamt a9b7c5b63a restore whitespace between 'Filesystem' and 'blocks'. 2008-03-04 09:03:28 +00:00
yamt 16d01d9a96 prtstat: PRIdMAX -> jd as suggested by Joerg Sonnenberger. 2007-12-22 00:23:36 +00:00
yamt c7bc0cd0aa don't cast 64bit values to u_long. 2007-12-21 06:43:26 +00:00
christos fede0a77fc kill MFSNAMELEN 2007-07-17 20:03:10 +00:00
christos 94ae12d450 Fix '-Ph' segfault; from Greg Woods 2007-07-16 14:39:53 +00:00
christos 84c48917b8 spacing fixes from Geoff Wing 2007-07-03 14:39:47 +00:00
christos 98d594125d PR/36541: Greg A. Woods: fix -P option, and add solaris -g option. 2007-06-24 01:52:46 +00:00
wiz 330b2b8ebd Improve wording of -a description. From FreeBSD via Zafer Aydogan. 2007-01-28 09:56:13 +00:00
christos ccd5bfd356 fix formatting of df -h; from Zafer. 2006-09-04 16:32:57 +00:00
christos b65b7f50b1 -h and -[mgk] are mutually exclusive. Only use the last specified. [from zafer]
Use one variable instead of 3 flags to hold the scale, so that we don't have
to reset each flag.
2006-08-21 19:05:14 +00:00
rumble 3ad5f13d80 Handle malloc returning NULL. 2006-03-17 13:53:31 +00:00
elad f909cee7d7 PR/23688: don't say we're printing in 1k-blocks if -h was also specified. 2006-01-13 14:07:57 +00:00
christos f85aae5649 PR/32103: Zafer Aydogan: Fix references to obsolete fstatfs and getfsstat 2005-11-18 05:04:24 +00:00
christos 6310b59691 sprinkle a little const, and now everything compiles with WARNS=3 2005-06-26 19:10:48 +00:00
augustss 6258e74613 Use the same width (9) for both the Used and Avail columns. 2004-12-31 09:54:28 +00:00
enami 56ab99cb0c Drop LSBs when denominator is big. 2004-07-17 00:29:08 +00:00
enami e9bd9c26d8 Remove now unnecesary/incorrect cast. 2004-07-07 01:14:13 +00:00
enami 9bcbd6d9c6 - Remove unnecessary empty line.
- Wrap long line.
2004-07-07 01:10:58 +00:00
martin dc1011f1c9 Available block count may be negative - so make the calculation signed.
This avoids output like:
Filesystem      1K-blocks     Used     Avail Capacity  Mounted on
/dev/wd1a           11799    11276 9223372036854775741   100%    /boot
2004-07-04 15:31:50 +00:00
cjep 0ce4d4d615 Mention -g in synopsis. PR#25800 from Kouichirou Hiratsuka. 2004-06-04 09:25:48 +00:00
wiz 55bf8ce8b5 Refer statvfs instead of removed statfs. 2004-04-21 12:22:27 +00:00
christos 6bd1d6d4db Replace the statfs() family of system calls with statvfs().
Retain binary compatibility.
2004-04-21 01:05:31 +00:00
enami 489a45ccd1 Combine two printf()s back to one. There was a reason to split in my
old patch but no reason to do so in the final version.
2004-03-26 20:28:39 +00:00
enami f31e685fc4 Prevent sign extension for positive value, and f_bavail if it is considered
as positive value.
2004-03-26 20:19:03 +00:00
enami efbe8a95d8 Fix an output of df -h when the value is negative; we need to provide
space for minus sign.
2004-03-26 20:07:47 +00:00
enami 5824b24c95 No need to reference through a pointer; just refer the array of
character directly.
2004-03-26 20:00:32 +00:00
enami 2229c36a99 Don't put space before close paren. 2004-03-26 19:53:53 +00:00
enami bf27454854 Use signed 64bit integer type instead of unsigned long long
since f_bavail may be negative.
2004-03-07 01:12:08 +00:00
enami 90ded884a4 Backout recent undocumented change to keep an output same as before. 2004-03-02 23:13:07 +00:00
christos a2989006c9 fix compilation on LP64 systems. 2004-03-02 15:04:55 +00:00
itojun 1e9b827214 cast to unsigned long long before computing to avoid overflow 2004-03-02 03:59:17 +00:00
itojun 96b84a38a0 use unsigned long long to print block count. 2004-03-02 03:50:45 +00:00
wiz 3cd33047a8 Replace hard to understand wording with a different
one from further down in the same page. Suggested by jmc@openbsd.
2004-01-10 23:43:30 +00:00
wiz 1cb1c3286e comma-separated with a "-" in between. From Jared Yanovich via jmc@openbsd. 2004-01-08 20:26:46 +00:00
jmmv b635f565e7 Homogenize usage messages: make the 'usage' word all lowercase, as this seems
to be the most common practice in our tree.
2004-01-05 23:23:32 +00:00
perry 375e81b270 Some file systems, like FAT, have no inodes in the ffs sense and don't
run out of inodes. df -i was saying, however, that such file systems
had 100% of their inodes in use, which would do things like trigger
alarms in scripts looking for file systems that have run out.

Instead, say 0% are in use, which although not strictly true is at
least less wrong, fixes scripts and is less worrying in nightly reports.
2003-12-07 22:42:36 +00:00
perry 9d454b9e0a mention that -h also overrides BLOCKSIZE, and sort around there 2003-12-07 16:18:25 +00:00
agc b5b2954259 Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22249, verified by myself.
2003-08-07 09:05:01 +00:00
simonb ec137f4f6b Bump ifree/iused field width. 2003-07-12 15:58:54 +00:00