From c932896af9f5e393966d41cf027a2a205a593960 Mon Sep 17 00:00:00 2001 From: Sascha Hauer Date: Tue, 26 Feb 2013 19:53:37 +0100 Subject: of_* commands: print usage when insufficient arguments are given Signed-off-by: Sascha Hauer --- commands/of_property.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'commands/of_property.c') 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"); -- cgit v1.2.3