summaryrefslogtreecommitdiffstats
path: root/commands/oftree.c
diff options
context:
space:
mode:
authorJan Weitzel <j.weitzel@phytec.de>2013-12-19 09:39:28 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2014-01-06 10:25:25 +0100
commite4e1fd5f36b3c8170f3a9ac75e433ddff3d5e447 (patch)
tree1b221f27a1bcfb3ed85c0c1d28cdc75c3af193b7 /commands/oftree.c
parentc2ffad8855787cf7446b338dfd2841ec2da44a10 (diff)
downloadbarebox-e4e1fd5f36b3c8170f3a9ac75e433ddff3d5e447.tar.gz
barebox-e4e1fd5f36b3c8170f3a9ac75e433ddff3d5e447.tar.xz
oftree command: Allow free stored dtb before load
Don't return after freeing stored devicetree if also loading ist wanted. Allow "oftree -f -l my.dtb" Signed-off-by: Jan Weitzel <j.weitzel@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'commands/oftree.c')
-rw-r--r--commands/oftree.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/commands/oftree.c b/commands/oftree.c
index 475f0199ba..3fa516c2b0 100644
--- a/commands/oftree.c
+++ b/commands/oftree.c
@@ -88,7 +88,8 @@ static int do_oftree(int argc, char *argv[])
if (root)
of_delete_node(root);
- return 0;
+ if (!load)
+ return 0;
}
if (optind < argc)