[oe-commits] [openembedded-core] 11/29: wic: filemap: Fixed spared_copy skip

git at git.openembedded.org git at git.openembedded.org
Thu Mar 9 22:18:22 UTC 2017


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master-next
in repository openembedded-core.

commit 4e70d42a438b26379f4c238fb732c0fda2993582
Author: Daniel Schultz <d.schultz at phytec.de>
AuthorDate: Tue Mar 7 14:41:56 2017 +0100

    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 at phytec.de>
    Signed-off-by: Ross Burton <ross.burton at intel.com>
---
 scripts/lib/wic/filemap.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/scripts/lib/wic/filemap.py b/scripts/lib/wic/filemap.py
index f3240ba..162603e 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

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list