aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Schultz <d.schultz@phytec.de>2017-03-07 14:41:56 +0100
committerArmin Kuster <akuster808@gmail.com>2017-04-01 08:41:18 -0400
commit7b316f0ec53ef645ec0173b97c99f724d6239ef0 (patch)
tree772b1979062f27c105f99a293e821247b158e0dd
parent4b6cf8184c713304e1c5d46957b39c4be9e4d48e (diff)
downloadopenembedded-core-contrib-7b316f0ec53ef645ec0173b97c99f724d6239ef0.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. Signed-off-by: Daniel Schultz <d.schultz@phytec.de> Signed-off-by: Ross Burton <ross.burton@intel.com> (cherry picked from commit 5c024d71f9413b81ee1707dbc41f0721f8f27bdb) Signed-off-by: Armin Kuster <akuster808@gmail.com>
-rw-r--r--scripts/lib/wic/filemap.py6
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):
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