]> xenbits.xensource.com Git - qemu-xen-4.4-testing.git/commitdiff
Windows: redirect serial port to console, by Herve Poussineau.
authorths <ths@c046a42c-6fe2-441c-8c8c-71466251a162>
Sun, 13 May 2007 14:54:54 +0000 (14:54 +0000)
committerths <ths@c046a42c-6fe2-441c-8c8c-71466251a162>
Sun, 13 May 2007 14:54:54 +0000 (14:54 +0000)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2813 c046a42c-6fe2-441c-8c8c-71466251a162

vl.c

diff --git a/vl.c b/vl.c
index 2a864ba871acdd6f97de781e1d3cf476bfedc5a7..fededf20ea899ace260a6ab32a937c59284341b7 100644 (file)
--- a/vl.c
+++ b/vl.c
@@ -2420,7 +2420,12 @@ static CharDriverState *qemu_chr_open_win_file(HANDLE fd_out)
     qemu_chr_reset(chr);
     return chr;
 }
-    
+
+static CharDriverState *qemu_chr_open_win_con(const char *filename)
+{
+    return qemu_chr_open_win_file(GetStdHandle(STD_OUTPUT_HANDLE));
+}
+
 static CharDriverState *qemu_chr_open_win_file_out(const char *file_out)
 {
     HANDLE fd_out;
@@ -2962,6 +2967,9 @@ CharDriverState *qemu_chr_open(const char *filename)
     if (strstart(filename, "pipe:", &p)) {
         return qemu_chr_open_win_pipe(p);
     } else
+    if (strstart(filename, "con:", NULL)) {
+        return qemu_chr_open_win_con(filename);
+    } else
     if (strstart(filename, "file:", &p)) {
         return qemu_chr_open_win_file_out(p);
     }