]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
chardev/char-pty: Do not ignore chr_write() failures
authorPhilippe Mathieu-Daudé <philmd@linaro.org>
Wed, 22 Oct 2025 15:07:39 +0000 (17:07 +0200)
committerMarc-André Lureau <marcandre.lureau@redhat.com>
Tue, 25 Nov 2025 07:09:07 +0000 (11:09 +0400)
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>

chardev/char-pty.c

index b066f01412697874faa091b1b0d7d79130697b67..652b0bd9e73d9f93a036a95faedab1c1a5bbac56 100644 (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;