am f94a3575: am 61ba7a83: stop treating all-zero blocks as bad

Merge commit 'f94a3575d76f1fd6df20f82ca28fff688d53cfbc'

* commit 'f94a3575d76f1fd6df20f82ca28fff688d53cfbc':
  stop treating all-zero blocks as bad
This commit is contained in:
Doug Zongker 2010-09-12 14:28:45 -07:00 committed by Android Git Automerger
commit 6a84721c76

View file

@ -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;