mirror of
https://github.com/dgibson/dtc.git
synced 2025-10-13 16:27:39 -04:00
dtc: Add ability to delete nodes and properties
dtc currently allows the contents of properties to be changed, and the contents of nodes to be added to. There are situations where removing properties or nodes may be useful. This change implements the following syntax to do that: / { /delete-property/ propname; /delete-node/ nodename; }; or: /delete-node/ &noderef; Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
parent
8716901d22
commit
45013d8619
10 changed files with 312 additions and 52 deletions
|
@ -263,6 +263,9 @@ static void flatten_tree(struct node *tree, struct emitter *emit,
|
|||
struct node *child;
|
||||
int seen_name_prop = 0;
|
||||
|
||||
if (tree->deleted)
|
||||
return;
|
||||
|
||||
emit->beginnode(etarget, tree->labels);
|
||||
|
||||
if (vi->flags & FTF_FULLPATH)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue