summaryrefslogtreecommitdiff
path: root/livetree.c
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2008-07-07 11:19:13 +1000
committerJon Loeliger <jdl@jdl.com>2008-07-14 12:36:08 -0500
commit4d7bea7873590ee3a2bfc2905bef3ed8e84a0902 (patch)
tree7958ffdfb41410bdfe979c19973b55ccb67431ef /livetree.c
parent1409097db8be6ba662e3808654671554c5803bf0 (diff)
downloaddtc-4d7bea7873590ee3a2bfc2905bef3ed8e84a0902.tar.gz
dtc: Run relevant checks on dtb input as well as dts
This patch adjusts the testsuite to run most of the tests for the tree checking code on input in dtb form as well as dts form. Some checks which only make sense for dts input (like reference handling) are excluded, as are those which currently take dtb input because they rely on things which cannot be lexically constructed in a dts file. This shows up two small bugs in dtc, which are also corrected. First, the name_properties test which was is supposed to remove correctly formed 'name' properties (because they can be reconstructed from tne node name) was instead removing 'name' properties even if they weren't correct. Secondly, when using dtb or fs input, the runtime tree in dtc did not have the parent pointer initialized propertly because.built internally. The appropriate initialization is added to the add_child() function. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'livetree.c')
-rw-r--r--livetree.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/livetree.c b/livetree.c
index ba7e263..0ca3de5 100644
--- a/livetree.c
+++ b/livetree.c
@@ -115,6 +115,7 @@ void add_child(struct node *parent, struct node *child)
struct node **p;
child->next_sibling = NULL;
+ child->parent = parent;
p = &parent->children;
while (*p)