|
From: | Gerd Hoffmann |
Subject: | [Qemu-devel] Re: [PATCH v4 2/5] char: Add qemu_chr_write_nb() for nonblocking writes |
Date: | Tue, 04 May 2010 09:38:11 +0200 |
User-agent: | Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100330 Fedora/3.0.4-1.fc12 Thunderbird/3.0.4 |
Hi,
-static int unix_write(int fd, const uint8_t *buf, int len1) +static int unix_write(int fd, const uint8_t *buf, int len1, bool nonblock) { int ret, len; @@ -522,6 +537,9 @@ static int unix_write(int fd, const uint8_t *buf, int len1) while (len> 0) { ret = write(fd, buf, len); if (ret< 0) { + if (errno == EAGAIN&& nonblock) { + return -EAGAIN; + }
You've just re-introduced the bug you've fixed in patch 1/5 ... cheers, Gerd
[Prev in Thread] | Current Thread | [Next in Thread] |