From 6c21f47b9d1b0f53f1a46fecca395501a03b7578 Mon Sep 17 00:00:00 2001 From: qihao_yewu Date: Fri, 28 Nov 2025 04:24:03 -0500 Subject: [PATCH] chardev/char-pty: Do not ignore chr_write() failures MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit cheery-pick from 303f6049358e2ef35f2b107d6bd1a5be07ec35e9 Cc: qemu-stable@nongnu.org Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Marc-André Lureau Message-ID: <20251022150743.78183-6-philmd@linaro.org> Signed-off-by: qihao_yewu --- chardev/char-pty.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chardev/char-pty.c b/chardev/char-pty.c index cc2f7617fe7..d9bc0aac195 100644 --- a/chardev/char-pty.c +++ b/chardev/char-pty.c @@ -123,7 +123,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; -- Gitee