mirror of
https://github.com/pengutronix/genimage.git
synced 2024-11-23 09:43:50 +08:00
Dont replace holes in sparse files with non-0 bytes when creating flash
images Signed-off-by: Hudson Ayers <hudson.ayers@getcruise.com>
This commit is contained in:
parent
fcf9480cbf
commit
89efde17b0
2
util.c
2
util.c
@ -585,7 +585,7 @@ int insert_image(struct image *image, struct image *sub,
|
||||
* have an extent that starts beyond size.
|
||||
*/
|
||||
len = min(len, size);
|
||||
ret = write_bytes(fd, len, offset, byte);
|
||||
ret = write_bytes(fd, len, offset, 0); // Assumes 'holes' are always 0 bytes
|
||||
if (ret) {
|
||||
image_error(image, "writing %zu bytes failed: %s\n", len, strerror(-ret));
|
||||
goto out;
|
||||
|
Loading…
Reference in New Issue
Block a user