From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48782) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fRNiS-0002Sw-NY for qemu-devel@nongnu.org; Fri, 08 Jun 2018 16:10:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fRNiP-0008RX-BS for qemu-devel@nongnu.org; Fri, 08 Jun 2018 16:10:32 -0400 References: <20180607210818.12727-1-f4bug@amsat.org> <9abdaa17-d6d1-0c34-2a20-43078b487bef@redhat.com> <2b3eb485-701e-21cd-f66c-897df470a4e4@fala.ehost.pl> From: Thomas Huth Message-ID: <6c6a6d92-140f-7b1b-544d-bf05c42abd29@redhat.com> Date: Fri, 8 Jun 2018 22:10:24 +0200 MIME-Version: 1.0 In-Reply-To: <2b3eb485-701e-21cd-f66c-897df470a4e4@fala.ehost.pl> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH] chardev: Restore CR,LF on stdio List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Patryk Olszewski , Peter Maydell Cc: QEMU Trivial , QEMU Developers , Markus Armbruster , =?UTF-8?Q?Marc-Andr=c3=a9_Lureau?= , Laurent Desnogues , Paolo Bonzini , =?UTF-8?Q?Philippe_Mathieu-Daud=c3=a9?= On 08.06.2018 17:58, Patryk Olszewski wrote: > W dniu 08.06.2018 o=C2=A017:25, Peter Maydell pisze: >> On 8 June 2018 at 06:47, Thomas Huth wrote: >>> On 07.06.2018 23:08, Philippe Mathieu-Daud=C3=A9 wrote: >>>> Remove the 'stair-step output' on stdio. >>>> >>>> This partially reverts commit 12fb0ac05, which was correct >>>> on the mailing list but got corrupted by the maintainer :p >>>> >>>> Introduced-by: 3b876140-c035-dd39-75d0-d54c48128fac@redhat.com >>>> Reported-by: BALATON Zoltan >>>> Suggested-by: Thomas Huth >>>> Tested-by: Laurent Desnogues >>>> Signed-off-by: Philippe Mathieu-Daud=C3=A9 >>>> --- >>>> See: >>>> http://lists.nongnu.org/archive/html/qemu-devel/2018-05/msg06202.htm= l (bug) >>>> http://lists.nongnu.org/archive/html/qemu-devel/2018-06/msg01309.htm= l (report) >>>> >>>> Peter, Can this enters directly as bug-fix? >>>> >>>> chardev/char-stdio.c | 2 +- >>>> 1 file changed, 1 insertion(+), 1 deletion(-) >>>> >>>> diff --git a/chardev/char-stdio.c b/chardev/char-stdio.c >>>> index d83e60e787..96375f2ab8 100644 >>>> --- a/chardev/char-stdio.c >>>> +++ b/chardev/char-stdio.c >>>> @@ -59,7 +59,7 @@ static void qemu_chr_set_echo_stdio(Chardev *chr, = bool echo) >>>> if (!echo) { >>>> tty.c_iflag &=3D ~(IGNBRK | BRKINT | PARMRK | ISTRIP >>>> | INLCR | IGNCR | ICRNL | IXON); >>>> - tty.c_oflag &=3D ~OPOST; >>>> + tty.c_oflag |=3D OPOST; >>>> tty.c_lflag &=3D ~(ECHO | ECHONL | ICANON | IEXTEN); >>>> tty.c_cflag &=3D ~(CSIZE | PARENB); >>>> tty.c_cflag |=3D CS8; >>>> >>> I think this is the right way to go. >>> >>> Reviewed-by: Thomas Huth >> Applied to master, thanks. >> >> -- PMM >> > I actually think it would be better to set c_oflag to (OPOST | ONLCR) t= o > avoid any problems in the future. At this point it is assumed that ONLC= R > is set. stdio output worked fine without explicitly setting ONLCR in the past, so unless we hit a situation where it is really required, I'd rather keep it that way now to avoid yet another unexpected regression. Thomas