[OpenBIOS] Adding new device in the middle of device-tree

Tarl Neustaedter tarl-b2 at tarl.net
Sun May 28 01:07:11 CEST 2017

On 2017-May-27 16:59 , BALATON Zoltan wrote:
> Is there a way to add a new device in the middle of the device tree
> (before or after an existing node) from Forth? If I try:
> dev / new-device " newdev" device-name finish-device show-devs
> /newdev appears at the end of the device-tree but that's not what I
> want. I need this device to go at a specific place in the middle but I
> could not find out how to achieve that. Any ideas?

Nope. That's the way it generally works, the node is added at the
beginning or end of a linked list for that level. You'd have to fiddle
with private structures to change the order.

But why do you care where it appears in the tree? You should always be
finding the node by name and/or unit address, so it shouldn't matter
what order things are in.

More information about the OpenBIOS mailing list