of_* commands: print usage when insufficient arguments are given
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
parent
9d8e08353c
commit
c932896af9
|
@ -54,6 +54,9 @@ static int do_of_node(int argc, char *argv[])
|
|||
}
|
||||
}
|
||||
|
||||
if (optind == argc)
|
||||
return COMMAND_ERROR_USAGE;
|
||||
|
||||
if (optind < argc) {
|
||||
path = argv[optind];
|
||||
}
|
||||
|
|
|
@ -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");
|
||||
|
|
Loading…
Reference in New Issue