Subject: Re: VERY strange command-line syntax for 'df -t'
To: None <email@example.com (NetBSD Userlevel Technical Discussion\>
From: Robert Elz <kre@munnari.OZ.AU>
Date: 04/09/2002 15:48:48
Date: Mon, 8 Apr 2002 13:08:33 -0400 (EDT)
From: firstname.lastname@example.org (Greg A. Woods)
| What about if other command-line operands imply a default list of
| filesystems which is a subset of the complete list?
There are no such other command line options.
| What about this documented behaviour (from df(8))?
| If a file system is given on the command line that is not of the
| specified type, a warning is issued and no information is given on
| that file system.
That says that if I do
df -t ffs / /tmp
(and /tmp is MFS mounted) then I get a warning instead of any output
about /tmp (as /tmp is not ffs, and I asked for only ffs). I still
get output for / (which is ffs). I have no ext2fs file systems for
some strange reason:
jade$ df -t ffs / /tmp
df: Warning: /tmp mounted as a mfs file system
Filesystem 1K-blocks Used Avail Capacity Mounted on
/dev/wd0a 47719 27271 18062 60% /
jade$ df -t ex2fs
| Under my proposal I would expect your example to generate a warning if
| no "mfs" filesystems are mounted (and no files are specified on the
| command line).
No, the warning is if you explicitly ask for output about a filesystem that
is of a type that df isn't going to list. Not if you ask for a type and
there don't happen to be any filesystems of that type.
The -t arg as it stands now is just fine. The way the "no" is used is a
little unusual, but there's no real good reason to change it (I wouldn't
object if "no" were permitted on later filesystem types in the list if
it were present in the first, but apart from that, nothing should be altered).