Subject: Re: df(1) on unmounted device works improperly
To: Greywolf <greywolf@starwolf.com>
From: David Laight <david@l8s.co.uk>
List: current-users
Date: 03/18/2003 10:19:14
On Mon, Mar 17, 2003 at 11:07:22PM -0800, Greywolf wrote:
> Thus spake Simon Burge ("SB> ") sometime Tomorrow...
> 
> SB> Greywolf wrote:
> SB>
> SB> > Hey, all,
> SB> >
> SB> > with -current kernel and userland as of a week ago (and, it seems, as
> SB> > far back as 1.6M, if not farther), df(1) does The Wrong Thing.
> SB>
> SB> This is from:
> SB>
> SB> 	revision 1.43
> SB> 	date: 2002/08/02 08:17:12;  author: soren;  state: Exp;  lines: +4 -113
> SB> 	Following FreeBSD's example, remove the old pre-statfs(2) code for
> SB> 	examining FFS filesystems directly. This also gets rid of df(1)'s
> SB> 	setgid operator bit.

Saves worring about adding support for otherfs types - or not knowing
what the answer means because you don't know whether df understands
the fs type concerned.

Posix requires the current behaviour, so I'm surprised Solaris will
look at unmounted fs (it probably has a /usr/xpg4/bin/df though).

We aren't actually comformant anyway:

1) posix requires the default output to show the number of free inodes.
2) posix requires a -t option show the allocated space.

I don't know where they got there 'default' output rule from!
the '-t' clashes :-(
 
	David

-- 
David Laight: david@l8s.co.uk