summaryrefslogtreecommitdiffstats
path: root/include/ubiformat.h
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2018-01-10 14:20:57 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2018-01-11 08:32:41 +0100
commit91e08222389da159944d918bbe6eee7510da8872 (patch)
tree570c5a01a24cf8cd2ef0932cff521074a1f95a12 /include/ubiformat.h
parente0e4c722c98737a4202b9fabc60bff6d2c6050f4 (diff)
downloadbarebox-91e08222389da159944d918bbe6eee7510da8872.tar.gz
barebox-91e08222389da159944d918bbe6eee7510da8872.tar.xz
ubiformat: Add ubiformat write function
The ubiformat C API expects an image file as argument. With upcoming Android fastboot sparse image support we can no longer provide a complete image anymore. With this patch we can write an image in multiple chunks after we've formatted a MTD device with ubiformat. ubiformat_write will skip the EC header in both the MTD device we write to and also the image we read from, so we can flash an image on a MTD device containing EC headers already. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include/ubiformat.h')
-rw-r--r--include/ubiformat.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/ubiformat.h b/include/ubiformat.h
index b195fd8392..8305a853c7 100644
--- a/include/ubiformat.h
+++ b/include/ubiformat.h
@@ -20,4 +20,7 @@ struct ubiformat_args {
int ubiformat(struct mtd_info *mtd, struct ubiformat_args *args);
+int ubiformat_write(struct mtd_info *mtd, const void *buf, size_t count,
+ loff_t offset);
+
#endif /* __UBIFORMAT_H */