From 61ba7a83ef46494689801ddaad569d7d174153b1 Mon Sep 17 00:00:00 2001 From: Doug Zongker Date: Sun, 12 Sep 2010 13:36:40 -0700 Subject: stop treating all-zero blocks as bad Change-Id: If49fa6485f66598d16a7e44fce3129de55fab422 --- mtdutils/mtdutils.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'mtdutils') diff --git a/mtdutils/mtdutils.c b/mtdutils/mtdutils.c index 3e354e3..c913a19 100644 --- a/mtdutils/mtdutils.c +++ b/mtdutils/mtdutils.c @@ -308,14 +308,7 @@ static int read_block(const MtdPartition *partition, int fd, char *data) "mtd: MEMGETBADBLOCK returned %d at 0x%08llx (errno=%d)\n", mgbb, pos, errno); } else { - int i; - for (i = 0; i < size; ++i) { - if (data[i] != 0) { - return 0; // Success! - } - } - fprintf(stderr, "mtd: read all-zero block at 0x%08llx; skipping\n", - pos); + return 0; // Success! } pos += partition->erase_size; -- cgit v1.1