summaryrefslogtreecommitdiffstats
path: root/scripts/lib/wic/filemap.py
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/lib/wic/filemap.py')
-rw-r--r--scripts/lib/wic/filemap.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/scripts/lib/wic/filemap.py b/scripts/lib/wic/filemap.py
index 080668e7c2..1f1aacc522 100644
--- a/scripts/lib/wic/filemap.py
+++ b/scripts/lib/wic/filemap.py
@@ -530,9 +530,11 @@ def filemap(image, log=None):
530 except ErrorNotSupp: 530 except ErrorNotSupp:
531 return FilemapSeek(image, log) 531 return FilemapSeek(image, log)
532 532
533def sparse_copy(src_fname, dst_fname, offset=0, skip=0): 533def sparse_copy(src_fname, dst_fname, offset=0, skip=0, api=None):
534 """Efficiently copy sparse file to or into another file.""" 534 """Efficiently copy sparse file to or into another file."""
535 fmap = filemap(src_fname) 535 if not api:
536 api = filemap
537 fmap = api(src_fname)
536 try: 538 try:
537 dst_file = open(dst_fname, 'r+b') 539 dst_file = open(dst_fname, 'r+b')
538 except IOError: 540 except IOError: