diff options
author | Dmitry Kadashev <dkadashev@gmail.com> | 2021-06-03 12:29:05 +0700 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2021-06-21 09:58:19 -0600 |
commit | e3d522a4a418eb82fe5a4bc3d9df0292f624f878 (patch) | |
tree | 7b90b94e30ad28cb71b25861285cfc1a5f81e6ca | |
parent | a36f3e8b8060dbe7fe1bfa8501b9286f7d3b5a64 (diff) | |
download | liburing-e3d522a4a418eb82fe5a4bc3d9df0292f624f878.tar.gz |
liburing.h: add mknodat prep helper
Signed-off-by: Dmitry Kadashev <dkadashev@gmail.com>
Link: https://lore.kernel.org/r/20210603052906.2616489-11-dkadashev@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
-rw-r--r-- | src/include/liburing.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/include/liburing.h b/src/include/liburing.h index 51dc602..c6ef0e8 100644 --- a/src/include/liburing.h +++ b/src/include/liburing.h @@ -570,6 +570,13 @@ static inline void io_uring_prep_linkat(struct io_uring_sqe *sqe, int olddfd, sqe->hardlink_flags = flags; } +static inline void io_uring_prep_mknodat(struct io_uring_sqe *sqe, int dfd, + const char *pathname, mode_t mode, dev_t dev) +{ + io_uring_prep_rw(IORING_OP_MKNODAT, sqe, dfd, pathname, mode, 0); + sqe->mknod_dev = dev; +} + /* * Returns number of unconsumed (if SQPOLL) or unsubmitted entries exist in * the SQ ring |