diff options
author | Doug Zongker <dougz@android.com> | 2010-09-12 22:36:40 +0200 |
---|---|---|
committer | Doug Zongker <dougz@android.com> | 2010-09-12 22:36:40 +0200 |
commit | 61ba7a83ef46494689801ddaad569d7d174153b1 (patch) | |
tree | 91f1a820b29f208741b16c6646f5878aeabb7b88 /mtdutils/mtdutils.c | |
parent | block is bad if ioctl() returns nonzero (diff) | |
download | android_bootable_recovery-61ba7a83ef46494689801ddaad569d7d174153b1.tar android_bootable_recovery-61ba7a83ef46494689801ddaad569d7d174153b1.tar.gz android_bootable_recovery-61ba7a83ef46494689801ddaad569d7d174153b1.tar.bz2 android_bootable_recovery-61ba7a83ef46494689801ddaad569d7d174153b1.tar.lz android_bootable_recovery-61ba7a83ef46494689801ddaad569d7d174153b1.tar.xz android_bootable_recovery-61ba7a83ef46494689801ddaad569d7d174153b1.tar.zst android_bootable_recovery-61ba7a83ef46494689801ddaad569d7d174153b1.zip |
Diffstat (limited to '')
-rw-r--r-- | mtdutils/mtdutils.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/mtdutils/mtdutils.c b/mtdutils/mtdutils.c index 3e354e334..c913a1945 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; |