target/arm966e: change prototype of arm966e_verify_pointer()
To prepare for handling TCL return values consistently, all calls to command_print/command_print_sameline should be ready to switch to CMD as first parameter. Change prototype of arm966e_verify_pointer() to pass CMD instead of CMD_CTX. This change was part of http://openocd.zylin.com/1815 from Paul Fertser and has been extracted and rebased to simplify the review. Change-Id: I92745591256ad56a588b6386842028e0b18dec96 Signed-off-by: Paul Fertser <fercerpav@gmail.com> Signed-off-by: Tomas Vanek <vanekt@fbl.cz> Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: http://openocd.zylin.com/5058 Tested-by: jenkinsbscan_optimization
parent
c104617584
commit
6a453e5cf0
|
@ -56,11 +56,11 @@ static int arm966e_target_create(struct target *target, Jim_Interp *interp)
|
|||
return arm966e_init_arch_info(target, arm966e, target->tap);
|
||||
}
|
||||
|
||||
static int arm966e_verify_pointer(struct command_context *cmd_ctx,
|
||||
static int arm966e_verify_pointer(struct command_invocation *cmd,
|
||||
struct arm966e_common *arm966e)
|
||||
{
|
||||
if (arm966e->common_magic != ARM966E_COMMON_MAGIC) {
|
||||
command_print(cmd_ctx, "target is not an ARM966");
|
||||
command_print(cmd->ctx, "target is not an ARM966");
|
||||
return ERROR_TARGET_INVALID;
|
||||
}
|
||||
return ERROR_OK;
|
||||
|
@ -170,7 +170,7 @@ COMMAND_HANDLER(arm966e_handle_cp15_command)
|
|||
struct target *target = get_current_target(CMD_CTX);
|
||||
struct arm966e_common *arm966e = target_to_arm966(target);
|
||||
|
||||
retval = arm966e_verify_pointer(CMD_CTX, arm966e);
|
||||
retval = arm966e_verify_pointer(CMD, arm966e);
|
||||
if (retval != ERROR_OK)
|
||||
return retval;
|
||||
|
||||
|
|
Loading…
Reference in New Issue