From 0f09e829c3e1aa24d16059ab6665098fedf17c05 Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Mon, 2 Jun 2008 14:18:23 +0200 Subject: [PATCH] solarisaio: aiowait() can return (void *) -1 for error Signed-off-by: Jens Axboe --- engines/solarisaio.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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; -- 2.25.1