From 4668bd264cfe64c3e3ddd0f75cb5bf2e5e85f717 Mon Sep 17 00:00:00 2001 From: Øyvind Harboe Date: Wed, 28 Dec 2011 12:56:08 +0100 Subject: retire ERROR_INVALID_ARGUMENTS and replace with ERROR_COMMAND_SYNTAX_ERROR MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I6dee51e1fab1944085391f274a343cdb9014c7a4 Signed-off-by: Øyvind Harboe Reviewed-on: http://openocd.zylin.com/300 Tested-by: jenkins Reviewed-by: Øyvind Harboe Reviewed-by: Spencer Oliver --- src/target/image.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/target/image.c') diff --git a/src/target/image.c b/src/target/image.c index d1db136b..c0aabecd 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) -- cgit v1.2.3-18-g5258