From: Jens Axboe Date: Mon, 2 Jun 2008 12:18:23 +0000 (+0200) Subject: solarisaio: aiowait() can return (void *) -1 for error X-Git-Tag: fio-1.21-rc7~6 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=0f09e829c3e1aa24d16059ab6665098fedf17c05;ds=sidebyside solarisaio: aiowait() can return (void *) -1 for error Signed-off-by: Jens Axboe --- diff --git a/engines/solarisaio.c b/engines/solarisaio.c index 0852cde4..f7f832b8 100644 --- a/engines/solarisaio.c +++ b/engines/solarisaio.c @@ -53,7 +53,14 @@ static int fio_solarisaio_getevents(struct thread_data *td, unsigned int min, } p = aiowait(&tv); - if (p) { + if (p == (aio_result_t *) -1) { + int err = errno; + + if (err == EINVAL) + break; + td_verror(td, err, "aiowait"); + break; + } else if (p != NULL) { io_u = container_of(p, struct io_u, resultp); sd->aio_events[r++] = io_u;