wic: filemap: Fixed spared_copy skip
This patches removes the empty space in front of the copied file which was skipped. Without this reduction it's not possible to place a partition with rawcopy and skip parameter on a desired alignment. (From OE-Core rev: 5c024d71f9413b81ee1707dbc41f0721f8f27bdb) Signed-off-by: Daniel Schultz <d.schultz@phytec.de> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
52de84763d
commit
8dddce21c4
|
@ -543,9 +543,9 @@ def sparse_copy(src_fname, dst_fname, offset=0, skip=0):
|
|||
end = (last + 1) * fmap.block_size
|
||||
|
||||
if start < skip < end:
|
||||
start = skip
|
||||
|
||||
fmap._f_image.seek(start, os.SEEK_SET)
|
||||
fmap._f_image.seek(skip, os.SEEK_SET)
|
||||
else:
|
||||
fmap._f_image.seek(start, os.SEEK_SET)
|
||||
dst_file.seek(offset + start, os.SEEK_SET)
|
||||
|
||||
chunk_size = 1024 * 1024
|
||||
|
|
Loading…
Reference in New Issue