mirror of
https://github.com/dgibson/dtc.git
synced 2025-10-13 16:27:39 -04:00
Allow nodes to be referenced by path at the top level.
When nodes are modified by merging device trees, nodes to be updated/merged can be specified by a label. Specifying nodes by full path (instead of label) doesn't quite work. This patch fixes that. Signed-off-by: John Bonesio <bones@secretlab.ca> Acked-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
parent
c0fa2e6d4e
commit
73ae43ea44
4 changed files with 46 additions and 4 deletions
|
@ -131,13 +131,12 @@ devicetree:
|
|||
}
|
||||
| devicetree DT_REF nodedef
|
||||
{
|
||||
struct node *target;
|
||||
struct node *target = get_node_by_ref($1, $2);
|
||||
|
||||
target = get_node_by_label($1, $2);
|
||||
if (target)
|
||||
merge_nodes(target, $3);
|
||||
else
|
||||
print_error("label, '%s' not found", $2);
|
||||
print_error("label or path, '%s', not found", $2);
|
||||
$$ = $1;
|
||||
}
|
||||
;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue