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.