diff options
author | Doug Zongker <dougz@android.com> | 2010-09-12 14:23:25 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2010-09-12 14:23:25 -0700 |
commit | f94a3575d76f1fd6df20f82ca28fff688d53cfbc (patch) | |
tree | 91f1a820b29f208741b16c6646f5878aeabb7b88 | |
parent | a2c9a1e8a2b99bd8197c83b2f749ec61bc0312f8 (diff) | |
parent | 61ba7a83ef46494689801ddaad569d7d174153b1 (diff) | |
download | bootable_recovery-f94a3575d76f1fd6df20f82ca28fff688d53cfbc.zip bootable_recovery-f94a3575d76f1fd6df20f82ca28fff688d53cfbc.tar.gz bootable_recovery-f94a3575d76f1fd6df20f82ca28fff688d53cfbc.tar.bz2 |
am 61ba7a83: stop treating all-zero blocks as bad
Merge commit '61ba7a83ef46494689801ddaad569d7d174153b1' into gingerbread-plus-aosp
* commit '61ba7a83ef46494689801ddaad569d7d174153b1':
stop treating all-zero blocks as bad
-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 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; |