aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Kadashev <dkadashev@gmail.com>2021-06-03 12:28:59 +0700
committerJens Axboe <axboe@kernel.dk>2021-06-21 09:58:19 -0600
commitdc99fb1c850b8918355e121c263ec6e938f07f1a (patch)
treef2cdac78742854562748112e7b549d96b1e34dd3
parent27845565c4b290820d2fc381f48a9e3101544747 (diff)
downloadliburing-dc99fb1c850b8918355e121c263ec6e938f07f1a.tar.gz
liburing.h: add symlinkat prep helper
Signed-off-by: Dmitry Kadashev <dkadashev@gmail.com> Link: https://lore.kernel.org/r/20210603052906.2616489-5-dkadashev@gmail.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
-rw-r--r--src/include/liburing.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/include/liburing.h b/src/include/liburing.h
index b7f3bea..e033543 100644
--- a/src/include/liburing.h
+++ b/src/include/liburing.h
@@ -554,6 +554,13 @@ static inline void io_uring_prep_mkdirat(struct io_uring_sqe *sqe, int dfd,
io_uring_prep_rw(IORING_OP_MKDIRAT, sqe, dfd, path, mode, 0);
}
+static inline void io_uring_prep_symlinkat(struct io_uring_sqe *sqe,
+ const char *target, int newdirfd, const char *linkpath)
+{
+ io_uring_prep_rw(IORING_OP_SYMLINKAT, sqe, newdirfd, target, 0,
+ (uint64_t) (uintptr_t) linkpath);
+}
+
/*
* Returns number of unconsumed (if SQPOLL) or unsubmitted entries exist in
* the SQ ring