Commit 72d46479da2ab00dfe43fa56fd2c900377b7d458
1 parent
703eaf37
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
Showing
1 changed file
with
9 additions
and
1 deletions
vl.c
| @@ -2420,7 +2420,12 @@ static CharDriverState *qemu_chr_open_win_file(HANDLE fd_out) | @@ -2420,7 +2420,12 @@ static CharDriverState *qemu_chr_open_win_file(HANDLE fd_out) | ||
| 2420 | qemu_chr_reset(chr); | 2420 | qemu_chr_reset(chr); |
| 2421 | return chr; | 2421 | return chr; |
| 2422 | } | 2422 | } |
| 2423 | - | 2423 | + |
| 2424 | +static CharDriverState *qemu_chr_open_win_con(const char *filename) | ||
| 2425 | +{ | ||
| 2426 | + return qemu_chr_open_win_file(GetStdHandle(STD_OUTPUT_HANDLE)); | ||
| 2427 | +} | ||
| 2428 | + | ||
| 2424 | static CharDriverState *qemu_chr_open_win_file_out(const char *file_out) | 2429 | static CharDriverState *qemu_chr_open_win_file_out(const char *file_out) |
| 2425 | { | 2430 | { |
| 2426 | HANDLE fd_out; | 2431 | HANDLE fd_out; |
| @@ -2962,6 +2967,9 @@ CharDriverState *qemu_chr_open(const char *filename) | @@ -2962,6 +2967,9 @@ CharDriverState *qemu_chr_open(const char *filename) | ||
| 2962 | if (strstart(filename, "pipe:", &p)) { | 2967 | if (strstart(filename, "pipe:", &p)) { |
| 2963 | return qemu_chr_open_win_pipe(p); | 2968 | return qemu_chr_open_win_pipe(p); |
| 2964 | } else | 2969 | } else |
| 2970 | + if (strstart(filename, "con:", NULL)) { | ||
| 2971 | + return qemu_chr_open_win_con(filename); | ||
| 2972 | + } else | ||
| 2965 | if (strstart(filename, "file:", &p)) { | 2973 | if (strstart(filename, "file:", &p)) { |
| 2966 | return qemu_chr_open_win_file_out(p); | 2974 | return qemu_chr_open_win_file_out(p); |
| 2967 | } | 2975 | } |