aboutsummaryrefslogtreecommitdiff
path: root/src/target/image.c
diff options
context:
space:
mode:
authorØyvind Harboe <oyvind.harboe@zylin.com>2011-12-28 12:56:08 +0100
committerSpencer Oliver <spen@spen-soft.co.uk>2012-01-04 17:13:46 +0000
commit4668bd264cfe64c3e3ddd0f75cb5bf2e5e85f717 (patch)
tree049929193b5b50a98c7742b84fc9574235b0ae99 /src/target/image.c
parent54d6330b78f46678e78d1ffb265c65fcc8991e83 (diff)
downloadriscv-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/image.c')
-rw-r--r--src/target/image.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/target/image.c b/src/target/image.c
index d1db136..c0aabec 100644
--- a/src/target/image.c
+++ b/src/target/image.c
@@ -902,7 +902,7 @@ int image_read_section(struct image *image, int section, uint32_t offset, uint32
{
LOG_DEBUG("read past end of section: 0x%8.8" PRIx32 " + 0x%8.8" PRIx32 " > 0x%8.8" PRIx32 "",
offset, size, image->sections[section].size);
- return ERROR_INVALID_ARGUMENTS;
+ return ERROR_COMMAND_SYNTAX_ERROR;
}
if (image->type == IMAGE_BINARY)
@@ -911,7 +911,7 @@ int image_read_section(struct image *image, int section, uint32_t offset, uint32
/* only one section in a plain binary */
if (section != 0)
- return ERROR_INVALID_ARGUMENTS;
+ return ERROR_COMMAND_SYNTAX_ERROR;
/* seek to offset */
if ((retval = fileio_seek(&image_binary->fileio, offset)) != ERROR_OK)
@@ -999,7 +999,7 @@ int image_add_section(struct image *image, uint32_t base, uint32_t size, int fla
/* only image builder supports adding sections */
if (image->type != IMAGE_BUILDER)
- return ERROR_INVALID_ARGUMENTS;
+ return ERROR_COMMAND_SYNTAX_ERROR;
/* see if there's a previous section */
if (image->num_sections)