NAND: Misleading report of erased blocks
authorTimo Ketola <timo@exertus.fi>
Tue, 17 Jan 2012 08:47:11 +0000 (10:47 +0200)
committerSpencer Oliver <spen@spen-soft.co.uk>
Mon, 23 Jan 2012 11:47:06 +0000 (11:47 +0000)
For example, when blocks 2 and 3 were erased, openocd reported "erased blocks 2 to 4". That should be "2 to 3", I think.

Change-Id: Icece63dedd3dd931b70fa73616819a19572e39de
Signed-off-by: Timo Ketola <timo@exertus.fi>
Reviewed-on: http://openocd.zylin.com/385
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
src/flash/nand/tcl.c

index 6389377..c52c347 100644 (file)
@@ -196,7 +196,7 @@ COMMAND_HANDLER(handle_nand_erase_command)
        {
                command_print(CMD_CTX, "erased blocks %lu to %lu "
                                "on NAND flash device #%s '%s'",
-                               offset, offset + length,
+                               offset, offset + length - 1,
                                CMD_ARGV[0], p->device->name);
        }