From: Zach W. <zw...@us...> - 2009-11-26 16:59:23
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Main OpenOCD repository". The branch, master has been updated via 3f8aa3cb035a97988fd38dfb08db5a4224f4b591 (commit) from 2653b8030722c85393974cd6c0ebcdbd1ae27c72 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 3f8aa3cb035a97988fd38dfb08db5a4224f4b591 Author: Eric Wetzel <the...@gm...> Date: Thu Nov 26 07:54:45 2009 -0800 fix 'flash protect' and 'flash erase_sector' Command upgrading introduced two off-by-one bugs in the flash commands. This patch fixes the 'flash {protect,erase_sector}' commands to check that they have been passed the correct number of arguments. Ammended during commit to fix help text for 'erase_address' too. diff --git a/src/flash/flash.c b/src/flash/flash.c index bbdbaa8..7023ef9 100644 --- a/src/flash/flash.c +++ b/src/flash/flash.c @@ -559,7 +559,7 @@ static int flash_check_sector_parameters(struct command_context *cmd_ctx, COMMAND_HANDLER(handle_flash_erase_command) { - if (CMD_ARGC != 2) + if (CMD_ARGC != 3) return ERROR_COMMAND_SYNTAX_ERROR; uint32_t bank_nr; @@ -599,7 +599,7 @@ COMMAND_HANDLER(handle_flash_erase_command) COMMAND_HANDLER(handle_flash_protect_command) { - if (CMD_ARGC != 3) + if (CMD_ARGC != 4) return ERROR_COMMAND_SYNTAX_ERROR; uint32_t bank_nr; @@ -1316,7 +1316,7 @@ static const struct command_registration flash_exec_command_handlers[] = { .name = "erase_address", .handler = &handle_flash_erase_address_command, .mode = COMMAND_EXEC, - .usage = "<bank> <address> <length>", + .usage = "<address> <length>", .help = "erase address range", }, ----------------------------------------------------------------------- Summary of changes: src/flash/flash.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) hooks/post-receive -- Main OpenOCD repository |