]> code.ossystems Code Review - openembedded-core.git/commitdiff
runqemu: don't complain about conflicting machines if they are equal
authorPascal Bach <pascal.bach@siemens.com>
Thu, 24 Sep 2015 16:10:05 +0000 (18:10 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 28 Sep 2015 10:58:32 +0000 (11:58 +0100)
When the MACHINE variable was set as an environment variable, via
"export MACHINE=qemuarm" and runqemu was executed as "runqemu qemuarm"

The confusing error message appears:
Error: conflicting MACHINE types [qemuarm] and [qemuarm]

This checks if the two values are equal, in that case there is no problem
and execution can continue.

Signed-off-by: Pascal Bach <pascal.bach@siemens.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
scripts/runqemu

index 23cf5be169a7f7bc653de9134aa3a2baf7a7f496..5989507a21b0d821b939813834795a9643bdaf20 100755 (executable)
@@ -111,7 +111,7 @@ while true; do
     case "$arg" in
         "qemux86" | "qemux86-64" | "qemuarm" | "qemuarm64" | "qemumips" | "qemumipsel" | \
         "qemumips64" | "qemush4"  | "qemuppc" | "qemumicroblaze" | "qemuzynq")
-            [ -z "$MACHINE" ] && MACHINE=$arg || \
+            [ -z "$MACHINE" -o "$MACHINE" = "$arg" ] && MACHINE=$arg || \
                 error "conflicting MACHINE types [$MACHINE] and [$arg]"
             ;;
         "ext2" | "ext3" | "ext4" | "jffs2" | "nfs" | "btrfs" | "hddimg" | "hdddirect" )