aboutsummaryrefslogtreecommitdiff
path: root/src/flash/nor/stellaris.c
diff options
context:
space:
mode:
authorMathias K <kesmtp@freenet.de>2011-12-16 07:48:39 +0100
committerØyvind Harboe <oyvindharboe@gmail.com>2012-01-04 17:56:46 +0000
commit16b6b5e7a86353dbc0c4823fe3d772c0faca7c1c (patch)
tree4950e26d07d60b16b3223e085227c583418c2ef8 /src/flash/nor/stellaris.c
parent42cb62cf3b47b982d6444948b483f9c6ce32de05 (diff)
Change return value on error.
On wrong parameters a error is signalized to the calling function. Change-Id: I484443fdb39938e20382edc9246d5ec546a5c960 Signed-off-by: Mathias K <kesmtp@freenet.de> Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com> Reviewed-on: http://openocd.zylin.com/282 Tested-by: jenkins Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
Diffstat (limited to 'src/flash/nor/stellaris.c')
-rw-r--r--src/flash/nor/stellaris.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/flash/nor/stellaris.c b/src/flash/nor/stellaris.c
index 7351aed9..c855995f 100644
--- a/src/flash/nor/stellaris.c
+++ b/src/flash/nor/stellaris.c
@@ -438,8 +438,7 @@ FLASH_BANK_COMMAND_HANDLER(stellaris_flash_bank_command)
if (CMD_ARGC < 6)
{
- LOG_WARNING("incomplete flash_bank stellaris configuration");
- return ERROR_FLASH_BANK_INVALID;
+ return ERROR_COMMAND_SYNTAX_ERROR;
}
stellaris_info = calloc(sizeof(struct stellaris_flash_bank), 1);
@@ -1351,8 +1350,7 @@ COMMAND_HANDLER(stellaris_handle_mass_erase_command)
if (CMD_ARGC < 1)
{
- command_print(CMD_CTX, "stellaris mass_erase <bank>");
- return ERROR_OK;
+ return ERROR_COMMAND_SYNTAX_ERROR;
}
struct flash_bank *bank;
@@ -1439,9 +1437,9 @@ done:
static const struct command_registration stellaris_exec_command_handlers[] = {
{
.name = "mass_erase",
+ .usage = "<bank>",
.handler = stellaris_handle_mass_erase_command,
.mode = COMMAND_EXEC,
- .usage = "bank_id",
.help = "erase entire device",
},
{