kernel config: sound device with or without quotes

Peter Jeremy PeterJeremy at optushome.com.au
Wed Mar 2 18:51:39 GMT 2005


On Wed, 2005-Mar-02 02:46:41 -0800, Rob wrote:
>In /usr/src/sys/conf/NOTES is the list of supported
>sound devices. I get confused by the pressence and
>absence of quotes here. Are these quotes only
>decoration, or really needed. For example:
>
>device          "snd_ad1816"
>device          snd_cmi
>
>If they are needed, it confuses me why one sound
>device needs quotes, and another doesn't?

For hysterical raisins, config(8) parses bareword arguments to "device" as
<perl>
	($device_name, $device_instance) = /([a-zA-Z_]+)([0-9]*)/;
</perl>

The double quotes force the first entry to be treated as a device
"snd_ad1816", rather than the 1817th instance of "snd_ad".

>How does that affect the use of loading them in
>/boot/loader.conf? How about following two:
>
>snd_ad1816_load="YES"
>snd_cmi_load="YES"
>
>Is that OK?

Yes.  The loader has a different parsing algorithm:
${device_name}_load="{YES,NO}"
and
hint.$device_name.$device_instance.flag="VALUE"

-- 
Peter Jeremy


More information about the freebsd-stable mailing list