Subject: usage of config(8) def* directives
To: None <tech-kern@netbsd.org>
From: Luke Mewburn <lukem@wasabisystems.com>
List: tech-kern
Date: 12/05/2001 22:31:20
[ A few people have asked me to clarify this ... ]

Recently I converted /sys/**/files* to from using 'defopt ...'
to using 'defflag ...' or 'defparam ...'.

The rationale for this change is that for defopt, config(8) does no
checking of the use of values in an option, whereas for defflag and
defparam it does. I.e:

    	defflag [hfile] FOO [...]
		in the kernel config, only permit
			options FOO
		for "FOO" (i.e, without a value), when generating
		hfile or opt_foo.h.
		config(8) will generate an error if a value is given.

	defparam [hfile] FOO [...]
		in the kernel config, only permit
			options FOO=bar
		or
			options FOO="\"com\""
		for "FOO" (i.e, with a value), when generating
		hfile or opt_foo.h.
		config(8) will generate an error if a value is not given.

	defopt [hfile] FOO [...]
		no checking of whether "FOO" takes a value or not.
		therefore, defopt is not recommended.

So, please use defflag or defparam as appropriate, as opposed to defopt.

(I also lined up the whitespace for the various defflag and defparams
on a per-file basis, but that's not really relevant to this
discussion.)

Luke.

-- 
Luke Mewburn  <lukem@wasabisystems.com>  http://www.wasabisystems.com
Luke Mewburn     <lukem@netbsd.org>      http://www.netbsd.org
Wasabi Systems - NetBSD hackers for hire
NetBSD - the world's most portable UNIX-like operating system