qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Huth <thuth@redhat.com>
To: Patryk Olszewski <patryk@fala.ehost.pl>,
	Peter Maydell <peter.maydell@linaro.org>
Cc: "QEMU Trivial" <qemu-trivial@nongnu.org>,
	"QEMU Developers" <qemu-devel@nongnu.org>,
	"Markus Armbruster" <armbru@redhat.com>,
	"Marc-André Lureau" <marcandre.lureau@redhat.com>,
	"Laurent Desnogues" <laurent.desnogues@gmail.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Philippe Mathieu-Daudé" <f4bug@amsat.org>
Subject: Re: [Qemu-devel] [PATCH] chardev: Restore CR,LF on stdio
Date: Fri, 8 Jun 2018 22:10:24 +0200	[thread overview]
Message-ID: <6c6a6d92-140f-7b1b-544d-bf05c42abd29@redhat.com> (raw)
In-Reply-To: <2b3eb485-701e-21cd-f66c-897df470a4e4@fala.ehost.pl>

On 08.06.2018 17:58, Patryk Olszewski wrote:
> W dniu 08.06.2018 o 17:25, Peter Maydell pisze:
>> On 8 June 2018 at 06:47, Thomas Huth <thuth@redhat.com> wrote:
>>> On 07.06.2018 23:08, Philippe Mathieu-Daudé 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 <balaton@eik.bme.hu>
>>>> Suggested-by: Thomas Huth <thuth@redhat.com>
>>>> Tested-by: Laurent Desnogues <laurent.desnogues@gmail.com>
>>>> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
>>>> ---
>>>> 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(-)
>>>>
>>>> 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;
>>>>
>>> I think this is the right way to go.
>>>
>>> Reviewed-by: Thomas Huth <thuth@redhat.com>
>> 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.

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

      reply	other threads:[~2018-06-08 20:10 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-07 21:08 [Qemu-devel] [PATCH] chardev: Restore CR,LF on stdio Philippe Mathieu-Daudé
2018-06-08  5:47 ` Thomas Huth
2018-06-08 15:25   ` Peter Maydell
2018-06-08 15:58     ` Patryk Olszewski
2018-06-08 20:10       ` Thomas Huth [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6c6a6d92-140f-7b1b-544d-bf05c42abd29@redhat.com \
    --to=thuth@redhat.com \
    --cc=armbru@redhat.com \
    --cc=f4bug@amsat.org \
    --cc=laurent.desnogues@gmail.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=patryk@fala.ehost.pl \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).