forked from auracaster/openocd
ipdbg: simplify command chains
simplify ipdbg commands: $hub_name ipdbg start -> $hub_name start ipdbg/fix: While there, handle the multi-word deprecated commands by adding quotes. Change-Id: I5a56df2dbf2a5710442242727fa9384e5541ed53 Signed-off-by: Daniel Anselmi <danselmi@gmx.ch> Fixes: https://sourceforge.net/p/openocd/tickets/434/ Reported-by: Evgeniy Naydanov <evgeniy.naydanov@syntacore.com> Reviewed-on: https://review.openocd.org/c/openocd/+/8873 Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Tested-by: jenkins
This commit is contained in:
committed by
Antonio Borneo
parent
1afb3e75f0
commit
52ea420dd2
+11
-24
@@ -885,23 +885,6 @@ COMMAND_HANDLER(handle_ipdbg_stop_command)
|
||||
return ipdbg_stop(hub, tool);
|
||||
}
|
||||
|
||||
static const struct command_registration ipdbg_hostserver_subcommand_handlers[] = {
|
||||
{
|
||||
.name = "start",
|
||||
.mode = COMMAND_EXEC,
|
||||
.handler = handle_ipdbg_start_command,
|
||||
.help = "Starts a IPDBG Host server.",
|
||||
.usage = "-tool number -port port"
|
||||
}, {
|
||||
.name = "stop",
|
||||
.mode = COMMAND_EXEC,
|
||||
.handler = handle_ipdbg_stop_command,
|
||||
.help = "Stops a IPDBG Host server.",
|
||||
.usage = "-tool number"
|
||||
},
|
||||
COMMAND_REGISTRATION_DONE
|
||||
};
|
||||
|
||||
static COMMAND_HELPER(ipdbg_config_queuing, struct ipdbg_hub *hub, unsigned int size)
|
||||
{
|
||||
if (!hub)
|
||||
@@ -944,13 +927,18 @@ COMMAND_HANDLER(handle_ipdbg_cfg_queuing_command)
|
||||
|
||||
static const struct command_registration ipdbg_hub_subcommand_handlers[] = {
|
||||
{
|
||||
.name = "ipdbg",
|
||||
.name = "start",
|
||||
.mode = COMMAND_EXEC,
|
||||
.help = "IPDBG Hub commands.",
|
||||
.usage = "",
|
||||
.chain = ipdbg_hostserver_subcommand_handlers
|
||||
},
|
||||
{
|
||||
.handler = handle_ipdbg_start_command,
|
||||
.help = "Starts a IPDBG Host server.",
|
||||
.usage = "-tool number -port port"
|
||||
}, {
|
||||
.name = "stop",
|
||||
.mode = COMMAND_EXEC,
|
||||
.handler = handle_ipdbg_stop_command,
|
||||
.help = "Stops a IPDBG Host server.",
|
||||
.usage = "-tool number"
|
||||
}, {
|
||||
.name = "queuing",
|
||||
.handler = handle_ipdbg_cfg_queuing_command,
|
||||
.mode = COMMAND_ANY,
|
||||
@@ -1151,7 +1139,6 @@ static const struct command_registration ipdbg_command_handlers[] = {
|
||||
},
|
||||
COMMAND_REGISTRATION_DONE
|
||||
};
|
||||
|
||||
int ipdbg_register_commands(struct command_context *cmd_ctx)
|
||||
{
|
||||
return register_commands(cmd_ctx, NULL, ipdbg_command_handlers);
|
||||
|
||||
Reference in New Issue
Block a user