]> code.ossystems Code Review - openembedded-core.git/commitdiff
runqemu-internal: Fixes unary operator expected in new TCPSERIAL_PORTNUM
authorAníbal Limón <anibal.limon@linux.intel.com>
Wed, 26 Aug 2015 14:48:18 +0000 (09:48 -0500)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sun, 30 Aug 2015 11:34:26 +0000 (12:34 +0100)
If $TCPSERIAL_PORTNUM is empty string causes an error because
expands the expresion to,

$TCPSERIAL_PORTNUM == "" -> == ""

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
scripts/runqemu-internal

index baf53f3e8bcd39e3e5395ef9909d0fa79cd7159b..a691a80a466e1b74d3d519a92af00fe07d020154 100755 (executable)
@@ -620,7 +620,7 @@ if [ "x$QEMUOPTIONS" = "x" ]; then
     return 1
 fi
 
-if [ $TCPSERIAL_PORTNUM != "" ]; then
+if [ "$TCPSERIAL_PORTNUM" != "" ]; then
     if [ "$MACHINE" = "qemuarm64" ]; then
         SCRIPT_QEMU_EXTRA_OPT="$SCRIPT_QEMU_EXTRA_OPT -device virtio-serial-device -chardev socket,id=virtcon,port=$TCPSERIAL_PORTNUM,host=127.0.0.1 -device virtconsole,chardev=virtcon"
     else