summaryrefslogtreecommitdiffstats
path: root/commands
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2018-08-13 16:56:04 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2018-08-13 16:56:04 +0200
commitc1ecf62939df7256f6fc77568cb7953d71746c55 (patch)
tree49fff98953a40c85409fe6158d059d6fc11534b3 /commands
parent5c7690f9152b4b898654ee01e633ce5d677faf18 (diff)
parentf4d74a52a7d43c4973dc3996bc69d1956a6b304d (diff)
downloadbarebox-c1ecf62939df7256f6fc77568cb7953d71746c55.tar.gz
Merge branch 'for-next/misc'
Diffstat (limited to 'commands')
-rw-r--r--commands/of_node.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/commands/of_node.c b/commands/of_node.c
index 29cc371..28c4357 100644
--- a/commands/of_node.c
+++ b/commands/of_node.c
@@ -107,11 +107,10 @@ static int do_of_node(int argc, char *argv[])
}
}
- if (optind == argc)
+ if (optind + 1 != argc)
return COMMAND_ERROR_USAGE;
- if (optind < argc)
- path = argv[optind];
+ path = argv[optind];
if (!path)
return COMMAND_ERROR_USAGE;
@@ -147,7 +146,7 @@ BAREBOX_CMD_HELP_END
BAREBOX_CMD_START(of_node)
.cmd = do_of_node,
BAREBOX_CMD_DESC("create/delete nodes in the device tree")
- BAREBOX_CMD_OPTS("[-cd] [-f] NODE NAME")
+ BAREBOX_CMD_OPTS("[-cd] [-f] NODEPATH")
BAREBOX_CMD_GROUP(CMD_GRP_MISC)
BAREBOX_CMD_COMPLETE(devicetree_complete)
BAREBOX_CMD_HELP(cmd_of_node_help)