diff options
author | Marc-André Lureau <marcandre.lureau@redhat.com> | 2019-02-06 18:43:27 +0100 |
---|---|---|
committer | Marc-André Lureau <marcandre.lureau@redhat.com> | 2019-02-13 16:46:39 +0100 |
commit | f8278c7d74c6b92b3dbbd6636d6e8917d6050378 (patch) | |
tree | f4d4e8f3d083ffce56cfe13d99a5e32368eff793 /chardev/char-pty.c | |
parent | 64c3f266dd14d62886b4a51f6bfce49ac14620fa (diff) |
char-pty: remove the check for connection on write
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 <marcandre.lureau@redhat.com>
Message-Id: <20190206174328.9736-6-marcandre.lureau@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'chardev/char-pty.c')
-rw-r--r-- | chardev/char-pty.c | 6 |
1 files changed, 1 insertions, 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); } |