Commit Graph

150 Commits

Author SHA1 Message Date
obrien
099f8ecbe9 Default to WARNS=2. Binary builds that cannot handle this must explicitly
set WARNS=0.

Reviewed by:	mike
2001-12-04 01:57:47 +00:00
obrien
cd3f6b3b20 Remove a misplaced space. 2001-08-01 02:09:09 +00:00
wollman
4281e598d5 Fix style bugs introduced by rev 1.28. No functional changes. 2001-07-16 15:49:58 +00:00
ru
2149a5069b mdoc(7) police: removed HISTORY info from the .Os call. 2001-07-10 10:04:09 +00:00
dd
d705df8034 WARNS= -> WARNS?=
Submitted by:	Mike Barcroft <mike@q9media.com>
2001-06-22 21:38:30 +00:00
nectar
cc91420e2c Add parens to get the cast that was meant in previous commit.
While we're at it, this file seems to prefer `unsigned int'
over `u_int', so go with that.
2001-06-05 21:55:57 +00:00
mjacob
023821479e Wrong. The size of size_t is *not* the same as the size of an integer.
MFC after:	2 weeks
2001-06-05 21:16:27 +00:00
pirzyk
7e25cedba6 Added the -l option to df, so to be compatable with other unicies.
PR:		bin/27240
Reviewed by:	GAWollman
MFC after:	2 weeks
2001-06-04 23:07:15 +00:00
ru
e7a85be33f Remove vestiges of MFS. 2001-06-01 10:07:28 +00:00
kris
c616c02d00 BDECFLAGS cleanup (modulo long long issues). Add WARNS. Tested on alpha.
Reviewed by:	the great man himself (except alpha cleanups)
2001-05-20 04:12:30 +00:00
kris
3421522f53 Fix operation of df on unmounted filesystems, and add the ability to run df
on unmounted non-UFS filesystem using '-t'

Submitted by:	bde
2001-05-09 08:44:15 +00:00
kris
d3d33000fe GC some dead code relating to running df on unmounted block devices,
and remove the setgid operator bit from the installed binary: if you want
to view free disk space on an unmounted device, you should have read
permissions to access it.

Reviewed by:	phk
2001-05-08 06:58:25 +00:00
ru
8a6f8b5fe4 mdoc(7) police: split punctuation characters + misc fixes. 2001-02-01 16:38:02 +00:00
ru
be1f850a8f mdoc(7) police: use the new features of the Nm macro. 2000-11-20 11:39:41 +00:00
jwd
e64034fa46 Add -g for gigabyte sizes.
Approved by:	jkh
2000-06-03 20:17:39 +00:00
sheldonh
14e9cd73ea Fix miscellaneous mdoc macro argument limit infringements.
PR:		18465
Reported by:	Kazu TAKAMUNE <takamune@avrl.mei.co.jp>
2000-05-09 14:02:06 +00:00
bde
b68474831b Fixed LDADD. Using ${LIBM} instead of -lm gave the wrong libm in most
cases and broke the world in some cases.

Fixed some style bugs (the usual ones for DPADD and LDADD, misplacement
of DPADD and LDADD, and misplacement of $FreeBSD$).
2000-03-27 14:53:26 +00:00
mharo
a67c7a1db7 add human readable output (-h and -H)
Obtained from:	parts of human readable code from OpenBSD
Reviewed by:	obrien

add POSIX, byte and megabyte block size ouput flags

PR:		13579 (POSIX flag)
Submitted by:	Mike Meyer <mwm@phone.net>
1999-12-15 03:44:09 +00:00
julian
88e6664e72 Most modern OSs have the ability to flag certain mounts as ones to
be ignored by default by the df(1) program.  This is used mostly to
avoid stat()-ing entries that do not represent "real" disk mount
points (such as those made by an automounter such as amd.)  It is
also useful not to have to stat() these entries because it takes
longer to report them that for other file systems, being that these
mount points are served by a user-level file server and resulting in
several context switches.  Worse, if the automounter is down
unexpectedly, a causal df(1) will hang in an interruptible way.

PR:		kern/9764
Submitted by:	Erez Zadok <ezk@cs.columbia.edu>
1999-11-01 04:57:43 +00:00
peter
66312e4a8d $Id$ -> $FreeBSD$ 1999-08-27 23:15:48 +00:00
sheldonh
ff03d3b520 Don't suggest sysctl(8) as a means for discovering what filesystem types
are available; suggest lsvfs(1) instead.

Reported by:	Neil Blakey-Milner <nbm@rucus.ru.ac.za>
1999-08-26 16:47:03 +00:00
alex
95c394b70e Removed occurrences of consecutive repeated words (such as "the the"). 1999-02-12 02:12:08 +00:00
peter
858805daf7 Cleaning out old stuff from one of my source trees:
use mkdtemp() rather than mktemp() and fix a trivial memory leak.
1998-12-16 05:29:09 +00:00
phk
4c734c0e4d .Sh ENVIRONMENT VARIABLES -> .Sh ENVIRONMENT
PR:		6599
Reviewed by:	phk
Submitted by:	Josh Gilliam <josh@quick.net>
1998-05-13 07:57:49 +00:00
charnier
f60d38b876 Correct use of .Nm. 1998-05-13 07:35:44 +00:00
bde
d53ef8ee6e Removed definition of _NEW_VFSCONF. The new vfsconf interface is now
the default.
1998-01-20 10:40:18 +00:00
joerg
aa68663b55 Style police: keep a variable list in alphabetical order, and add
pointless paren's to return statements.

Nitpicked by:	bde :)
1997-10-13 09:36:05 +00:00
joerg
8eaf7f4121 Make df(1) exit with non-success status if something went wrong.
PR:		bin/4415
1997-10-12 13:55:43 +00:00
charnier
1754071cd4 environmental -> environment. 1997-09-18 06:55:21 +00:00
steve
548d1c0056 Add Bruce's _NEW_VFSCONF flag to make this compile cleanly and
sccsid -> rcsid.
1997-08-07 21:31:00 +00:00
imp
054f35c222 compare return value from getopt against -1 rather than EOF, per the final
posix standard on the topic.
1997-03-28 15:24:41 +00:00
bde
55186ebb5b Merged from Lite2. The -t option is now handled better. The only visible
change should be that the usage message now actually matches the man page.
1997-03-13 17:41:37 +00:00
bde
9924e3c671 Merged from Lite2. The man page no longer attempts to list all the
vfs types.

Fixed ordering of FreeBSD `k' option in synopsis.
1997-03-13 17:32:39 +00:00
bde
2eaf7f70e5 Merge from Lite2. Straightforward changes. 1997-03-13 17:29:08 +00:00
guido
2f74bc969e This is a funny one: df for a device that was not mounted used to fail
for root only.
1997-03-10 19:39:43 +00:00
peter
83b3c2c161 Revert $FreeBSD$ to $Id$ 1997-02-22 14:13:04 +00:00
jkh
f8cd22bf39 Include <ufs/ufs/ufsmount.h>. 1997-02-17 05:26:08 +00:00
jkh
808a36ef65 Make the long-awaited change from $Id$ to $FreeBSD$
This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.

