summaryrefslogtreecommitdiffstats
path: root/mtdutils/mtdutils.c
diff options
context:
space:
mode:
authorDoug Zongker <dougz@android.com>2010-09-12 23:28:45 +0200
committerAndroid Git Automerger <android-git-automerger@android.com>2010-09-12 23:28:45 +0200
commit6a84721c7620ef57605c66c05fb6e8d0eff10d0d (patch)
tree7295a1be4831809693233d249d9b6dc3100e344c /mtdutils/mtdutils.c
parentam a2c9a1e8: am aaf3f56c: block is bad if ioctl() returns nonzero (diff)
parentam 61ba7a83: stop treating all-zero blocks as bad (diff)
downloadandroid_bootable_recovery-6a84721c7620ef57605c66c05fb6e8d0eff10d0d.tar
android_bootable_recovery-6a84721c7620ef57605c66c05fb6e8d0eff10d0d.tar.gz
android_bootable_recovery-6a84721c7620ef57605c66c05fb6e8d0eff10d0d.tar.bz2
android_bootable_recovery-6a84721c7620ef57605c66c05fb6e8d0eff10d0d.tar.lz
android_bootable_recovery-6a84721c7620ef57605c66c05fb6e8d0eff10d0d.tar.xz
android_bootable_recovery-6a84721c7620ef57605c66c05fb6e8d0eff10d0d.tar.zst
android_bootable_recovery-6a84721c7620ef57605c66c05fb6e8d0eff10d0d.zip
Diffstat (limited to 'mtdutils/mtdutils.c')
-rw-r--r--mtdutils/mtdutils.c9
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;