chardev/char-pty: Do not ignore chr_write() failures

Cc: qemu-stable@nongnu.org
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-ID: <20251022150743.78183-6-philmd@linaro.org>
This commit is contained in:
Philippe Mathieu-Daudé
2025-10-22 17:07:39 +02:00
committed by Marc-André Lureau
parent 313f6884c8
commit 303f604935

View File

@@ -125,7 +125,7 @@ static int char_pty_chr_write(Chardev *chr, const uint8_t *buf, int len)
rc = RETRY_ON_EINTR(g_poll(&pfd, 1, 0));
g_assert(rc >= 0);
if (!(pfd.revents & G_IO_HUP) && (pfd.revents & G_IO_OUT)) {
io_channel_send(s->ioc, buf, len);
return io_channel_send(s->ioc, buf, len);
}
return len;