projects
/
fw
/
openocd
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Change return value on error.
[fw/openocd]
/
src
/
flash
/
nor
/
stellaris.c
diff --git
a/src/flash/nor/stellaris.c
b/src/flash/nor/stellaris.c
index 7351aed950726f38b8dd3bf403f4edf12ccb88cb..c855995f7d8129377f4efc0ee291f9f67bc73800 100644
(file)
--- 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)
{
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);
}
stellaris_info = calloc(sizeof(struct stellaris_flash_bank), 1);
@@
-1351,8
+1350,7
@@
COMMAND_HANDLER(stellaris_handle_mass_erase_command)
if (CMD_ARGC < 1)
{
if (CMD_ARGC < 1)
{
- command_print(CMD_CTX, "stellaris mass_erase <bank>");
- return ERROR_OK;
+ return ERROR_COMMAND_SYNTAX_ERROR;
}
struct flash_bank *bank;
}
struct flash_bank *bank;
@@
-1439,9
+1437,9
@@
done:
static const struct command_registration stellaris_exec_command_handlers[] = {
{
.name = "mass_erase",
static const struct command_registration stellaris_exec_command_handlers[] = {
{
.name = "mass_erase",
+ .usage = "<bank>",
.handler = stellaris_handle_mass_erase_command,
.mode = COMMAND_EXEC,
.handler = stellaris_handle_mass_erase_command,
.mode = COMMAND_EXEC,
- .usage = "bank_id",
.help = "erase entire device",
},
{
.help = "erase entire device",
},
{