9
0
Fork 0

oftree command: Use of_print_nodes

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
Sascha Hauer 2013-02-17 19:12:13 +01:00
parent 32bbb9455d
commit 983686fc1f
1 changed files with 10 additions and 3 deletions

View File

@ -156,7 +156,14 @@ static int do_oftree(int argc, char *argv[])
if (dump) {
if (fdt) {
ret = fdt_print(fdt, node);
root = of_unflatten_dtb(NULL, fdt);
if (IS_ERR(root)) {
printf("parse oftree: %s\n", strerror(-PTR_ERR(root)));
ret = 1;
goto out;
}
of_print_nodes(root, 0);
of_free(root);
} else {
struct device_node *root, *n;
@ -174,10 +181,10 @@ static int do_oftree(int argc, char *argv[])
}
of_print_nodes(n, 0);
ret = 0;
}
ret = 0;
goto out;
}