Subject: config.new question
To: None <tech-kern@netbsd.org>
From: Jaromir Dolecek <dolecek@ics.muni.cz>
List: tech-kern
Date: 03/15/2000 19:05:07
Hi,
is it possible to add dependencies after a device is attached ?

I have a include file, for simplicity:

device foobar {[slot = -1]}
attach  foobar at foobarbus

That device has some MI and MD parts. It's included
in the MD files.XXX as

include "dev/foobar/files.foobar"
file    arch/i386/foobar/foobar_machdep.c     foobar

Now, the problem is the MD parts needs bioscall.s. But that
is only included into kernel if any device depends on it.
However, I can't "add" a dependence to already existing
device, so I'm screwed.

I solved this particular thing by defining the device
with dependence in the MD files.XXX and pulling the other
staff from /dev/foobar/files.foobar, i.e in MD file:

device foobar {[slot = -1]}: bioscall
include "dev/foobar/files.foobar"
file    arch/i386/foobar/foobar_machdep.c     foobar

and the foobar (MI) file is just

# device foobar {[slot = -1]}
attach foobar at foobarbus

Is there any beter solution ? If not, I'd prolly add this
ability to config, probably using a :: notation - so that

device foobar :: bioscall

would add the dependency on bioscall to already defined device foobar.

Jaromir
-- 
Jaromir Dolecek <jdolecek@NetBSD.org>      http://www.ics.muni.cz/~dolecek/
@@@@  Wanna a real operating system ? Go and get NetBSD, damn!  @@@@