Commit 4c62180560cc06866aee509b0c0caed310245c1d
1 parent
35730fa0
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
Showing
1 changed file
with
10 additions
and
8 deletions
vl.c
... | ... | @@ -4529,7 +4529,7 @@ int main(int argc, char **argv, char **envp) |
4529 | 4529 | int hda_index; |
4530 | 4530 | int optind; |
4531 | 4531 | const char *r, *optarg; |
4532 | - CharDriverState *monitor_hd; | |
4532 | + CharDriverState *monitor_hd = NULL; | |
4533 | 4533 | const char *monitor_device; |
4534 | 4534 | const char *serial_devices[MAX_SERIAL_PORTS]; |
4535 | 4535 | int serial_device_index; |
... | ... | @@ -5461,6 +5461,14 @@ int main(int argc, char **argv, char **envp) |
5461 | 5461 | } |
5462 | 5462 | } |
5463 | 5463 | |
5464 | + if (monitor_device) { | |
5465 | + monitor_hd = qemu_chr_open("monitor", monitor_device); | |
5466 | + if (!monitor_hd) { | |
5467 | + fprintf(stderr, "qemu: could not open monitor device '%s'\n", monitor_device); | |
5468 | + exit(1); | |
5469 | + } | |
5470 | + } | |
5471 | + | |
5464 | 5472 | for(i = 0; i < MAX_SERIAL_PORTS; i++) { |
5465 | 5473 | const char *devname = serial_devices[i]; |
5466 | 5474 | if (devname && strcmp(devname, "none")) { |
... | ... | @@ -5573,14 +5581,8 @@ int main(int argc, char **argv, char **envp) |
5573 | 5581 | |
5574 | 5582 | text_consoles_set_display(display_state); |
5575 | 5583 | |
5576 | - if (monitor_device) { | |
5577 | - monitor_hd = qemu_chr_open("monitor", monitor_device); | |
5578 | - if (!monitor_hd) { | |
5579 | - fprintf(stderr, "qemu: could not open monitor device '%s'\n", monitor_device); | |
5580 | - exit(1); | |
5581 | - } | |
5584 | + if (monitor_device && monitor_hd) | |
5582 | 5585 | monitor_init(monitor_hd, !nographic); |
5583 | - } | |
5584 | 5586 | |
5585 | 5587 | for(i = 0; i < MAX_SERIAL_PORTS; i++) { |
5586 | 5588 | const char *devname = serial_devices[i]; | ... | ... |