From patchwork Mon Feb 4 12:50:47 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [1/4] char: poll a frontend only if it's writable From: Amit Shah X-Patchwork-Id: 217900 Message-Id: To: Anthony Liguori Cc: Amit Shah , qemu list Date: Mon, 4 Feb 2013 18:20:47 +0530 If the frontend reports it's not writable, don't start polling it for data yet. Signed-off-by: Amit Shah --- qemu-char.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qemu-char.c b/qemu-char.c index 2b714cf..5731d02 100644 --- a/qemu-char.c +++ b/qemu-char.c @@ -569,7 +569,7 @@ static gboolean io_watch_poll_prepare(GSource *source, gint *timeout_) iwp->max_size = iwp->fd_can_read(iwp->opaque); if (iwp->max_size == 0) { - return TRUE; + return FALSE; } return g_io_watch_funcs.prepare(source, timeout_);