[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v2 5/6] char-pty: remove the check for connection on
From: |
Marc-André Lureau |
Subject: |
[Qemu-devel] [PATCH v2 5/6] char-pty: remove the check for connection on write |
Date: |
Wed, 6 Feb 2019 18:43:27 +0100 |
This doesn't help much compared to the 1 second poll PTY
timer. I can't think of a use case where this would help.
However, we can simplify the code around chr_write(): the write lock
is no longer needed for other char-pty callbacks (see following
patch).
Signed-off-by: Marc-André Lureau <address@hidden>
---
chardev/char-pty.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/chardev/char-pty.c b/chardev/char-pty.c
index f681d637c1..f8772c9e15 100644
--- a/chardev/char-pty.c
+++ b/chardev/char-pty.c
@@ -130,11 +130,7 @@ static int char_pty_chr_write(Chardev *chr, const uint8_t
*buf, int len)
PtyChardev *s = PTY_CHARDEV(chr);
if (!s->connected) {
- /* guest sends data, check for (re-)connect */
- pty_chr_update_read_handler_locked(chr);
- if (!s->connected) {
- return len;
- }
+ return len;
}
return io_channel_send(s->ioc, buf, len);
}
--
2.20.1.519.g8feddda32c
[Qemu-devel] [PATCH v2 6/6] char-pty: remove write_lock usage, Marc-André Lureau, 2019/02/06
[Qemu-devel] [PATCH v2 1/6] char: update the mux handlers in class callback, Marc-André Lureau, 2019/02/06
Re: [Qemu-devel] [PATCH v2 0/6] chardev: various cleanups and improvements (resend), Paolo Bonzini, 2019/02/13