Subject: Re: getmntopt change
To: None <tech-userlevel@netbsd.org>
From: Frank van der Linden <fvdl@wasabisystems.com>
List: tech-userlevel
Date: 02/20/2001 13:03:16
On Tue, Feb 20, 2001 at 12:20:01PM +0100, Frank van der Linden wrote:
> On Mon, Feb 19, 2001 at 10:20:01PM -0800, Jason R Thorpe wrote:
> > Err, isn't this what getsubopt(3) is for?
> 
> Heh, funny, I didn't even know we had that. I can't even find (quick search)
> anything that uses it. I guess I'll just modify mount_nfs to use it.

Actually, that doesn't work too well. getmntops() also deals with
negated options (e.g. 'auto' and 'noauto'), and storing a flag in
an alternate location to avoid conflicts. Plus, all mount_* programs
use a default set of options, specified as an array of 'struct mntopt'.
So you can't modify one mount_* without modifying them all,
really.  The easiest solution is still to modify
getmntops() to be a one-shot function (i.e. you need to loop
to get all options), and have it use getsubopt() internally.

- Frank