diff options
author | aliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162> | 2009-01-16 21:48:20 +0000 |
---|---|---|
committer | aliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162> | 2009-01-16 21:48:20 +0000 |
commit | 4c62180560cc06866aee509b0c0caed310245c1d (patch) | |
tree | 9abc11f6a954fe60388eb4b82cd68b4825995887 /vl.c | |
parent | 35730fa05511cfbf19341aedf8bfd526dfc7d90f (diff) |
Make sure monitor appears as a vc
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6358 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'vl.c')
-rw-r--r-- | vl.c | 18 |
1 files changed, 10 insertions, 8 deletions
@@ -4529,7 +4529,7 @@ int main(int argc, char **argv, char **envp) int hda_index; int optind; const char *r, *optarg; - CharDriverState *monitor_hd; + CharDriverState *monitor_hd = NULL; const char *monitor_device; const char *serial_devices[MAX_SERIAL_PORTS]; int serial_device_index; @@ -5461,6 +5461,14 @@ int main(int argc, char **argv, char **envp) } } + if (monitor_device) { + monitor_hd = qemu_chr_open("monitor", monitor_device); + if (!monitor_hd) { + fprintf(stderr, "qemu: could not open monitor device '%s'\n", monitor_device); + exit(1); + } + } + for(i = 0; i < MAX_SERIAL_PORTS; i++) { const char *devname = serial_devices[i]; if (devname && strcmp(devname, "none")) { @@ -5573,14 +5581,8 @@ int main(int argc, char **argv, char **envp) text_consoles_set_display(display_state); - if (monitor_device) { - monitor_hd = qemu_chr_open("monitor", monitor_device); - if (!monitor_hd) { - fprintf(stderr, "qemu: could not open monitor device '%s'\n", monitor_device); - exit(1); - } + if (monitor_device && monitor_hd) monitor_init(monitor_hd, !nographic); - } for(i = 0; i < MAX_SERIAL_PORTS; i++) { const char *devname = serial_devices[i]; |