From 2f944a34100e2824afe199fe744904465482d6d1 Mon Sep 17 00:00:00 2001 From: Stian Skjelsad Date: Sat, 18 Feb 2012 15:29:20 +0100 Subject: [PATCH] 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 --- src/flash/nand/tcl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/flash/nand/tcl.c b/src/flash/nand/tcl.c index 6f942d27..a06284d2 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), -- 2.39.5