From: Paolo Bonzini <pbonzini@redhat.com>
To: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
Cc: qemu-devel@nongnu.org, bcketchum@gmail.com
Subject: Re: [Qemu-devel] [PATCH 3/6] serial: separate serial_xmit and serial_watch_cb
Date: Wed, 22 Jun 2016 17:14:27 +0200 [thread overview]
Message-ID: <d058e352-8e5a-bda6-2f8f-1e3d9eb1df2a@redhat.com> (raw)
In-Reply-To: <20160622150920.GD6604@work-vm>
On 22/06/2016 17:09, Dr. David Alan Gilbert wrote:
> > -static gboolean serial_xmit(GIOChannel *chan, GIOCondition cond, void *opaque)
> > +static gboolean serial_watch_cb(GIOChannel *chan, GIOCondition cond,
> > + void *opaque)
> > {
> > SerialState *s = opaque;
> > + serial_xmit(s);
> > + return FALSE;
> > +}
>
> Yes, with a side question.
> We register this with G_IO_OUT|G_IO_HUP but don't check the cond, what's this
> code supposed to do if it gets a HUP?
It will attempt again to write, which will fail (see pty_chr_write);
then attempt to add a watch again, which this time should return 0 (see
pty_chr_add_watch). The outcome is that tsr_retry is reset to 0.
Thanks,
Paolo
> Since we didn't do anything with cond before either:
>
> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
>
>
next prev parent reply other threads:[~2016-06-22 15:14 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-20 14:28 [Qemu-devel] [PATCH 0/6] serial: flow control fixes Paolo Bonzini
2016-06-20 14:29 ` [Qemu-devel] [PATCH 1/6] serial: make tsr_retry unsigned Paolo Bonzini
2016-06-22 14:44 ` Dr. David Alan Gilbert
2016-06-20 14:29 ` [Qemu-devel] [PATCH 2/6] serial: reinstate watch after migration Paolo Bonzini
2016-06-22 15:05 ` Dr. David Alan Gilbert
2016-06-22 15:11 ` Paolo Bonzini
2016-06-22 15:41 ` Dr. David Alan Gilbert
2016-06-20 14:29 ` [Qemu-devel] [PATCH 3/6] serial: separate serial_xmit and serial_watch_cb Paolo Bonzini
2016-06-22 15:09 ` Dr. David Alan Gilbert
2016-06-22 15:14 ` Paolo Bonzini [this message]
2016-06-20 14:29 ` [Qemu-devel] [PATCH 4/6] serial: simplify tsr_retry reset Paolo Bonzini
2016-06-22 15:12 ` Dr. David Alan Gilbert
2016-06-20 14:29 ` [Qemu-devel] [PATCH 5/6] char: change qemu_chr_fe_add_watch to return unsigned Paolo Bonzini
2016-06-22 15:22 ` Dr. David Alan Gilbert
2016-06-20 14:29 ` [Qemu-devel] [PATCH 6/6] serial: remove watch on reset Paolo Bonzini
2016-06-22 14:04 ` Bret Ketchum
2016-06-22 15:38 ` Dr. David Alan Gilbert
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=d058e352-8e5a-bda6-2f8f-1e3d9eb1df2a@redhat.com \
--to=pbonzini@redhat.com \
--cc=bcketchum@gmail.com \
--cc=dgilbert@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).