diff options
author | Jens Axboe <axboe@kernel.dk> | 2019-01-17 18:12:22 -0700 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2019-01-17 18:12:22 -0700 |
commit | 5789a6351a2ae69e810fca79b9e9b68797169e17 (patch) | |
tree | 7749af6aa692ead29f20a20ef2a9dfef71834ac9 /test/io_uring-test.c | |
parent | 980cc0f0256f18eb3a6e53e394251cb18fc7d218 (diff) |
Add sqe prep helpers
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'test/io_uring-test.c')
-rw-r--r-- | test/io_uring-test.c | 9 |
1 files changed, 1 insertions, 8 deletions
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); |