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/avr32_ap7k.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/avr32_ap7k.c')
-rw-r--r-- | src/target/avr32_ap7k.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/target/avr32_ap7k.c b/src/target/avr32_ap7k.c index afac664..635fe46 100644 --- a/src/target/avr32_ap7k.c +++ b/src/target/avr32_ap7k.c @@ -115,7 +115,7 @@ static int avr32_read_core_reg(struct target *target, int num) struct avr32_ap7k_common *ap7k = target_to_ap7k(target); if ((num < 0) || (num >= AVR32NUMCOREREGS)) - return ERROR_INVALID_ARGUMENTS; + return ERROR_COMMAND_SYNTAX_ERROR; reg_value = ap7k->core_regs[num]; buf_set_u32(ap7k->core_cache->reg_list[num].value, 0, 32, reg_value); @@ -133,7 +133,7 @@ static int avr32_write_core_reg(struct target *target, int num) struct avr32_ap7k_common *ap7k = target_to_ap7k(target); if ((num < 0) || (num >= AVR32NUMCOREREGS)) - return ERROR_INVALID_ARGUMENTS; + return ERROR_COMMAND_SYNTAX_ERROR; reg_value = buf_get_u32(ap7k->core_cache->reg_list[num].value, 0, 32); ap7k->core_regs[num] = reg_value; @@ -487,7 +487,7 @@ static int avr32_ap7k_read_memory(struct target *target, uint32_t address, /* sanitize arguments */ if (((size != 4) && (size != 2) && (size != 1)) || (count == 0) || !(buffer)) - return ERROR_INVALID_ARGUMENTS; + return ERROR_COMMAND_SYNTAX_ERROR; if (((size == 4) && (address & 0x3u)) || ((size == 2) && (address & 0x1u))) return ERROR_TARGET_UNALIGNED_ACCESS; @@ -525,7 +525,7 @@ static int avr32_ap7k_write_memory(struct target *target, uint32_t address, /* sanitize arguments */ if (((size != 4) && (size != 2) && (size != 1)) || (count == 0) || !(buffer)) - return ERROR_INVALID_ARGUMENTS; + return ERROR_COMMAND_SYNTAX_ERROR; if (((size == 4) && (address & 0x3u)) || ((size == 2) && (address & 0x1u))) return ERROR_TARGET_UNALIGNED_ACCESS; |