summaryrefslogtreecommitdiffstats
path: root/scripts/lib/mic/plugins/source/bootimg-pcbios.py
diff options
context:
space:
mode:
authorTom Zanussi <tom.zanussi@linux.intel.com>2014-07-31 13:55:24 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-08-11 10:53:08 +0100
commit68e6adf2df70c3f83d67dc869b3ce989a6902b80 (patch)
treea650dc42d1ae3db2bd7cf3219a252306376d34e5 /scripts/lib/mic/plugins/source/bootimg-pcbios.py
parent963604605c0eff8c5b6ca6614b6c5fba8ae4dd15 (diff)
downloadpoky-68e6adf2df70c3f83d67dc869b3ce989a6902b80.tar.gz
wic: Make exec_cmd() error out instead of warn
The reason exec_cmd() warns but doesn't error out (broken parted) doesn't really make sense, since the parted invocations don't even use exec_cmd(). It really should just fail since by not doing so it's actually enabling invalid images in some cases. Also, since the return code is now always zero, there's no point in having a return code, so remove it. This represents a change in the API, so we also need to update all callers. (From OE-Core rev: a10bbd39eee29cc49d258bf08aaec279c3115c66) Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/lib/mic/plugins/source/bootimg-pcbios.py')
-rw-r--r--scripts/lib/mic/plugins/source/bootimg-pcbios.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/scripts/lib/mic/plugins/source/bootimg-pcbios.py b/scripts/lib/mic/plugins/source/bootimg-pcbios.py
index 1211e5c93b..6488ae9729 100644
--- a/scripts/lib/mic/plugins/source/bootimg-pcbios.py
+++ b/scripts/lib/mic/plugins/source/bootimg-pcbios.py
@@ -78,7 +78,7 @@ class BootimgPcbiosPlugin(SourcePlugin):
78 exec_cmd(rm_cmd) 78 exec_cmd(rm_cmd)
79 79
80 install_cmd = "install -d %s" % hdddir 80 install_cmd = "install -d %s" % hdddir
81 tmp = exec_cmd(install_cmd) 81 exec_cmd(install_cmd)
82 82
83 splash = os.path.join(cr_workdir, "/hdd/boot/splash.jpg") 83 splash = os.path.join(cr_workdir, "/hdd/boot/splash.jpg")
84 if os.path.exists(splash): 84 if os.path.exists(splash):
@@ -144,14 +144,14 @@ class BootimgPcbiosPlugin(SourcePlugin):
144 144
145 install_cmd = "install -m 0644 %s/bzImage %s/vmlinuz" \ 145 install_cmd = "install -m 0644 %s/bzImage %s/vmlinuz" \
146 % (staging_kernel_dir, hdddir) 146 % (staging_kernel_dir, hdddir)
147 tmp = exec_cmd(install_cmd) 147 exec_cmd(install_cmd)
148 148
149 install_cmd = "install -m 444 %s/syslinux/ldlinux.sys %s/ldlinux.sys" \ 149 install_cmd = "install -m 444 %s/syslinux/ldlinux.sys %s/ldlinux.sys" \
150 % (staging_data_dir, hdddir) 150 % (staging_data_dir, hdddir)
151 tmp = exec_cmd(install_cmd) 151 exec_cmd(install_cmd)
152 152
153 du_cmd = "du -bks %s" % hdddir 153 du_cmd = "du -bks %s" % hdddir
154 rc, out = exec_cmd(du_cmd) 154 out = exec_cmd(du_cmd)
155 blocks = int(out.split()[0]) 155 blocks = int(out.split()[0])
156 156
157 extra_blocks = part.get_extra_block_count(blocks) 157 extra_blocks = part.get_extra_block_count(blocks)
@@ -186,7 +186,7 @@ class BootimgPcbiosPlugin(SourcePlugin):
186 exec_cmd(chmod_cmd) 186 exec_cmd(chmod_cmd)
187 187
188 du_cmd = "du -Lbms %s" % bootimg 188 du_cmd = "du -Lbms %s" % bootimg
189 rc, out = exec_cmd(du_cmd) 189 out = exec_cmd(du_cmd)
190 bootimg_size = out.split()[0] 190 bootimg_size = out.split()[0]
191 191
192 part.set_size(bootimg_size) 192 part.set_size(bootimg_size)