Skip to contentSkip to conversation

chardev patch queue

GIT PULL Applied Gerd Hoffmann 2 participants 3 messages Sep 5, 2014

lore
Share & tools
lore
#0 lore raw

Hi,

Pretty short with a single, simple patch. Should be pulled now so we can cherry-pick into 2.1.1 stable, so I'm not waiting for a few more chardev patches piling up ;)

please pull,
Gerd

The following changes since commit fd884c07658d02a96a882b8457d6d7a5cd71a407:

Merge remote-tracking branch 'remotes/afaerber/tags/qom-devices-for-peter' into staging (2014-09-04 19:41:15 +0100)

are available in the git repository at:

git://git.kraxel.org/qemu tags/pull-chardev-20140905-1

for you to fetch changes up to cf7330c759345de2efe9c0df7921189ac5ff11d3:

pty: Fix byte loss bug when connecting to pty (2014-09-05 13:27:10 +0200)

----------------------------------------------------------------
pty: Fix byte loss bug when connecting to pty

----------------------------------------------------------------
Sebastian Tanase (1):
pty: Fix byte loss bug when connecting to pty

 qemu-char.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
#1 lore raw

[Qemu-devel] [PULL 1/1] pty: Fix byte loss bug when connecting to pty

From: Sebastian Tanase <[email protected]>

When trying to print data to the pty, we first check if it is connected. If not, we try to reconnect, but we drop the pending data even if we have successfully reconnected; this makes us lose the first byte of the very first transmission.
This small fix addresses the issue by checking once more if the pty is connected after having tried to reconnect.

---
 qemu-char.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
qemu-char.c +3 -1
index d4f327a..1a8d9aa 100644
@@ -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);
 }
Signature · 1 line
1.8.3.1
#2 lore raw
In reply to Gerd Hoffmann
Quoted 25 lines · Gerd Hoffmann

Hi,

Pretty short with a single, simple patch. Should be pulled now so we can cherry-pick into 2.1.1 stable, so I'm not waiting for a few more chardev patches piling up ;)

please pull,
Gerd

The following changes since commit fd884c07658d02a96a882b8457d6d7a5cd71a407:

Merge remote-tracking branch 'remotes/afaerber/tags/qom-devices-for-peter' into staging (2014-09-04 19:41:15 +0100)

are available in the git repository at:

git://git.kraxel.org/qemu tags/pull-chardev-20140905-1

for you to fetch changes up to cf7330c759345de2efe9c0df7921189ac5ff11d3:

pty: Fix byte loss bug when connecting to pty (2014-09-05 13:27:10 +0200)

----------------------------------------------------------------
pty: Fix byte loss bug when connecting to pty

Quoted 7 lines

----------------------------------------------------------------
Sebastian Tanase (1):
pty: Fix byte loss bug when connecting to pty

 qemu-char.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Applied, thanks.

-- PMM