use COMMAND_HELPER for command helper functions

Define the numerous helpers that inherit command handler parameters
using the COMMAND_HELPER macro.
This commit is contained in:
Zachary T Welch
2009-11-10 03:12:21 -08:00
parent cfc4d5c6b7
commit 63a26b421b
6 changed files with 21 additions and 19 deletions

View File

@@ -1991,8 +1991,7 @@ static int arm11_build_reg_cache(target_t *target)
return ERROR_OK;
}
static int arm11_handle_bool(struct command_context_s *cmd_ctx,
char *cmd, char **args, int argc, bool * var, char * name)
static COMMAND_HELPER(arm11_handle_bool, bool *var, char *name)
{
if (argc == 0)
{
@@ -2143,7 +2142,7 @@ static int arm11_mcr(target_t *target, int cpnum,
return arm11_mrc_inner(target, cpnum, op1, op2, CRn, CRm, &value, false);
}
static int arm11_handle_etm_read_write(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc, bool read)
static COMMAND_HELPER(arm11_handle_etm_read_write, bool read)
{
if (argc != (read ? 2 : 3))
{