Subject: Re: Handling orphans in config(1)
To: None <tech-kern@NetBSD.org>
From: Alan Barrett <apb@cequrux.com>
List: tech-kern
Date: 09/28/2005 09:18:17
On Sat, 24 Sep 2005, Quentin Garnier wrote:
> While trying to find ways of extending the 'no <dev> at <attach>' syntax
> of config, I came upon the issue of orphans.
[...]
> The reason why I'm not committing this right away is because I want to
> gather opinions on how to do the next level.
I think that the following behaviour would be most useful:
When checking for orphans, consider all possible wildcard matches as
acceptable. This includes:
parent0 at wherever
child0 at parent?
child* at parent?
parent* at wherever
child0 at parent?
child* at parent?
parent* at wherever
child0 at parent0
child* at parent1
If you try to attach a device to a parent, and the parent hasn't been
mentioned at all, then warn about the child being orphaned. Or perhaps
make it an error rather than a warning.
If the parent has been mentioned, but has also been cancelled via some
variant of the "no" syntax, then silently do the right thing. This
includes recursion, so
pci* at mainbus?
uhci* at pci?
usb* at uhci?
uhub* at usb?
uhub* at uhub?
umass* at uhub?
wd* at umass?
no usb
will just silently act like
pci* at mainbus?
uhci* at pci?
--apb (Alan Barrett)