[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [FOR 0.12 PATCH v4 12/22] zap serial_monitor_mux
From: |
Gerd Hoffmann |
Subject: |
[Qemu-devel] [FOR 0.12 PATCH v4 12/22] zap serial_monitor_mux |
Date: |
Tue, 8 Dec 2009 13:11:44 +0100 |
The logic in this code obviously predates the multiple monitor
capability of qemu and looks increasingly silly these days.
I think the intention of this piece of code is to get a reasonable
default for the -nographic case: have monitor and serial line muxed
on stdio.
With the new default_serial and default_monitor variables we have now
doing just that became much easier ;)
Signed-off-by: Gerd Hoffmann <address@hidden>
---
vl.c | 42 ++++++++----------------------------------
1 files changed, 8 insertions(+), 34 deletions(-)
diff --git a/vl.c b/vl.c
index 0d3f5e6..e3e035f 100644
--- a/vl.c
+++ b/vl.c
@@ -4662,33 +4662,6 @@ static int foreach_device_config(int type, int
(*func)(const char *cmdline))
return 0;
}
-static void serial_monitor_mux(void)
-{
- struct device_config *mon0, *serial;
- const char *devname;
-
- QTAILQ_FOREACH(mon0, &device_configs, next) {
- if (mon0->type != DEV_MONITOR)
- continue;
- if (strcmp(mon0->cmdline,"stdio") != 0)
- return;
- break;
- }
- QTAILQ_FOREACH(serial, &device_configs, next) {
- if (serial->type != DEV_SERIAL)
- continue;
- devname = serial->cmdline;
- if (devname && !strcmp(devname,"mon:stdio")) {
- QTAILQ_REMOVE(&device_configs, mon0, next);
- break;
- } else if (devname && !strcmp(devname,"stdio")) {
- QTAILQ_REMOVE(&device_configs, mon0, next);
- serial->cmdline = "mon:stdio";
- break;
- }
- }
-}
-
static int serial_parse(const char *devname)
{
static int index = 0;
@@ -5574,12 +5547,16 @@ int main(int argc, char **argv, char **envp)
qemu_opts_foreach(&qemu_device_opts, default_driver_check, NULL, 0);
if (display_type == DT_NOGRAPHIC) {
- if (default_serial)
- add_device_config(DEV_SERIAL, "stdio");
if (default_parallel)
add_device_config(DEV_PARALLEL, "null");
- if (default_monitor)
- add_device_config(DEV_MONITOR, "stdio");
+ if (default_serial && default_monitor) {
+ add_device_config(DEV_SERIAL, "mon:stdio");
+ } else {
+ if (default_serial)
+ add_device_config(DEV_SERIAL, "stdio");
+ if (default_monitor)
+ add_device_config(DEV_MONITOR, "stdio");
+ }
} else {
if (default_serial)
add_device_config(DEV_SERIAL, "vc:80Cx24C");
@@ -5737,9 +5714,6 @@ int main(int argc, char **argv, char **envp)
register_savevm_live("ram", 0, 3, NULL, ram_save_live, NULL,
ram_load, NULL);
- /* Maintain compatibility with multiple stdio monitors */
- serial_monitor_mux();
-
if (nb_numa_nodes > 0) {
int i;
--
1.6.5.2
- Re: [Qemu-devel] [FOR 0.12 PATCH v4 05/22] Revert "monitor: Command-line flag to enable control mode", (continued)
- [Qemu-devel] [FOR 0.12 PATCH v4 07/22] chardev: move greeting into vc backend., Gerd Hoffmann, 2009/12/08
- [Qemu-devel] [FOR 0.12 PATCH v4 01/22] qdev: make compat stuff more generic, Gerd Hoffmann, 2009/12/08
- [Qemu-devel] [FOR 0.12 PATCH v4 06/22] Revert "Set default console to virtio on S390x", Gerd Hoffmann, 2009/12/08
- [Qemu-devel] [FOR 0.12 PATCH v4 02/22] qdev: add command line option to set global defaults for properties., Gerd Hoffmann, 2009/12/08
- [Qemu-devel] [FOR 0.12 PATCH v4 08/22] vc: colorize chardev title line with blue background., Gerd Hoffmann, 2009/12/08
- [Qemu-devel] [FOR 0.12 PATCH v4 09/22] default devices: core code & serial lines., Gerd Hoffmann, 2009/12/08
- [Qemu-devel] [FOR 0.12 PATCH v4 14/22] default devices: add global cmd line option., Gerd Hoffmann, 2009/12/08
- [Qemu-devel] [FOR 0.12 PATCH v4 10/22] default devices: parallel port., Gerd Hoffmann, 2009/12/08
- [Qemu-devel] [FOR 0.12 PATCH v4 12/22] zap serial_monitor_mux,
Gerd Hoffmann <=
- [Qemu-devel] [FOR 0.12 PATCH v4 11/22] default devices: qemu monitor., Gerd Hoffmann, 2009/12/08
- [Qemu-devel] [FOR 0.12 PATCH v4 13/22] default devices: vga adapter., Gerd Hoffmann, 2009/12/08
- [Qemu-devel] [FOR 0.12 PATCH v4 17/22] un-static qemu_chr_parse_compat(), Gerd Hoffmann, 2009/12/08
- [Qemu-devel] [FOR 0.12 PATCH v4 19/22] add new -mon switch, Gerd Hoffmann, 2009/12/08
- [Qemu-devel] [FOR 0.12 PATCH v4 15/22] default devices: network, Gerd Hoffmann, 2009/12/08
- [Qemu-devel] [FOR 0.12 PATCH v4 21/22] default devices: virtio consoles., Gerd Hoffmann, 2009/12/08
- [Qemu-devel] [FOR 0.12 PATCH v4 22/22] Set default console to virtio on S390x, Gerd Hoffmann, 2009/12/08