Commit Graph

65 Commits

Author SHA1 Message Date
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
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
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
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
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
f3014f2c17 sync usage args with reality. 2003-04-16 12:57:24 +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
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
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
cgd
e459adfd7a use getprogname() 2001-02-20 23:02:07 +00:00
tsutsui
337db294f1 Adjust output column in printf(). 2001-02-01 10:19:51 +00:00
christos
3ca65e4438 eliminate nested extern 2001-01-07 05:37:10 +00:00
lukem
f819878ce7 use more standard %ll_ in favour of %q_ 2001-01-04 15:39:50 +00:00
hubertf
69939b09cd Add -m option, similar to -k, but display output in 1024*1024 byte units.
Patch submitted by Chris Pinnock <C.J.E.Pinnock@qmw.ac.uk> in PR 11849,
adjusted for NetBSD-current by me.
2000-12-30 16:20:58 +00:00
kleink
bd6b91bddb Support the 1003.2-92 -P flag for a `portable output format'; based on
Ben Harris' patch in standards/11208 but extended about output alignment
and documentation.
2000-10-15 17:50:10 +00:00
christos
54d8f9cccb Add -a flag now that we have support for MNT_IGNORE 2000-06-26 21:16:15 +00:00
hubertf
8f48378bc3 Fix overflow in df on big partitions' raw device.
Supplied by Greg Oster, problem noted in OpenBSD PR#924.
1999-09-24 13:35:21 +00:00
sommerfeld
95fc3b5710 Fix PR3474: df -t/df -l confused by stacked local mounts.
(Ross's patch in the PR appears to Just Work).
1999-07-27 12:13:19 +00:00
wsanchez
ef9982bb8e Cast args to strpct() u_long, as in the prototype, not ulong. 1998-10-08 02:10:36 +00:00
mycroft
9dc385beb1 Delint. 1998-07-28 05:31:22 +00:00
mycroft
ce7d757530 Delint. 1998-07-28 03:47:14 +00:00
mycroft
3834fcec5c Use mkdtemp(3). 1998-07-27 16:33:31 +00:00
mrg
3cd022b72f minor KNF. 1998-07-04 19:44:32 +00:00
fair
c8e93442cc Fix PR#3590 - remove floating point calculation from df to avoid faulting
on machines that don't yet have complete FP support (e.g. MC68LC040)
1998-04-08 23:16:37 +00:00
fvdl
e5bc90f40c Merge with Lite2 + local changes 1998-03-01 02:20:01 +00:00
thorpej
b271f361f1 - Use __COPYRIGHT() and __RCSID().
- Fix compiler warnings.
1997-07-20 06:00:39 +00:00
thorpej
0097f7bcc8 Make df(1) more liberal (and intelligent) about what it accepts
as arguments (for -t and -l flags, specifically).
From Hubert Feyrer <feyrer@rfhs8002.fh-regensburg.de>, PR #2869.
1996-12-11 03:48:42 +00:00
jtc
3ae562ed82 merge in changes from 1.1 release branch 1995-11-28 05:12:44 +00:00
jtc
40b67f2121 lose unused variable; PR #1297 1995-08-11 00:38:15 +00:00
cgd
3d113b326b don't assume f_fstypename is larger than MFSNAMELEN or is nul-terminated 1995-06-18 10:58:06 +00:00
cgd
49f0ad8601 convert to new RCS id conventions. 1995-03-21 09:01:59 +00:00
mycroft
f5ad44b6ac Use S_IS*(). 1995-01-30 19:30:13 +00:00
mycroft
c3b978fa44 Various:
* Redo `-t' handling like mount(8) and umount(8).
* Don't force a stat of every fs unless we need it.
* When using an explicit list, stat everything before printing anything, and
minimize the column width.
1995-01-30 18:10:51 +00:00
mycroft
720e729421 Add `-t' option from Matthew Green, hacked a bit by me. 1995-01-13 23:23:41 +00:00