freebsd-skq/bin
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
..
cat Fix exit status. `cat no-such-file >/dev/null' exited with status 0. 1995-10-03 12:46:37 +00:00
chflags Set NOSHARED=true, having this binary static makes it much easier to 1995-07-24 01:44:17 +00:00
chmod You will find enclosed some changes to make gcc -Wall more happy in 1995-03-19 13:29:28 +00:00
cp Preserve sticky bit for cp -pR'. It was already preserved for cp -R'. 1995-10-03 12:55:01 +00:00
csh Add missing reaction on LC_ALL and LC_COLLATE 1995-10-23 23:08:26 +00:00
date Add setlocale(LC_TIME,... 1995-10-23 20:26:53 +00:00
dd Add setlocale LC_CTYPE 1995-10-23 21:31:48 +00:00
df Partially fixed negative and truncated "Avail" counts in df output. 1996-01-14 18:55:09 +00:00
domainname You will find enclosed some changes to make gcc -Wall more happy in 1995-03-19 13:29:28 +00:00
echo Well, it would appear that the "ayes" have it (though by a slim margin). 1995-08-31 17:25:55 +00:00
ed This commit was generated by cvs2svn to compensate for changes in r13122, 1995-12-30 19:02:48 +00:00
expr Fix my own brokeness for the colon operator, when one of the arguments 1995-11-18 18:05:03 +00:00
hostname Added $Id$ 1994-09-24 02:59:15 +00:00
kill Allow 0 as a signal number to match the man page. 1995-03-05 21:52:41 +00:00
ln Use lstat() instead of stat() for checking if the final source file exists, 1994-12-06 18:50:44 +00:00
ls Print dev minor #'s > 255 in hex. 1995-12-30 18:15:30 +00:00
mkdir Added $Id$ 1994-09-24 02:59:15 +00:00
mv Handle trailing slashes in source filenames correctly. E.g., rewrite 1995-10-07 10:42:48 +00:00
pax Remove unneded ctype.h everywhere 1995-10-23 21:23:27 +00:00
ps oops. I forgot to add the "[-U username]" option to the usage string. 1996-01-12 08:49:43 +00:00
pwd Added $Id$ 1994-09-24 02:59:15 +00:00
rcp Updating /usr/include/kerberosIV/des.h so eBones will build breaks 1995-09-10 14:59:51 +00:00
rm Allow root to delete uchg/uappnd files 1995-04-13 13:35:09 +00:00
rmail If mail is received with no from address, invoke sendmail with 1995-09-16 18:52:51 +00:00
rmdir Added $Id$ 1994-09-24 02:59:15 +00:00
sh Restored formatting from the old printf/printf.c. 1995-12-14 23:19:36 +00:00
sleep Added $Id$ 1994-09-24 02:59:15 +00:00
stty Fixed descriptions of ignpar and parmrk. 1995-11-11 03:31:13 +00:00
sync Added $Id$ 1994-09-24 02:59:15 +00:00
test Fix -h option: 1995-10-28 11:54:42 +00:00
Makefile ed/Makefile is able to 'decide' for itself whether to build secure or 1995-10-01 14:24:01 +00:00
Makefile.inc Wrong library was picked by ed 1995-10-22 20:14:13 +00:00