diff options
author | Øyvind Harboe <oyvind.harboe@zylin.com> | 2011-12-28 12:56:08 +0100 |
---|---|---|
committer | Spencer Oliver <spen@spen-soft.co.uk> | 2012-01-04 17:13:46 +0000 |
commit | 4668bd264cfe64c3e3ddd0f75cb5bf2e5e85f717 (patch) | |
tree | 049929193b5b50a98c7742b84fc9574235b0ae99 /src/target/armv7m.c | |
parent | 54d6330b78f46678e78d1ffb265c65fcc8991e83 (diff) | |
download | riscv-openocd-4668bd264cfe64c3e3ddd0f75cb5bf2e5e85f717.zip riscv-openocd-4668bd264cfe64c3e3ddd0f75cb5bf2e5e85f717.tar.gz riscv-openocd-4668bd264cfe64c3e3ddd0f75cb5bf2e5e85f717.tar.bz2 |
retire ERROR_INVALID_ARGUMENTS and replace with ERROR_COMMAND_SYNTAX_ERROR
Change-Id: I6dee51e1fab1944085391f274a343cdb9014c7a4
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Reviewed-on: http://openocd.zylin.com/300
Tested-by: jenkins
Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
Diffstat (limited to 'src/target/armv7m.c')
-rw-r--r-- | src/target/armv7m.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/target/armv7m.c b/src/target/armv7m.c index d9e63d7..d8aed89 100644 --- a/src/target/armv7m.c +++ b/src/target/armv7m.c @@ -206,7 +206,7 @@ static int armv7m_read_core_reg(struct target *target, unsigned num) struct armv7m_common *armv7m = target_to_armv7m(target); if (num >= ARMV7M_NUM_REGS) - return ERROR_INVALID_ARGUMENTS; + return ERROR_COMMAND_SYNTAX_ERROR; armv7m_core_reg = armv7m->core_cache->reg_list[num].arch_info; retval = armv7m->load_core_reg_u32(target, armv7m_core_reg->type, armv7m_core_reg->num, ®_value); @@ -225,7 +225,7 @@ static int armv7m_write_core_reg(struct target *target, unsigned num) struct armv7m_common *armv7m = target_to_armv7m(target); if (num >= ARMV7M_NUM_REGS) - return ERROR_INVALID_ARGUMENTS; + return ERROR_COMMAND_SYNTAX_ERROR; reg_value = buf_get_u32(armv7m->core_cache->reg_list[num].value, 0, 32); armv7m_core_reg = armv7m->core_cache->reg_list[num].arch_info; @@ -363,13 +363,13 @@ int armv7m_start_algorithm(struct target *target, if (!reg) { LOG_ERROR("BUG: register '%s' not found", reg_params[i].reg_name); - return ERROR_INVALID_ARGUMENTS; + return ERROR_COMMAND_SYNTAX_ERROR; } if (reg->size != reg_params[i].size) { LOG_ERROR("BUG: register '%s' size doesn't match reg_params[i].size", reg_params[i].reg_name); - return ERROR_INVALID_ARGUMENTS; + return ERROR_COMMAND_SYNTAX_ERROR; } // regvalue = buf_get_u32(reg_params[i].value, 0, 32); @@ -452,13 +452,13 @@ int armv7m_wait_algorithm(struct target *target, if (!reg) { LOG_ERROR("BUG: register '%s' not found", reg_params[i].reg_name); - return ERROR_INVALID_ARGUMENTS; + return ERROR_COMMAND_SYNTAX_ERROR; } if (reg->size != reg_params[i].size) { LOG_ERROR("BUG: register '%s' size doesn't match reg_params[i].size", reg_params[i].reg_name); - return ERROR_INVALID_ARGUMENTS; + return ERROR_COMMAND_SYNTAX_ERROR; } buf_set_u32(reg_params[i].value, 0, 32, buf_get_u32(reg->value, 0, 32)); |