From 60f3f336695ab2e8ec50be507404153c42fffec5 Mon Sep 17 00:00:00 2001 From: Michal Sojka Date: Tue, 3 May 2016 09:51:18 +0200 Subject: [PATCH] Append -serial flags to qemu only if it is not already on the command line --- novaboot | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/novaboot b/novaboot index 52383ce..f2568e2 100755 --- a/novaboot +++ b/novaboot @@ -992,7 +992,9 @@ if (defined $qemu) { push(@qemu_flags, ('-dtb', $dtb)) if $dtb; } } - push(@qemu_flags, qw(-serial stdio)); # Redirect serial output (for collecting test restuls) + if (!grep /^-serial$/, @qemu_flags) { + push(@qemu_flags, qw(-serial stdio)); # Redirect serial output (for collecting test restuls) + } unshift(@qemu_flags, ('-name', $config_name)); print STDERR "novaboot: Running: ".shell_cmd_string($qemu, @qemu_flags)."\n"; $exp = Expect->spawn(($qemu, @qemu_flags)) || die("exec() failed: $!"); -- 2.39.2