summaryrefslogtreecommitdiffstats
path: root/commands/of_property.c
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2013-02-26 19:53:37 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2013-03-06 11:41:29 +0100
commitc932896af9f5e393966d41cf027a2a205a593960 (patch)
treecb5effa589ca87cb7658d6169c806d98b20e08c0 /commands/of_property.c
parent9d8e08353cf8628d41335b9c5910bd352ef75f4d (diff)
downloadbarebox-c932896af9f5e393966d41cf027a2a205a593960.tar.gz
barebox-c932896af9f5e393966d41cf027a2a205a593960.tar.xz
of_* commands: print usage when insufficient arguments are given
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'commands/of_property.c')
-rw-r--r--commands/of_property.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/commands/of_property.c b/commands/of_property.c
index 585522c3d4..bd9ff72fbc 100644
--- a/commands/of_property.c
+++ b/commands/of_property.c
@@ -192,6 +192,9 @@ static int do_of_property(int argc, char *argv[])
}
}
+ if (optind == argc)
+ return COMMAND_ERROR_USAGE;
+
root = of_get_root_node();
if (!root) {
printf("root node not set\n");