aboutsummaryrefslogtreecommitdiffstats
path: root/mtdutils/mtdutils.h
diff options
context:
space:
mode:
authorDoug Zongker <dougz@android.com>2010-01-12 16:18:33 -0800
committerDoug Zongker <dougz@android.com>2010-01-13 09:21:25 -0800
commit4c5f9f341665ac4c1474afca92863cc02d9e1a13 (patch)
tree9af56e12944b3e3a3f9981c6fc4041331be37d19 /mtdutils/mtdutils.h
parentbe47155f754d6070c93614eed8549a30742bd091 (diff)
downloadbootable_recovery-4c5f9f341665ac4c1474afca92863cc02d9e1a13.zip
bootable_recovery-4c5f9f341665ac4c1474afca92863cc02d9e1a13.tar.gz
bootable_recovery-4c5f9f341665ac4c1474afca92863cc02d9e1a13.tar.bz2
make offsets in firmware update header not point to bad blocks
hboot will apparently fail to install if the first block of the image (the one pointed to by the offset in the block 0 header) is a bad block. (Hopefully it handles subsequent bad blocks.) This change makes the MTD write code keep track of the bad blocks it has skipped over, so that the offset in the header can be adjusted to be the address of the first successfully written block. Change-Id: I45d58e32a36d0c1dbc0a7f871bd5985b6c8ff524 http://b/2358012 - passion: failure to flash hboot (bad blocks?)
Diffstat (limited to 'mtdutils/mtdutils.h')
-rw-r--r--mtdutils/mtdutils.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/mtdutils/mtdutils.h b/mtdutils/mtdutils.h
index 8d2cb56..528a5bb 100644
--- a/mtdutils/mtdutils.h
+++ b/mtdutils/mtdutils.h
@@ -49,6 +49,7 @@ void mtd_read_close(MtdReadContext *);
MtdWriteContext *mtd_write_partition(const MtdPartition *);
ssize_t mtd_write_data(MtdWriteContext *, const char *data, size_t data_len);
off_t mtd_erase_blocks(MtdWriteContext *, int blocks); /* 0 ok, -1 for all */
+off_t mtd_find_write_start(MtdWriteContext *ctx, off_t pos);
int mtd_write_close(MtdWriteContext *);
#endif // MTDUTILS_H_