Commit 72d46479da2ab00dfe43fa56fd2c900377b7d458

Authored by ths
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
... ... @@ -2420,7 +2420,12 @@ static CharDriverState *qemu_chr_open_win_file(HANDLE fd_out)
2420 2420 qemu_chr_reset(chr);
2421 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 2429 static CharDriverState *qemu_chr_open_win_file_out(const char *file_out)
2425 2430 {
2426 2431 HANDLE fd_out;
... ... @@ -2962,6 +2967,9 @@ CharDriverState *qemu_chr_open(const char *filename)
2962 2967 if (strstart(filename, "pipe:", &p)) {
2963 2968 return qemu_chr_open_win_pipe(p);
2964 2969 } else
  2970 + if (strstart(filename, "con:", NULL)) {
  2971 + return qemu_chr_open_win_con(filename);
  2972 + } else
2965 2973 if (strstart(filename, "file:", &p)) {
2966 2974 return qemu_chr_open_win_file_out(p);
2967 2975 }
... ...