mirror of
https://github.com/dgibson/dtc.git
synced 2025-12-08 12:45:29 -05:00
libfdt: Add fdt_parent_offset() and supporting functions
This patch adds an fdt_parent_offset() function which returns an offset to the parent node of a given node. It also adds two helper functions which are used to implement fdt_parent_offset() but are also exported: fdt_supernode_atdepth_offset() which returns the ancestor of a given node at a specified depth from the root of the tree, and fdt_node_depth() which returns the depth of a given node. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
parent
037db263e0
commit
1248237c7e
6 changed files with 314 additions and 2 deletions
|
|
@ -35,6 +35,8 @@ tree1_tests () {
|
|||
run_test get_name $TREE
|
||||
run_test getprop $TREE
|
||||
run_test get_path $TREE
|
||||
run_test supernode_atdepth_offset $TREE
|
||||
run_test parent_offset $TREE
|
||||
run_test notfound $TREE
|
||||
|
||||
# Write-in-place tests
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue