summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorMihai Prica <mihai.prica@intel.com>2013-09-02 12:50:51 (GMT)
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-09-04 13:17:29 (GMT)
commit12d003a80031304775b031002c75c64c53f7a7f9 (patch)
tree7785bc0fc5d3a9080784fe6722cb6763c4b6eb15 /scripts
parent7d8038dfc61d7767b1b0d727c70963d447c86f0f (diff)
downloadpoky-12d003a80031304775b031002c75c64c53f7a7f9.tar.gz
scripts/runqemu: Fix MACHINE regex
When runqemu tries to determine the MACHINE variable from a kernel or vmdk filename that doesn't contain any known machine name, the variable gets set to the filename. It should remain unset and cause an error. [YOCTO #2890] (From OE-Core rev: 22c0668d9e0a22c095d78bab7b45ef4f803dd0d1) Signed-off-by: Mihai Prica <mihai.prica@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/runqemu4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/runqemu b/scripts/runqemu
index 04dc3b0..b496785 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -224,13 +224,13 @@ fi
224 224
225if [ -z "$MACHINE" ]; then 225if [ -z "$MACHINE" ]; then
226 if [ "x$FSTYPE" = "xvmdk" ]; then 226 if [ "x$FSTYPE" = "xvmdk" ]; then
227 MACHINE=`basename $VM | sed 's/.*\(qemux86-64\|qemux86\|qemuarm\|qemumips64\|qemumips\|qemuppc\|qemush4\).*/\1/'` 227 MACHINE=`basename $VM | sed -n 's/.*\(qemux86-64\|qemux86\|qemuarm\|qemumips64\|qemumips\|qemuppc\|qemush4\).*/\1/p'`
228 if [ -z "$MACHINE" ]; then 228 if [ -z "$MACHINE" ]; then
229 error "Unable to set MACHINE from vmdk filename [$VM]" 229 error "Unable to set MACHINE from vmdk filename [$VM]"
230 fi 230 fi
231 echo "Set MACHINE to [$MACHINE] based on vmdk [$VM]" 231 echo "Set MACHINE to [$MACHINE] based on vmdk [$VM]"
232 else 232 else
233 MACHINE=`basename $KERNEL | sed 's/.*\(qemux86-64\|qemux86\|qemuarm\|qemumips64\|qemumips\|qemuppc\|qemush4\).*/\1/'` 233 MACHINE=`basename $KERNEL | sed -n 's/.*\(qemux86-64\|qemux86\|qemuarm\|qemumips64\|qemumips\|qemuppc\|qemush4\).*/\1/p'`
234 if [ -z "$MACHINE" ]; then 234 if [ -z "$MACHINE" ]; then
235 error "Unable to set MACHINE from kernel filename [$KERNEL]" 235 error "Unable to set MACHINE from kernel filename [$KERNEL]"
236 fi 236 fi