summaryrefslogtreecommitdiff
path: root/checks.c
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2007-11-20 16:24:23 +1100
committerJon Loeliger <jdl@freescale.com>2007-11-20 09:03:51 -0600
commit0d6ade254773aa4798fed1b2f1639ea2b8bdeb89 (patch)
tree35327bd6982564e41a04c13e14d9f74a056c1e30 /checks.c
parent2cf86939aff2692098396e7f25ce299e7195fa12 (diff)
downloaddtc-0d6ade254773aa4798fed1b2f1639ea2b8bdeb89.tar.gz
dtc: Add testcases for tree checks
This patch adds a group of testcases to check that dtc correctly rejects trees with various structural errors. To make things easier to test, we change dtc so that failing checks (as opposed to other errors) result in exit code 2. This patch also fixes an embarrasing bug uncovered by these new tests: check_phandles() worked out if the tree's phandles were valid, then throws that information away and returns success always. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'checks.c')
-rw-r--r--checks.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/checks.c b/checks.c
index f0e7505..0a34109 100644
--- a/checks.c
+++ b/checks.c
@@ -101,7 +101,7 @@ static int check_phandles(struct node *root, struct node *node)
for_each_child(node, child)
ok = ok && check_phandles(root, child);
- return 1;
+ return ok;
}
int check_structure(struct node *dt)