freebsd-dev/bin
Dag-Erling Smørgrav 7b0514fa02 Simplify df(1) by factoring out most of the common code:
- In the argc == 0 case, just populate the mount list as before, but
   do not calculate widths, update totals or print anything.

 - In the argv > 0 case, collect information about the requested file
   systems and store it in the mount list, but do not calculate
   widths, update totals or print anything.

 - In either case, once all the information has been collected,
   iterate once through the mount list to calculate widths and totals,
   then once more to print everything.

This also fixes two bugs: firstly, column widths were not calculated
correctly if more than one file system was specified on the command
line; and secondly, file systems with MNT_IGNORE were included in the
totals even if -a was not specified.

Noticed by:	Paul Schenkeveld
MFC after:	3 weeks
2011-10-18 08:18:26 +00:00
..
cat Removed redundant WARNS setting. 2009-10-15 18:17:29 +00:00
chflags mdoc: drop redundant .Pp and .LP calls 2010-10-08 12:40:16 +00:00
chio Zero struct before reading from it 2010-06-02 09:34:41 +00:00
chmod Update sticky(7) cross references. 2011-05-13 16:29:57 +00:00
cp Don't try to copy a socket after "xxx is a socket (not copied)." message. 2010-06-05 08:50:39 +00:00
csh When WITH_ICONV is set, use our in-tree iconv. 2011-02-26 18:54:54 +00:00
date Explain that setting an absolute day value can fail and that the month should 2010-06-04 06:56:58 +00:00
dd Bump .Dd for r187609 2009-01-30 16:23:57 +00:00
df Simplify df(1) by factoring out most of the common code: 2011-10-18 08:18:26 +00:00
domainname Use a standard section name. 2006-12-18 15:45:01 +00:00
echo echo(1): Clarify portability and mention literal "--" handling. 2010-11-12 22:43:40 +00:00
ed Fix memory leaks in error cases. 2011-08-27 15:28:57 +00:00
expr Fix style, since this file has just been touched in a major way. 2011-07-09 12:20:15 +00:00
getfacl More mdoc nitpicking to improve compatibility to mdocml 2010-06-11 06:04:07 +00:00
hostname Staticify internal routines. 2009-06-23 23:30:56 +00:00
kenv mdoc(7) markup. 2011-02-21 16:03:39 +00:00
kill kill: Note that this is used both as a normal program and a shell builtin. 2011-03-01 21:48:22 +00:00
ln bin: Prefer strrchr() to rindex(). 2011-03-15 22:22:11 +00:00
ls Get rid of major/minor number distinction. 2011-09-28 18:53:36 +00:00
mkdir More markup fixes. 2006-12-27 11:28:00 +00:00
mv Don't chop IO into small pieces, follow cp(1) and just use MAXPHYS. 2011-10-03 21:48:10 +00:00
pax Fix a bunch of typos and a couple of whitespace nits. 2011-05-22 14:03:38 +00:00
pkill Make sys_signame upper case. 2011-02-04 16:40:50 +00:00
ps Correct a typo that was introduced in 225912 2011-10-02 16:05:19 +00:00
pwait mdoc: order prologue macros consistently by Dd/Dt/Os 2010-04-14 19:08:06 +00:00
pwd Sync program's usage() with manpage's SYNOPSIS. 2005-02-09 17:37:39 +00:00
rcp Remove duplicated header files 2011-06-24 07:29:04 +00:00
realpath Make `realpath'' behave like `realpath .''. 2011-06-21 19:34:57 +00:00
rm bin: Prefer strrchr() to rindex(). 2011-03-15 22:22:11 +00:00
rmail Bump WARNS where possible. 2010-02-15 14:07:40 +00:00
rmdir Fix markup. 2006-12-27 12:14:56 +00:00
setfacl Make it possible to use permission sets (full_set, modify_set, read_set 2011-04-09 07:42:25 +00:00
sh sh(1): Extend documentation about subshells. 2011-07-10 15:02:25 +00:00
sleep Document the new argument parser for sleep(1) and SIGINFO behaviour. 2010-08-02 10:59:23 +00:00
stty Don't call -f option's argument "stdin". 2011-05-03 10:08:11 +00:00
sync /*- or .\"- or #- to begin license clauses. 2005-01-10 08:39:26 +00:00
test bin: Prefer strrchr() to rindex(). 2011-03-15 22:22:11 +00:00
uuidgen Removed redundant WARNS setting. 2009-10-15 18:17:29 +00:00
Makefile Merge from tbemd: 2010-09-13 01:29:51 +00:00
Makefile.inc Reimplementation of world/kernel build options. For details, see: 2006-03-17 18:54:44 +00:00