From 5789a6351a2ae69e810fca79b9e9b68797169e17 Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Thu, 17 Jan 2019 18:12:22 -0700 Subject: Add sqe prep helpers Signed-off-by: Jens Axboe --- test/io_uring-test.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'test/io_uring-test.c') diff --git a/test/io_uring-test.c b/test/io_uring-test.c index a8e8cdf..caca379 100644 --- a/test/io_uring-test.c +++ b/test/io_uring-test.c @@ -54,14 +54,7 @@ int main(int argc, char *argv[]) sqe = io_uring_get_sqe(&ring); if (!sqe) break; - sqe->opcode = IORING_OP_READV; - sqe->flags = 0; - sqe->ioprio = 0; - sqe->fd = fd; - sqe->off = offset; - sqe->addr = (unsigned long) &iovecs[i]; - sqe->len = 1; - sqe->buf_index = 0; + io_uring_prep_readv(sqe, fd, &iovecs[i], 1, offset); offset += iovecs[i].iov_len; } while (1); -- cgit