Don't set default monitor when there is a mux'ed one
PATCH 1/1 Don't set default monitor when there is a mux'ed one
This fixes eg. "-nographic -serial mon:stdio [-serial ...]".
---
vl.c | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-)
vl.c +9 -0
@@ -5171,6 +5171,9 @@ int main(int argc, char **argv, char **envp)case QEMU_OPTION_serial:add_device_config (DEV_SERIAL , optarg); default_serial =0 ; +if (strncmp (optarg,"mon:" ,4 ) ==0 ) { + default_monitor =0 ; + }break ;case QEMU_OPTION_watchdog:if (watchdog) {
@@ -5189,10 +5192,16 @@ int main(int argc, char **argv, char **envp)case QEMU_OPTION_virtiocon:add_device_config (DEV_VIRTCON , optarg); default_virtcon =0 ; +if (strncmp (optarg,"mon:" ,4 ) ==0 ) { + default_monitor =0 ; + }break ;case QEMU_OPTION_parallel:add_device_config (DEV_PARALLEL , optarg); default_parallel =0 ; +if (strncmp (optarg,"mon:" ,4 ) ==0 ) { + default_monitor =0 ; + }break ;case QEMU_OPTION_debugcon:add_device_config (DEV_DEBUGCON , optarg);
Quoted 1 line · Jan Kiszka
This fixes eg. "-nographic -serial mon:stdio [-serial ...]".
Looks good to me.
cheers,
Gerd
Quoted 2 lines · Jan Kiszka
This fixes eg. "-nographic -serial mon:stdio [-serial ...]".
Is this really an appropriate invocation though?
-nographic != mon:stdio so the semantics of how this is supposed to behave is at best ill-defined.
Regards,
Anthony Liguori
Quoted 8 lines · Anthony Liguori
Quoted 2 lines · Jan Kiszka
This fixes eg. "-nographic -serial mon:stdio [-serial ...]".
Is this really an appropriate invocation though?
-nographic != mon:stdio so the semantics of how this is supposed to behave is at best ill-defined.
Original -nographic implied mon:stdio unless you specified your own -serial. If this was reasonable or not, changing behavior now breaks tons of scripts.
Actually, there is more legacy breakage in the new default handling. The missing translation of "-serial stdio -monitor stdio" => "-serial mon:stdio" can already be harmful to some setups, though I guess they are less common.
However, this patch addresses something that is a bug outside the scope of -nographic's semantic.
Jan
Signature · 2 lines
Siemens AG, Corporate Technology, CT T DE IT 1 Corporate Competence Center Embedded Linux