diff options
author | Daniel Schultz <d.schultz@phytec.de> | 2017-03-07 14:41:56 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-03-10 14:50:10 +0000 |
commit | 8dddce21c4613e3cda5ec5d3c83e6ed1d9ef44ea (patch) | |
tree | 167f100e33c72ed3785716276bf42e463f3be336 /scripts | |
parent | 52de84763d4eff2c7336066bcb3fde92cb413a11 (diff) | |
download | poky-8dddce21c4613e3cda5ec5d3c83e6ed1d9ef44ea.tar.gz |
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>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/lib/wic/filemap.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/lib/wic/filemap.py b/scripts/lib/wic/filemap.py index f3240ba8d8..162603ed0a 100644 --- a/scripts/lib/wic/filemap.py +++ b/scripts/lib/wic/filemap.py | |||
@@ -543,9 +543,9 @@ def sparse_copy(src_fname, dst_fname, offset=0, skip=0): | |||
543 | end = (last + 1) * fmap.block_size | 543 | end = (last + 1) * fmap.block_size |
544 | 544 | ||
545 | if start < skip < end: | 545 | if start < skip < end: |
546 | start = skip | 546 | fmap._f_image.seek(skip, os.SEEK_SET) |
547 | 547 | else: | |
548 | fmap._f_image.seek(start, os.SEEK_SET) | 548 | fmap._f_image.seek(start, os.SEEK_SET) |
549 | dst_file.seek(offset + start, os.SEEK_SET) | 549 | dst_file.seek(offset + start, os.SEEK_SET) |
550 | 550 | ||
551 | chunk_size = 1024 * 1024 | 551 | chunk_size = 1024 * 1024 |