pub unsafe extern "C" fn fdt_supernode_atdepth_offset(
fdt: *const c_void,
nodeoffset: c_int,
supernodedepth: c_int,
nodedepth: *mut c_int,
) -> c_intExpand description
fdt_supernode_atdepth_offset - find a specific ancestor of a node @fdt: pointer to the device tree blob @nodeoffset: offset of the node whose parent to find @supernodedepth: depth of the ancestor to find @nodedepth: pointer to an integer variable (will be overwritten) or NULL
fdt_supernode_atdepth_offset() finds an ancestor of the given node at a specific depth from the root (where the root itself has depth 0, its immediate subnodes depth 1 and so forth). So fdt_supernode_atdepth_offset(fdt, nodeoffset, 0, NULL); will always return 0, the offset of the root node. If the node at nodeoffset has depth D, then: fdt_supernode_atdepth_offset(fdt, nodeoffset, D, NULL); will return nodeoffset itself.
NOTE: This function is expensive, as it must scan the device tree structure from the start to nodeoffset.
returns: structure block offset of the node at node offset’s ancestor of depth supernodedepth (>=0), on success -FDT_ERR_BADOFFSET, nodeoffset does not refer to a BEGIN_NODE tag -FDT_ERR_NOTFOUND, supernodedepth was greater than the depth of nodeoffset -FDT_ERR_BADMAGIC, -FDT_ERR_BADVERSION, -FDT_ERR_BADSTATE, -FDT_ERR_BADSTRUCTURE, standard meanings