OF_child(9freebsd)

OF_child9freebsd

Navigate device tree

Usage

#include <dev/ofw/ofw_bus.h>

#include <dev/ofw/ofw_bus_subr.h>

phandle_t

OF_child(phandle_t node);

phandle_t

OF_parent(phandle_t node);

phandle_t

OF_peer(phandle_t node);

Overview

OF_child() returns the phandle value of the first child of the node. Zero is returned if there are no child nodes.

OF_parent() returns the phandle for the parent of the node. Zero is returned if node is the root node.

OF_peer() returns the phandle value of the next sibling of the node. Zero is returned if there is no sibling node.

Examples

phandle_t node, child;
 ...
for (child = OF_child(node); child != 0; child = OF_peer(child) {
	...
}

Releases

4 releases since Debian 10 (Buster); the text changed 1 time.

  1. 10
  2. 11–13

Authors

This manual page was written by Oleksandr Tymoshenko ⟨[email protected]⟩.

From freebsd-manpages 12.2-2 in Debian 13 (Trixie). Parsed by carta from the page's mdoc source.