[PATCH 04/10] mtd-utils: nandwrite: switch "oobsize" for "writesize"

Brian Norris computersforpeace at gmail.com
Wed Nov 3 04:27:21 EDT 2010


The text of a printf() states that we're printing OOB area, but the
corresponding argument passes writesize. That probably wasn't the intent.

Signed-off-by: Brian Norris <computersforpeace at gmail.com>
---
 nandwrite.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/nandwrite.c b/nandwrite.c
index 66a9ef7..a3ac968 100644
--- a/nandwrite.c
+++ b/nandwrite.c
@@ -433,7 +433,7 @@ int main(int argc, char * const argv[])
 	// Check, if length fits into device
 	if (((imglen / pagelen) * meminfo.writesize) > (meminfo.size - mtdoffset)) {
 		fprintf(stderr, "Image %d bytes, NAND page %d bytes, OOB area %u bytes, device size %u bytes\n",
-				imglen, pagelen, meminfo.writesize, meminfo.size);
+				imglen, pagelen, meminfo.oobsize, meminfo.size);
 		perror("Input file does not fit into device");
 		goto closeall;
 	}
-- 
1.7.0.4





More information about the linux-mtd mailing list