chardev: Restore CR,LF on stdio
PATCH 1/1 chardev: Restore CR,LF on stdio
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
---
See:
http://lists.nongnu.org/archive/html/qemu-devel/2018-05/msg06202.html (bug)
http://lists.nongnu.org/archive/html/qemu-devel/2018-06/msg01309.html (report)
Peter, Can this enters directly as bug-fix?
chardev/char-stdio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
chardev/char-stdio.c +1 -1
@@ -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 ;
Signature · 1 line
2.17.1
Quoted 26 lines · Philippe Mathieu-Daudé
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 :pIntroduced-by [email protected]Reported-by BALATON Zoltan <[email protected]>Suggested-by Thomas Huth <[email protected]>Tested-by Laurent Desnogues <[email protected]>Signed-off-by Philippe Mathieu-Daudé <[email protected]>---
See:
http://lists.nongnu.org/archive/html/qemu-devel/2018-05/msg06202.html (bug)
http://lists.nongnu.org/archive/html/qemu-devel/2018-06/msg01309.html (report)Peter, Can this enters directly as bug-fix?
chardev/char-stdio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)chardev/char-stdio.c +0
-0
chardev/char-stdio.c static void qemu_chr_set_echo_stdio(Chardev *chr, bool echo) · line 65
Quoted 8 lines
chardev/char-stdio.c +1
-1@@ -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 ;
I think this is the right way to go.
Peter Maydell
AppliedQuoted 38 lines · Thomas Huth
Quoted 26 lines · Philippe Mathieu-Daudé
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 :pIntroduced-by [email protected]Reported-by BALATON Zoltan <[email protected]>Suggested-by Thomas Huth <[email protected]>Tested-by Laurent Desnogues <[email protected]>Signed-off-by Philippe Mathieu-Daudé <[email protected]>---
See:
http://lists.nongnu.org/archive/html/qemu-devel/2018-05/msg06202.html (bug)
http://lists.nongnu.org/archive/html/qemu-devel/2018-06/msg01309.html (report)Peter, Can this enters directly as bug-fix?
chardev/char-stdio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)chardev/char-stdio.c +0
-0chardev/char-stdio.c static void qemu_chr_set_echo_stdio(Chardev *chr, bool echo) · line 65
Quoted 8 lines
chardev/char-stdio.c +1
-1@@ -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 ;I think this is the right way to go.
Quoted 1 line
Reviewed-by Thomas Huth <[email protected]>
Applied to master, thanks.
-- PMM
W dniu 08.06.2018 o 17:25, Peter Maydell pisze:
Quoted 38 lines · Thomas Huth
Quoted 37 lines · Philippe Mathieu-Daudé
Quoted 26 lines
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 :pIntroduced-by [email protected]Reported-by BALATON Zoltan <[email protected]>Suggested-by Thomas Huth <[email protected]>Tested-by Laurent Desnogues <[email protected]>Signed-off-by Philippe Mathieu-Daudé <[email protected]>---
See:
http://lists.nongnu.org/archive/html/qemu-devel/2018-05/msg06202.html (bug)
http://lists.nongnu.org/archive/html/qemu-devel/2018-06/msg01309.html (report)Peter, Can this enters directly as bug-fix?
chardev/char-stdio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)chardev/char-stdio.c +0
-0chardev/char-stdio.c static void qemu_chr_set_echo_stdio(Chardev *chr, bool echo) · line 65
Quoted 8 lines
chardev/char-stdio.c +1
-1@@ -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 ;I think this is the right way to go.
Quoted 5 lines
Quoted 1 line
Reviewed-by Thomas Huth <[email protected]>Applied to master, thanks.
-- PMM
I actually think it would be better to set c_oflag to (OPOST | ONLCR) to avoid any problems in the future. At this point it is assumed that ONLCR is set.
Quoted 39 lines · Patryk Olszewski
W dniu 08.06.2018 o 17:25, Peter Maydell pisze:
Quoted 38 lines · Thomas Huth
Quoted 37 lines · Philippe Mathieu-Daudé
Quoted 26 lines
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 :pIntroduced-by [email protected]Reported-by BALATON Zoltan <[email protected]>Suggested-by Thomas Huth <[email protected]>Tested-by Laurent Desnogues <[email protected]>Signed-off-by Philippe Mathieu-Daudé <[email protected]>---
See:
http://lists.nongnu.org/archive/html/qemu-devel/2018-05/msg06202.html (bug)
http://lists.nongnu.org/archive/html/qemu-devel/2018-06/msg01309.html (report)Peter, Can this enters directly as bug-fix?
chardev/char-stdio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)chardev/char-stdio.c +0
-0chardev/char-stdio.c static void qemu_chr_set_echo_stdio(Chardev *chr, bool echo) · line 65
Quoted 8 lines
chardev/char-stdio.c +1
-1@@ -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 ;I think this is the right way to go.
Quoted 8 lines
Quoted 5 lines
Quoted 1 line
Reviewed-by Thomas Huth <[email protected]>Applied to master, thanks.
-- PMM
I actually think it would be better to set
c_oflagto (OPOST | ONLCR) to avoid any problems in the future. At this point it is assumed that ONLCR 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