aboutsummaryrefslogtreecommitdiff
path: root/posix-aio-compat.c
diff options
context:
space:
mode:
authorKirill A. Shutemov <kirill@shutemov.name>2010-01-20 00:56:10 +0100
committerAnthony Liguori <aliguori@us.ibm.com>2010-01-26 14:59:19 -0600
commit4817d32757cf499a2af375d242ead9394e613882 (patch)
tree900bc0b0a609b371c81aa90ec3a21c6ff8a1f03c /posix-aio-compat.c
parent7c7c0629a3391691e76cb2b488bb6d461edc9648 (diff)
posix-aio-compat.c: fix warning with _FORTIFY_SOURCE
CC posix-aio-compat.o cc1: warnings being treated as errors posix-aio-compat.c: In function 'aio_signal_handler': posix-aio-compat.c:505: error: ignoring return value of 'write', declared with attribute warn_unused_result make: *** [posix-aio-compat.o] Error 1 Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name> Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'posix-aio-compat.c')
-rw-r--r--posix-aio-compat.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/posix-aio-compat.c b/posix-aio-compat.c
index dc14f5355d..b43c5315a8 100644
--- a/posix-aio-compat.c
+++ b/posix-aio-compat.c
@@ -501,8 +501,11 @@ static void aio_signal_handler(int signum)
{
if (posix_aio_state) {
char byte = 0;
+ ssize_t ret;
- write(posix_aio_state->wfd, &byte, sizeof(byte));
+ ret = write(posix_aio_state->wfd, &byte, sizeof(byte));
+ if (ret < 0 && errno != EAGAIN)
+ die("write()");
}
qemu_service_io();