[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] Add stdio char device on windows
From: |
Fabien Chouteau |
Subject: |
Re: [Qemu-devel] [PATCH] Add stdio char device on windows |
Date: |
Tue, 27 Sep 2011 16:12:03 +0200 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.21) Gecko/20110831 Lightning/1.0b2 Mnenhy/0.8.4 Thunderbird/3.1.13 |
On 27/09/2011 15:31, Paolo Bonzini wrote:
> On 09/27/2011 03:14 PM, Fabien Chouteau wrote:
>> + /* Some terminal emulator returns \r\n for Enter, just pass \n */
>> + if (win_stdio_buf == '\r') {
>> + continue;
>> + }
>
> Does the \r actually do any damage?
>
It's just more convenient to have the same behavior on all hosts (i.e.
no \r).
>> +static void qemu_chr_set_echo_win_stdio(CharDriverState *chr, bool echo)
>> +{
>> + DWORD mode = 0;
>> +
>> + GetConsoleMode(hStdIn, &mode);
>> +
>> + if (echo) {
>> + SetConsoleMode(hStdIn, mode | (ENABLE_ECHO_INPUT));
>> + } else {
>> + SetConsoleMode(hStdIn, mode & (~ENABLE_ECHO_INPUT));
>> + }
>> +}
>
> You also need to enable ENABLE_LINE_INPUT for ENABLE_ECHO_INPUT to have
> effect.
>
OK thanks, I missed that...
Regards,
--
Fabien Chouteau