Subject: Re: making an existing feature optional (Re: CVS commit: src/sys/arch)
To: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
From: Quentin Garnier <cube@cubidou.net>
List: tech-kern
Date: 08/06/2005 16:54:48
--2Z2K0IlrPCVsbNpk
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@]
>=20
> > please let me think a little more about a way to avoid negative options.
> > i guess i will just give up, tho. :-)
>=20
> 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.
>=20
> 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".
>=20
> 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.

--=20
Quentin Garnier - cube@cubidou.net - cube@NetBSD.org
"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.

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

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (NetBSD)

iQEVAwUBQvTPONgoQloHrPnoAQKW7Af/WXb0Co+vB3GxwFDzph8BniP8ah0ilrmc
FfoQICVJw2Q3o+oM9i3O1wOTrENRjwj+Sgq4utyaTQpgP9o/ewSYPGgtjTe6KVVF
AHKeSF4p3qBndky36js2Trg3HuCEUv5ZIg9UJNAWdoE2DsJhvrwmK/8qCUjlPkK8
lMm7+eYPF72dnhGnRa8rr/bjCJxCD2j65ZfFhuk2XvMb9cfYPAzsnPMrM472xsvS
+vmL9oPveT9OFOWH1I6Ubinc8/Nu8YApwEkrERh7MWMo4BDzu54xzTyo9ogzrB9r
j1MhQffa8in6vknryT4AwP/t1jGQCGo2cn2mIlr23QikVKyt6aEGEg==
=kZfc
-----END PGP SIGNATURE-----

--2Z2K0IlrPCVsbNpk--