From: Paolo Bonzini <pbonzini@redhat.com>
To: Ed Swierk <eswierk@skyportsystems.com>, qemu-devel@nongnu.org
Cc: libvir-list@redhat.com, berrange@redhat.com,
marcandre.lureau@redhat.com, eblake@redhat.com,
ben@skyportsystems.com
Subject: Re: [Qemu-devel] [PATCH] char: drop data written to a disconnected pty
Date: Mon, 6 Feb 2017 10:51:44 +0100 [thread overview]
Message-ID: <bb29fec4-b380-7b84-6e88-de3a83e17edc@redhat.com> (raw)
In-Reply-To: <1485870329-79428-1-git-send-email-eswierk@skyportsystems.com>
On 31/01/2017 14:45, Ed Swierk wrote:
> When a serial port writes data to a pty that's disconnected, drop the
> data and return the length dropped. This avoids triggering pointless
> retries in callers like the 16550A serial_xmit(), and causes
> qemu_chr_fe_write() to write all data to the log file, rather than
> logging only while a pty client like virsh console happens to be
> connected.
>
> Signed-off-by: Ed Swierk <eswierk@skyportsystems.com>
> ---
> qemu-char.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/qemu-char.c b/qemu-char.c
> index 676944a..ccb6923 100644
> --- a/qemu-char.c
> +++ b/qemu-char.c
> @@ -1528,7 +1528,7 @@ static int pty_chr_write(CharDriverState *chr, const uint8_t *buf, int len)
> /* guest sends data, check for (re-)connect */
> pty_chr_update_read_handler_locked(chr);
> if (!s->connected) {
> - return 0;
> + return len;
> }
> }
> return io_channel_send(s->ioc, buf, len);
>
Rebased and queued, thanks.
Paolo
prev parent reply other threads:[~2017-02-06 9:51 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-31 13:45 [Qemu-devel] [PATCH] char: drop data written to a disconnected pty Ed Swierk
2017-01-31 14:06 ` Marc-André Lureau
2017-01-31 14:07 ` Marc-André Lureau
2017-01-31 22:19 ` Ed Swierk
2017-02-02 1:11 ` Paolo Bonzini
2017-02-06 9:51 ` Paolo Bonzini [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=bb29fec4-b380-7b84-6e88-de3a83e17edc@redhat.com \
--to=pbonzini@redhat.com \
--cc=ben@skyportsystems.com \
--cc=berrange@redhat.com \
--cc=eblake@redhat.com \
--cc=eswierk@skyportsystems.com \
--cc=libvir-list@redhat.com \
--cc=marcandre.lureau@redhat.com \
--cc=qemu-devel@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).