summaryrefslogtreecommitdiffstats
path: root/lib/image-sparse.c
Commit message (Collapse)AuthorAgeFilesLines
* image-sparse: remove unused defineRouven Czerwinski2021-06-231-4/+0
| | | | | | | | | | | | CONFIG_FASTBOOT_FLASH_FILLBUF_SIZE is present since the very first addition of sparse image support. However its not used anywhere in the code, so remove it. Fixes: 13f649a4f960 ("Add support for fastboot sparse images") Signed-off-by: Rouven Czerwinski <r.czerwinski@pengutronix.de> Link: https://lore.barebox.org/20210621102706.586345-1-r.czerwinski@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* image-sparse: change chunk_data_sz to u64Steffen Trumtrar2021-01-131-2/+3
| | | | | | | | | | | chunk_data_sz is set to the result of a __le32 * __le32 multiplication: chunk_data_sz = si->sparse.blk_sz * si->chunk.chunk_sz; This will overflow. Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* image-sparse: change retlen to size_tSteffen Trumtrar2021-01-131-1/+1
| | | | | | | | retlen can potentially overflow. Also, write_full() in fastboot_handle_sparse() expects size_t anyway. Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* lib: image-sparse: Mark sparse_seek() as staticAndrey Smirnov2019-01-281-1/+1
| | | | | | | Mark sparse_seek() as static to avoid -Wmissing-prototypes warnings Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Add support for fastboot sparse imagesSascha Hauer2018-01-171-0/+249
This adds support for reading Android fastboot sparse images. This code is based on the corresponding U-Boot code, but has been heavily modified to provide a read-like API which better fits into barebox. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>