Subject: Re: config: attach to attribute
To: Matthias Drochner <drochner@zelux6.zel.kfa-juelich.de>
From: Chris G. Demetriou <cgd@pa.dec.com>
List: tech-kern
Date: 03/06/1998 08:47:43
> Attributes are used in the "files.*" files to set up the rules
> how the device tree is built.
> Imho, these attributes should not be used in the kernel
> configuration files.
> The only place where I found a use of this (in the i386 port)
> is the "pckbd" attribute. "files.i386" contains:
> 	device	pc: tty, pckbd
> and
> 	device	vt: tty, pckbd
> GENERIC contains:
> 	pms0	at pckbd? irq 12
>
> Do we really want this?

I'd say it's bad style, at least.  (It is confusing.)


> Look at the SCSI bus attachment:
> 	scsibus* at aha?
> 	scsibus* at ahb?
> 	scsibus* at ahc?
> 	[...]
> Here it is done right. (One could write "scsibus* at scsi?", using
> the internal "scsi" attribute.)

That is, of course, on the i386, port.  Config files for the mac68k
and sun3 ports actually do use the "at scsi?" trick.


> Shouldn't the attachment to pure attributes be disallowed in
> "config"?

I'm not sure it's right to disallow them; i mean, they _could_ be
useful for some kernel configs.

However, I don't think that that trick should be used by the kernel
config files that we ship.  it _is_ confusing.  (It's worse than just
'pckbd' or 'scsi' don't appear in the config files.  They don't really
have unit numbers, either, so what does 'scsi0' or something similar
mean?  I'm pretty sure it has a well-defined meaning, but it's
venturing further and further from the path of least surprise.  8-)


cgd