summaryrefslogtreecommitdiff
path: root/dtc.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 /dtc.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 'dtc.c')
-rw-r--r--dtc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/dtc.c b/dtc.c
index bbef829..602b296 100644
--- a/dtc.c
+++ b/dtc.c
@@ -197,7 +197,7 @@ int main(int argc, char *argv[])
if (!structure_ok) {
if (!force) {
fprintf(stderr, "ERROR: Input tree has structural errors, aborting (use -f to force output)\n");
- exit(1);
+ exit(2);
} else if (quiet < 3) {
fprintf(stderr, "Warning: Input tree has structural errors, output forced\n");
}