diff options
-rw-r--r-- | scripts/lib/wic/plugins/source/bootimg-pcbios.py | 6 | ||||
-rw-r--r-- | scripts/lib/wic/utils/runner.py | 24 |
2 files changed, 2 insertions, 28 deletions
diff --git a/scripts/lib/wic/plugins/source/bootimg-pcbios.py b/scripts/lib/wic/plugins/source/bootimg-pcbios.py index bfb8ff5a96..5890c1267b 100644 --- a/scripts/lib/wic/plugins/source/bootimg-pcbios.py +++ b/scripts/lib/wic/plugins/source/bootimg-pcbios.py | |||
@@ -81,10 +81,8 @@ class BootimgPcbiosPlugin(SourcePlugin): | |||
81 | logger.debug("Installing MBR on disk %s as %s with size %s bytes", | 81 | logger.debug("Installing MBR on disk %s as %s with size %s bytes", |
82 | disk_name, full_path, disk.min_size) | 82 | disk_name, full_path, disk.min_size) |
83 | 83 | ||
84 | rcode = runner.show(['dd', 'if=%s' % mbrfile, | 84 | dd_cmd = "dd if=%s of=%s conv=notrunc" % (mbrfile, full_path) |
85 | 'of=%s' % full_path, 'conv=notrunc']) | 85 | exec_cmd(dd_cmd, native_sysroot) |
86 | if rcode != 0: | ||
87 | raise WicError("Unable to set MBR to %s" % full_path) | ||
88 | 86 | ||
89 | @classmethod | 87 | @classmethod |
90 | def do_configure_partition(cls, part, source_params, creator, cr_workdir, | 88 | def do_configure_partition(cls, part, source_params, creator, cr_workdir, |
diff --git a/scripts/lib/wic/utils/runner.py b/scripts/lib/wic/utils/runner.py index 56d7ea3adf..348557aee8 100644 --- a/scripts/lib/wic/utils/runner.py +++ b/scripts/lib/wic/utils/runner.py | |||
@@ -82,30 +82,6 @@ def runtool(cmdln_or_args, catch=1): | |||
82 | 82 | ||
83 | return (process.returncode, out) | 83 | return (process.returncode, out) |
84 | 84 | ||
85 | def show(cmdln_or_args): | ||
86 | """Show all messages using logger.debug.""" | ||
87 | |||
88 | rcode, out = runtool(cmdln_or_args, catch=3) | ||
89 | |||
90 | if isinstance(cmdln_or_args, list): | ||
91 | cmd = ' '.join(cmdln_or_args) | ||
92 | else: | ||
93 | cmd = cmdln_or_args | ||
94 | |||
95 | msg = 'running command: "%s"' % cmd | ||
96 | if out: | ||
97 | out = out.strip() | ||
98 | if out: | ||
99 | msg += ', with output::' | ||
100 | msg += '\n +----------------' | ||
101 | for line in out.splitlines(): | ||
102 | msg += '\n | %s' % line | ||
103 | msg += '\n +----------------' | ||
104 | |||
105 | logger.debug(msg) | ||
106 | |||
107 | return rcode | ||
108 | |||
109 | def outs(cmdln_or_args, catch=1): | 85 | def outs(cmdln_or_args, catch=1): |
110 | # get the outputs of tools | 86 | # get the outputs of tools |
111 | return runtool(cmdln_or_args, catch)[1].strip() | 87 | return runtool(cmdln_or_args, catch)[1].strip() |