qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [6358] Make sure monitor appears as a vc
@ 2009-01-16 21:48 Anthony Liguori
  0 siblings, 0 replies; only message in thread
From: Anthony Liguori @ 2009-01-16 21:48 UTC (permalink / raw)
  To: qemu-devel

Revision: 6358
          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=6358
Author:   aliguori
Date:     2009-01-16 21:48:20 +0000 (Fri, 16 Jan 2009)

Log Message:
-----------
Make sure monitor appears as a vc

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

Modified Paths:
--------------
    trunk/vl.c

Modified: trunk/vl.c
===================================================================
--- trunk/vl.c	2009-01-16 21:38:58 UTC (rev 6357)
+++ trunk/vl.c	2009-01-16 21:48:20 UTC (rev 6358)
@@ -4529,7 +4529,7 @@
     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 @@
         }
     }
 
+    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 @@
 
     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];

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-01-16 21:48 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-16 21:48 [Qemu-devel] [6358] Make sure monitor appears as a vc Anthony Liguori

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).