aboutsummaryrefslogtreecommitdiff
path: root/test/rename.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/rename.c')
-rw-r--r--test/rename.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/test/rename.c b/test/rename.c
index af09d65..67d4e9c 100644
--- a/test/rename.c
+++ b/test/rename.c
@@ -9,6 +9,7 @@
#include <stdlib.h>
#include <string.h>
#include <fcntl.h>
+#include <sys/stat.h>
#include "liburing.h"
@@ -25,11 +26,8 @@ static int test_rename(struct io_uring *ring, const char *old, const char *new)
}
memset(sqe, 0, sizeof(*sqe));
- sqe->opcode = IORING_OP_RENAMEAT;
- sqe->fd = AT_FDCWD;
- sqe->addr2 = (unsigned long) new;
- sqe->addr = (unsigned long) old;
- sqe->len = AT_FDCWD;
+
+ io_uring_prep_rename(sqe, old, new);
ret = io_uring_submit(ring);
if (ret <= 0) {