Pushed, with another minor-but-related help text fix. Thanks! --Z
On Wed, 2009-11-25 at 08:36 -0500, Eric Wetzel wrote: > Hello, > > 'flash erase_sector' and 'flash protect' have not been working for me > recently. Passing them the correct number of arguments (3 and 4, > respectively) returns the usage message, but passing them each one > argument less than they require crashes the program. > > I believe the problem was introduced in commit > ff61e6a37ce79f00957fc5aeb304291e5fa06323. > > I've included a trivial patch and tested that those changes work. > > Thanks, > ~Eric > > diff --git a/src/flash/flash.c b/src/flash/flash.c > index e2136b7..0a735f9 100644 > --- a/src/flash/flash.c > +++ b/src/flash/flash.c > @@ -555,7 +555,7 @@ static int flash_check_sector_parameters(struct > command_cont > ext *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; > @@ -595,7 +595,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; > _______________________________________________ > Openocd-development mailing list > Openocd-development@lists.berlios.de > https://lists.berlios.de/mailman/listinfo/openocd-development _______________________________________________ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development