runqemu-internal: Fixes unary operator expected in new TCPSERIAL_PORTNUM
PATCH 1/1 runqemu-internal: Fixes unary operator expected in new TCPSERIAL_PORTNUM
If $TCPSERIAL_PORTNUM is empty string causes an error because expands the expresion to,
$TCPSERIAL_PORTNUM == "" -> == ""
Signed-off-by Aníbal Limón <[email protected]>
--- scripts/runqemu-internal | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/runqemu-internal +1 -1
@@ -620,7 +620,7 @@ if [ "x$QEMUOPTIONS" = "x" ]; then return 1 fi -if [ $TCPSERIAL_PORTNUM != "" ]; then +if [ "$TCPSERIAL_PORTNUM" != "" ]; then if [ "$MACHINE" = "qemuarm64" ]; then QEMUOPTIONS="$QEMUOPTIONS -device virtio-serial-device -chardev socket,id=virtcon,port=$TCPSERIAL_PORTNUM,host=127.0.0.1 -device virtconsole,chardev=virtcon" else
Signature · 1 line
1.9.1
Quoted 15 lines · Aníbal Limón
If $TCPSERIAL_PORTNUM is empty string causes an error because expands the expresion to,
$TCPSERIAL_PORTNUM == "" -> == ""
Signed-off-by Aníbal Limón <[email protected]>--- scripts/runqemu-internal | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)scripts/runqemu-internal +0
-0
scripts/runqemu-internal if [ "x$QEMUOPTIONS" = "x" ]; then · line 623
Quoted 5 lines
scripts/runqemu-internal +1
-1@@ -620,7 +620,7 @@ if [ "x$QEMUOPTIONS" = "x" ]; then return 1 fi -if [ $TCPSERIAL_PORTNUM != "" ]; then +if [ "$TCPSERIAL_PORTNUM" != "" ]; then
I believe this would work but if you want to make it bulletproof you'd:
if [ X"$TCPSERIAL_PORTNUM" != X"" ]; then
Quoted 8 lines
scripts/runqemu-internal +0
-2if [ "$MACHINE" = "qemuarm64" ]; then QEMUOPTIONS="$QEMUOPTIONS -device virtio-serial-device -chardev socket,id=virtcon,port=$TCPSERIAL_PORTNUM,host=127.0.0.1 -device virtconsole,chardev=virtcon" elseSignature · 1 line
1.9.1
ping
Quoted 23 lines · Aníbal Limón
If $TCPSERIAL_PORTNUM is empty string causes an error because expands the expresion to,
$TCPSERIAL_PORTNUM == "" -> == ""
Signed-off-by Aníbal Limón <[email protected]>--- scripts/runqemu-internal | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)scripts/runqemu-internal +1
-1@@ -620,7 +620,7 @@ if [ "x$QEMUOPTIONS" = "x" ]; then return 1 fi -if [ $TCPSERIAL_PORTNUM != "" ]; then +if [ "$TCPSERIAL_PORTNUM" != "" ]; then if [ "$MACHINE" = "qemuarm64" ]; then QEMUOPTIONS="$QEMUOPTIONS -device virtio-serial-device -chardev socket,id=virtcon,port=$TCPSERIAL_PORTNUM,host=127.0.0.1 -device virtconsole,chardev=virtcon" else
Quoted 2 lines · Aníbal Limón
ping
It's in the queue - ross/mut is *giant* at this point but I just want to see master pass once with all green...
Ross