Commit Graph

103 Commits

Author SHA1 Message Date
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
grant eff007b21e add -g to ENVIRONMENT. 2003-04-18 12:49:12 +00:00
grant 6321639a84 change -G arg to -g.
-G was chosen as SuSv2 specified -g was already used in ls(1), but ls
has no blocksize options like df/du, so this was redundant.

bump date in man page.
2003-04-18 12:48:25 +00:00
grant a1dd31060d add -G argument for output in gigabytes.
ok'd by perry@, mrg@
2003-04-16 14:00:30 +00:00
grant 8e37d38a09 grammar fix. 2003-04-16 13:17:52 +00:00
grant f3014f2c17 sync usage args with reality. 2003-04-16 12:57:24 +00:00
perry 0dd5b455ae matche->match, from Igor Sobrado in PR 19670 2003-03-29 18:11:29 +00:00
provos 4fd29e5dcf human-readable output via -h flag. output matches Linux and other BSDs.
partly from kstailey@openbsd.org.  approved itojun and perry.
2002-09-26 16:27:43 +00:00
wiz 14dfaa4b03 New policy: New sentences start on a new line.
Patches by Robert Elz <kre at munnari oz au>, with minimal changes by me.
2002-09-25 15:18:36 +00:00
lukem 146a774973 Use ${NETBSDSRCDIR}/some/path instead of ${.CURDIR}/../../some/path (etc). 2002-08-19 09:56:00 +00:00
soren e426c0fac8 Following FreeBSD's example, remove the old pre-statfs(2) code for
examining FFS filesystems directly. This also gets rid of df(1)'s
setgid operator bit.
2002-08-02 08:17:12 +00:00
ross dc5571b22e Generate <>& symbolically. I'm avoiding .../dist/... directories for now. 2002-02-08 01:21:55 +00:00
wiz 6fa1adea30 Use standard headers, sort SEE ALSO. 2001-12-20 20:04:46 +00:00
jdolecek a76b375c0f put -l explanation before -m, so that the options are in alphabet order
Fixes misc/14471 by Hiramatsu Yoshifumi.
2001-11-05 17:51:56 +00:00
christos bebeebd8aa if -a is not given, we need to walk the filesystem list to check the
flags in order to get the correct count (from enami)
2001-10-11 16:31:33 +00:00
enami 802d6b10df KNF. 2001-10-11 09:23:31 +00:00
wiz 1e378c4c12 precede, not preceed. 2001-08-20 12:00:46 +00:00
simonb 79f5a137af Xref getbsize(3). 2001-07-08 15:34:13 +00:00
cgd e459adfd7a use getprogname() 2001-02-20 23:02:07 +00:00