diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2014-09-05 14:29:42 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2014-09-05 14:29:42 +0100 |
commit | 20dbe6504936adc01e03ed3367b93da2aa1758c1 (patch) | |
tree | c8460f181ff6277d13d5c447b3deadc07efb0cbc | |
parent | 5fd7fc8db92adea953ecf5917168989a28e8871f (diff) | |
parent | cf7330c759345de2efe9c0df7921189ac5ff11d3 (diff) |
Merge remote-tracking branch 'remotes/kraxel/tags/pull-chardev-20140905-1' into staging
pty: Fix byte loss bug when connecting to pty
# gpg: Signature made Fri 05 Sep 2014 12:57:32 BST using RSA key ID D3E87138
# gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>"
# gpg: aka "Gerd Hoffmann <gerd@kraxel.org>"
# gpg: aka "Gerd Hoffmann (private) <kraxel@gmail.com>"
* remotes/kraxel/tags/pull-chardev-20140905-1:
pty: Fix byte loss bug when connecting to pty
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
-rw-r--r-- | qemu-char.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/qemu-char.c b/qemu-char.c index d4f327ab6d..1a8d9aa543 100644 --- a/qemu-char.c +++ b/qemu-char.c @@ -1160,7 +1160,9 @@ static int pty_chr_write(CharDriverState *chr, const uint8_t *buf, int len) if (!s->connected) { /* guest sends data, check for (re-)connect */ pty_chr_update_read_handler_locked(chr); - return 0; + if (!s->connected) { + return 0; + } } return io_channel_send(s->fd, buf, len); } |