pub unsafe extern "C" fn fdt_node_depth(
fdt: *const c_void,
nodeoffset: c_int,
) -> c_intExpand description
fdt_node_depth - find the depth of a given node @fdt: pointer to the device tree blob @nodeoffset: offset of the node whose parent to find
fdt_node_depth() finds the depth of a given node. The root node has depth 0, its immediate subnodes depth 1 and so forth.
NOTE: This function is expensive, as it must scan the device tree structure from the start to nodeoffset.
returns: depth of the node at nodeoffset (>=0), on success -FDT_ERR_BADOFFSET, nodeoffset does not refer to a BEGIN_NODE tag -FDT_ERR_BADMAGIC, -FDT_ERR_BADVERSION, -FDT_ERR_BADSTATE, -FDT_ERR_BADSTRUCTURE, standard meanings