From: OpenOCD-Gerrit <ope...@us...> - 2021-04-18 14:36:29
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Main OpenOCD repository". The branch, master has been updated via d3a687432f96d90fdaa7c1264cf2c17df3ad58c1 (commit) from 6b5e77ada6520398f9a2135e43e60067bc072e27 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit d3a687432f96d90fdaa7c1264cf2c17df3ad58c1 Author: Antonio Borneo <bor...@gm...> Date: Mon Aug 3 23:03:46 2020 +0200 helper/command: rename s/command_unknown/jim_command_dispatch/ The function's name was consistent with its purpose to handle commands that were not at root level, thus not directly 'known' by jimtcl. Rename it as jim_command_dispatch() to highlight that now it is a jim_handler and its purpose is to dispatch the call to the proper command handler. Change-Id: I9491a6d6459b8eb37a6c402abcae08388c693764 Signed-off-by: Antonio Borneo <bor...@gm...> Reviewed-on: http://openocd.zylin.com/5791 Tested-by: jenkins Reviewed-by: Oleksij Rempel <li...@re...> diff --git a/src/helper/command.c b/src/helper/command.c index a7990d4f8..80e297b1f 100644 --- a/src/helper/command.c +++ b/src/helper/command.c @@ -51,7 +51,7 @@ struct log_capture_state { static int unregister_command(struct command_context *context, const char *cmd_prefix, const char *name); -static int command_unknown(Jim_Interp *interp, int argc, Jim_Obj * const *argv); +static int jim_command_dispatch(Jim_Interp *interp, int argc, Jim_Obj * const *argv); static int help_add_command(struct command_context *cmd_ctx, const char *cmd_name, const char *help_text, const char *usage_text); static int help_del_command(struct command_context *cmd_ctx, const char *cmd_name); @@ -64,7 +64,7 @@ static inline bool jimcmd_is_proc(Jim_Cmd *cmd) static inline bool jimcmd_is_ocd_command(Jim_Cmd *cmd) { - return !cmd->isproc && cmd->u.native.cmdProc == command_unknown; + return !cmd->isproc && cmd->u.native.cmdProc == jim_command_dispatch; } static inline void *jimcmd_privdata(Jim_Cmd *cmd) @@ -340,7 +340,7 @@ static struct command *register_command(struct command_context *context, LOG_DEBUG("registering '%s'...", full_name); int retval = Jim_CreateCommand(context->interp, full_name, - command_unknown, c, command_free); + jim_command_dispatch, c, command_free); if (retval != JIM_OK) { command_run_linef(context, "del_help_text {%s}", full_name); command_run_linef(context, "del_usage_text {%s}", full_name); @@ -942,7 +942,7 @@ static int exec_command(Jim_Interp *interp, struct command_context *cmd_ctx, return command_retval_set(interp, retval); } -static int command_unknown(Jim_Interp *interp, int argc, Jim_Obj *const *argv) +static int jim_command_dispatch(Jim_Interp *interp, int argc, Jim_Obj * const *argv) { script_debug(interp, argc, argv); @@ -982,7 +982,7 @@ static int command_unknown(Jim_Interp *interp, int argc, Jim_Obj *const *argv) * current_target_override is used also for event handlers * therefore we prevent touching it if command has no prefix. * Previous override is saved and restored back to ensure - * correct work when command_unknown() is re-entered. + * correct work when jim_command_dispatch() is re-entered. */ struct target *saved_target_override = cmd_ctx->current_target_override; if (c->jim_override_target) ----------------------------------------------------------------------- Summary of changes: src/helper/command.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) hooks/post-receive -- Main OpenOCD repository |