summaryrefslogtreecommitdiffstats
path: root/bin/df
Commit message (Collapse)AuthorAgeFilesLines
* 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-243-0/+4
|
* 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-102-3/+12
| | | | Also document `-t' option in the usage message.
* BSD 4.4 Lite bin Sourcesrgrimes1994-05-263-0/+543
OpenPOWER on IntegriCloud