From: Stian Skjelsad Date: Sat, 18 Feb 2012 14:29:20 +0000 (+0100) Subject: Sometime in the past, nand_fileio_finish started to return ERROR_OK (with the value... X-Git-Tag: v0.6.0-rc1~229 X-Git-Url: https://review.openocd.org/gitweb?p=openocd.git;a=commitdiff_plain;h=2f944a34100e2824afe199fe744904465482d6d1 Sometime in the past, nand_fileio_finish started to return ERROR_OK (with the value of zero) on success. Change-Id: Ifb743c1617e2a6071a87c901fae8165969efcdbf Signed-off-by: Stian Skjelstad Reviewed-on: http://openocd.zylin.com/468 Tested-by: jenkins Reviewed-by: Spencer Oliver --- diff --git a/src/flash/nand/tcl.c b/src/flash/nand/tcl.c index 6f942d27f3..a06284d29b 100644 --- a/src/flash/nand/tcl.c +++ b/src/flash/nand/tcl.c @@ -271,7 +271,7 @@ COMMAND_HANDLER(handle_nand_write_command) s.address += s.page_size; } - if (nand_fileio_finish(&s)) { + if (nand_fileio_finish(&s) == ERROR_OK) { command_print(CMD_CTX, "wrote file %s to NAND flash %s up to " "offset 0x%8.8" PRIx32 " in %fs (%0.3f KiB/s)", CMD_ARGV[1], CMD_ARGV[0], s.address, duration_elapsed(&s.bench),