summaryrefslogtreecommitdiffstats
path: root/bin/df/df.c
Commit message (Collapse)AuthorAgeFilesLines
* o __P has been reovedimp2002-02-021-41/+23
| | | | | | | | | | | o Old-style K&R declarations have been converted to new C89 style o register has been removed o prototype for main() has been removed (gcc3 makes it an error) o int main(int argc, char *argv[]) is the preferred main definition. o Attempt to not break style(9) conformance for declarations more than they already are. Approved by: arch@, new style(9)
* Make ``df -l'' work when no network filesystems are loaded.ru2001-12-191-2/+4
| | | | PR: bin/32397
* Do not dot terminate errx() stringscharnier2001-12-111-1/+1
|
* Remove a misplaced space.obrien2001-08-011-1/+1
|
* Fix style bugs introduced by rev 1.28. No functional changes.wollman2001-07-161-11/+12
|
* Add parens to get the cast that was meant in previous commit.nectar2001-06-051-2/+2
| | | | | While we're at it, this file seems to prefer `unsigned int' over `u_int', so go with that.
* Wrong. The size of size_t is *not* the same as the size of an integer.mjacob2001-06-051-2/+4
| | | | MFC after: 2 weeks
* Added the -l option to df, so to be compatable with other unicies.pirzyk2001-06-041-2/+55
| | | | | | PR: bin/27240 Reviewed by: GAWollman MFC after: 2 weeks
* BDECFLAGS cleanup (modulo long long issues). Add WARNS. Tested on alpha.kris2001-05-201-14/+15
| | | | Reviewed by: the great man himself (except alpha cleanups)
* Fix operation of df on unmounted filesystems, and add the ability to run dfkris2001-05-091-4/+38
| | | | | | on unmounted non-UFS filesystem using '-t' Submitted by: bde
* GC some dead code relating to running df on unmounted block devices,kris2001-05-081-35/+1
| | | | | | | | 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
* Add -g for gigabyte sizes.jwd2000-06-031-1/+5
| | | | Approved by: jkh
* add human readable output (-h and -H)mharo1999-12-151-11/+131
| | | | | | | | | | 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>
* Most modern OSs have the ability to flag certain mounts as ones tojulian1999-11-011-5/+10
| | | | | | | | | | | | | | 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>
* $Id$ -> $FreeBSD$peter1999-08-271-1/+1
|
* Cleaning out old stuff from one of my source trees:peter1998-12-161-5/+14
| | | | use mkdtemp() rather than mktemp() and fix a trivial memory leak.
* Style police: keep a variable list in alphabetical order, and addjoerg1997-10-131-5/+5
| | | | | | pointless paren's to return statements. Nitpicked by: bde :)
* Make df(1) exit with non-success status if something went wrong.joerg1997-10-121-11/+18
| | | | PR: bin/4415
* Add Bruce's _NEW_VFSCONF flag to make this compile cleanly andsteve1997-08-071-4/+7
| | | | sccsid -> rcsid.
* compare return value from getopt against -1 rather than EOF, per the finalimp1997-03-281-2/+2
| | | | posix standard on the topic.
* Merged from Lite2. The -t option is now handled better. The only visiblebde1997-03-131-104/+37
| | | | change should be that the usage message now actually matches the man page.
* This is a funny one: df for a device that was not mounted used to failguido1997-03-101-2/+2
| | | | for root only.
* Revert $FreeBSD$ to $Id$peter1997-02-221-1/+1
|
* Include <ufs/ufs/ufsmount.h>.jkh1997-02-171-0/+1
|
* Make the long-awaited change from $Id$ to $FreeBSD$jkh1997-01-141-1/+1
| | | | | | | | 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.
* Merge Lite2 mods, cleanup man page, and -Wall cleaning.steve1996-12-141-3/+3
|
* The manual page of df called cd9660 file systems by the namejkh1996-12-111-1/+3
| | | | | | | | | | | 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>
* Partially fixed negative and truncated "Avail" counts in df output.bde1996-01-141-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Remove trailing whitespace.rgrimes1995-05-301-4/+4
| | | | Reviewed by: phk
* You will find enclosed some changes to make gcc -Wall more happy injoerg1995-03-191-21/+23
| | | | | | | | | /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)
* Added $Id$dg1994-09-241-0/+2
|
* The last commit was bogus...the putenv doesn't affect the parent process,dg1994-08-121-10/+3
| | | | | | so the BLOCKSIZE doesn't need to be preserved. Also initialized the flags variables, and used 1k instead of 1024 for BLOCKSIZE.
* Implemented the -k flag more properly...don't destroy the user's settingdg1994-08-121-2/+11
| | | | of the BLOCKSIZE environment variable.
* Gimme back my `-k' option!wollman1994-08-101-2/+6
| | | | Also document `-t' option in the usage message.
* BSD 4.4 Lite bin Sourcesrgrimes1994-05-261-0/+420
OpenPOWER on IntegriCloud