Boy, I'm glad we're not using sup anymore.  This update would have been
insane otherwise.
1997-01-14 07:20:47 +00:00
wosch
71f5160702 Sort cross references. 1997-01-13 00:25:51 +00:00
steve
88dfe6ac44 Merge Lite2 mods, cleanup man page, and -Wall cleaning. 1996-12-14 05:56:03 +00:00
jkh
25f273a087 The manual page of df called cd9660 file systems by the name
isofs while the df command itself used the name iso9660fs or
        cdfs. Both of these were inconsistent with the name cd9660 which
        is used by the mount command. I modified df to recognize all of
        the names cd9660, cdfs, isofs, and iso9660fs, and take them all
        to refer to the same thing. Naturally I added a note of this
        behaviour in the manual page too.

Submitted-By: Jukka Ukkonen <jau@jau.csc.fi>
1996-12-11 10:01:56 +00:00
wosch
ab0ebe585d [HISTORY] command appeared in Version 1 AT&T UNIX
Obtained from: A Quarter Century of UNIX, Peter H. Salus, page 41
1996-08-29 18:06:19 +00:00
bde
d1eb245b0a Partially fixed negative and truncated "Avail" counts in df output.
This fixes PR943.

ffs/ffs_vfsops.c:
ffs_statfs() multiplied by (100 - minfree) as part of calculating the
minfree percentage (complemented in 100%), so with the standard minfree
of 8, it was broken for file systems of size >= 1TB/92 = 11GB.  Use the
standard freespace() macro instead.  This also fixes a rounding bug (the
"Avail" count was sometimes 1 too small).

ffs/* (not fixed):
The freespace() macro multiplies by minfree, so with the standard
minfree of 8, it is broken for file systems of size >= 1TB/8 = 128GB.
This bug is more serious since it affects block allocation.

ffs/ffs_alloc.c (not fixed):
Ordinary users are sometimes allowed to allocate 1 (partial) block
too many so that the "Avail" count goes negative.  E.g., if there is
1 fragment available and the file is fairly large, one more full
block is allocated.

df/df.c:
ufs_df() used/uses essentially the same code as ffs_statfs(), so it
had/has the same bugs.

ufs_df() gratuitously replaced "Avail" counts of < 0 by 0, so it
gave different results for non-mounted file systems in this case.
1996-01-14 18:55:09 +00:00
rgrimes
1888033949 Remove trailing whitespace.
Reviewed by:	phk
1995-05-30 00:07:29 +00:00
joerg
c6030c6511 You will find enclosed some changes to make gcc -Wall more happy in
/usr/src/bin. Note that some patches are still needed in that directory.

I (Joerg) finished most of Philippe's cleanup.  /bin/sh will still
need *allot* of work, however.

Submitted by:	charnier@lirmm.fr (Philippe Charnier)
1995-03-19 13:29:28 +00:00
dg
8722740e7f Added $Id$ 1994-09-24 02:59:15 +00:00
dg
1e4a2dfbef The last commit was bogus...the putenv doesn't affect the parent process,
so the BLOCKSIZE doesn't need to be preserved.
Also initialized the flags variables, and used 1k instead of 1024 for
BLOCKSIZE.
1994-08-12 10:23:49 +00:00
dg
679aa90292 Implemented the -k flag more properly...don't destroy the user's setting
of the BLOCKSIZE environment variable.
1994-08-12 07:26:52 +00:00
wollman
670a01d488 Gimme back my `-k' option!
Also document `-t' option in the usage message.
1994-08-10 19:21:07 +00:00
rgrimes
e3cfc8ce61 BSD 4.4 Lite bin Sources 1994-05-26 06:18:55 +00:00