summaryrefslogtreecommitdiffstats
path: root/scripts/lib/wic/engine.py
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/lib/wic/engine.py')
-rw-r--r--scripts/lib/wic/engine.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/scripts/lib/wic/engine.py b/scripts/lib/wic/engine.py
index 6a4f55f348..a48c4adafb 100644
--- a/scripts/lib/wic/engine.py
+++ b/scripts/lib/wic/engine.py
@@ -310,6 +310,14 @@ class Disk:
310 self._get_part_image(pnum), 310 self._get_part_image(pnum),
311 path)) 311 path))
312 312
313 def copy(self, src, pnum, path):
314 """Copy partition image into wic image."""
315 cmd = "{} -i {} -snop {} ::{}".format(self.mcopy,
316 self._get_part_image(pnum),
317 src, path)
318 exec_cmd(cmd)
319 self._put_part_image(pnum)
320
313def wic_ls(args, native_sysroot): 321def wic_ls(args, native_sysroot):
314 """List contents of partitioned image or vfat partition.""" 322 """List contents of partitioned image or vfat partition."""
315 disk = Disk(args.path.image, native_sysroot) 323 disk = Disk(args.path.image, native_sysroot)
@@ -329,7 +337,8 @@ def wic_cp(args, native_sysroot):
329 Copy local file or directory to the vfat partition of 337 Copy local file or directory to the vfat partition of
330 partitioned image. 338 partitioned image.
331 """ 339 """
332 pass 340 disk = Disk(args.dest.image, native_sysroot)
341 disk.copy(args.src, args.dest.part, args.dest.path)
333 342
334def find_canned(scripts_path, file_name): 343def find_canned(scripts_path, file_name):
335 """ 344 """