aboutsummaryrefslogtreecommitdiff
path: root/vl.c
diff options
context:
space:
mode:
authorths <ths@c046a42c-6fe2-441c-8c8c-71466251a162>2007-05-13 14:54:54 +0000
committerths <ths@c046a42c-6fe2-441c-8c8c-71466251a162>2007-05-13 14:54:54 +0000
commit72d46479da2ab00dfe43fa56fd2c900377b7d458 (patch)
treef6a117989c19fb3b4fb9afd4e27f9d197293397e /vl.c
parent703eaf379ed63da63b0929e12137ad4edab9899d (diff)
downloadqemu-72d46479da2ab00dfe43fa56fd2c900377b7d458.zip
qemu-72d46479da2ab00dfe43fa56fd2c900377b7d458.tar.gz
qemu-72d46479da2ab00dfe43fa56fd2c900377b7d458.tar.bz2
Windows: redirect serial port to console, by Herve Poussineau.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2813 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'vl.c')
-rw-r--r--vl.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/vl.c b/vl.c
index 2a864ba..fededf2 100644
--- 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);
}