Subject: Re: making an existing feature optional (Re: CVS commit: src/sys/arch)
To: YAMAMOTO Takashi <>
From: Quentin Garnier <>
List: tech-kern
Date: 08/06/2005 16:54:48
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Sat, Aug 06, 2005 at 01:23:04PM +0900, YAMAMOTO Takashi wrote:
> [moved from source-changes@]
> > please let me think a little more about a way to avoid negative options.
> > i guess i will just give up, tho. :-)
> background:
> - i want to swap support optional.  say, "options VMSWAP".
> - i don't want to add negative options like "options VMNOSWAP".
>   because it's confusing, IMO.
> - many people don't want to edit their own kernel config files
>   when they update kernel souce.  so it's better not to break
>   existing kernel config files as far as possible.
> proposal:
> see the attached diff.
> - introduce "default-options".
>   (an alternative might be just to allow "options" in one_def.)

I don't like this.  I think that the complete separation between the
descriptive step and the operational step of the configuration is the
one thing that makes sense in config(1).

> - allow duplicated "options" and "no options".
>   it effectively changes the semantics of "no options XXX" from
>   "undo the previous options XXX" to "disable XXX".

That's definitely something we want.

> as a result, given "default-options VMSWAP" in conf/files,
> your kernel config file can contain:
> 	- "options VMSWAP" to enable VMSWAP.
> 	- "no options VMSWAP" to disable VMSWAP.
> 	- nothing.  same effect as "options VMSWAP".
> honestly speaking, i'm not entirely happy with this
> because it can even look more messy than negative options. :)
> any opinions?

I'd go for having the "allow overriding options" part, and then adding
"options VMSWAP" to the various std.${ARCH} files, or even better,
having them include a conf/std file which would contain
"options VMSWAP", and leave room for other stuff (like, say, INET).

Yes, people who write their config files down to the "machine ..." line
will have to edit their config file, but I'm rather confident those read
current-users and UPDATING.

Quentin Garnier - -
"When I find the controls, I'll go where I like, I'll know where I want
to be, but maybe for now I'll stay right here on a silent sea."
KT Tunstall, Silent Sea, Eye to the Telescope, 2004.

Content-Type: application/pgp-signature
Content-Disposition: inline

Version: GnuPG v1.2.6 (NetBSD)