helper/command: pass command prefix to command registration
Replace the "struct command *parent" parameter with a string that contains the command prefix. This abstracts the openocd code from the knowledge of the tree of struct command. This also makes unused the function command_find_in_context(), so remove it. Change-Id: I598d60719cfdc1811ee6f6edfff8a116f82c7ed6 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: http://openocd.zylin.com/5668 Tested-by: jenkins Reviewed-by: Oleksij Rempel <linux@rempel-privat.de>
This commit is contained in:
@@ -2107,6 +2107,5 @@ static const struct command_registration etm_exec_command_handlers[] = {
|
||||
|
||||
static int etm_register_user_commands(struct command_context *cmd_ctx)
|
||||
{
|
||||
struct command *etm_cmd = command_find_in_context(cmd_ctx, "etm");
|
||||
return register_commands(cmd_ctx, etm_cmd, etm_exec_command_handlers);
|
||||
return register_commands(cmd_ctx, "etm", etm_exec_command_handlers);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user