From 32858e669a79e0a053031fd65e2007d4b89e066b Mon Sep 17 00:00:00 2001 From: David Härdeman Date: Sun, 12 Jul 2020 14:11:53 +0200 Subject: Teach minecproxy to use same dirs as minecctl, step 2 --- minecproxy/uring.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'minecproxy/uring.c') diff --git a/minecproxy/uring.c b/minecproxy/uring.c index 0e90914..ead566d 100644 --- a/minecproxy/uring.c +++ b/minecproxy/uring.c @@ -423,7 +423,8 @@ void uring_read_offset(struct uring_task *task, void *buf, size_t len, io_uring_sqe_set_data(sqe, task); } -void uring_openat(struct uring_task *task, const char *path, utask_cb_t cb) +void uring_openat(struct uring_task *task, int dfd, const char *path, + utask_cb_t cb) { struct io_uring_sqe *sqe; @@ -434,7 +435,7 @@ void uring_openat(struct uring_task *task, const char *path, utask_cb_t cb) sqe = get_sqe(task); task->cb = cb; - io_uring_prep_openat(sqe, AT_FDCWD, path, O_RDONLY | O_CLOEXEC, 0); + io_uring_prep_openat(sqe, dfd, path, O_RDONLY | O_CLOEXEC, 0); io_uring_sqe_set_data(sqe, task); } -- cgit v1.2.3