From ed6b018ef7667f73aa25190b04e1fe3a4a87c323 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Date: Thu, 7 Jun 2018 18:08:18 -0300 Subject: [PATCH] chardev: Restore CR,LF on stdio MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Thomas Huth Tested-by: Laurent Desnogues Signed-off-by: Philippe Mathieu-Daudé Message-id: 20180607210818.12727-1-f4bug@amsat.org Suggested-by: Thomas Huth Tested-by: Laurent Desnogues Signed-off-by: Philippe Mathieu-Daudé Signed-off-by: Peter Maydell --- 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 &= ~(IGNBRK | BRKINT | PARMRK | ISTRIP | INLCR | IGNCR | ICRNL | IXON); - tty.c_oflag &= ~OPOST; + tty.c_oflag |= OPOST; tty.c_lflag &= ~(ECHO | ECHONL | ICANON | IEXTEN); tty.c_cflag &= ~(CSIZE | PARENB); tty.c_cflag |= CS8;