summaryrefslogtreecommitdiff
path: root/src/kernel/arch/amd64/driver/util.h
diff options
context:
space:
mode:
authordzwdz2024-08-17 01:57:04 +0200
committerdzwdz2024-08-17 01:57:04 +0200
commit468ef8f1d57527af3fe8b67bbc73813e951a0ec5 (patch)
tree0e10641f6bc7548bdb0dbd77cd5c4737977a197b /src/kernel/arch/amd64/driver/util.h
parent806eecd7a2fe12daccf2c7c7171ce52e3fd93799 (diff)
kernel: split the kernel/user inputs in VfsReq
I think I've done this refactor in the opposite direction a few years ago. This is mostly meant to prepare me for setxattr, which requires two inputs - coincidentally, one is already going to be a kernel input, and the other will be an user input, so it works out. I also just didn't like the previous way it worked, this feels cleaner.
Diffstat (limited to 'src/kernel/arch/amd64/driver/util.h')
-rw-r--r--src/kernel/arch/amd64/driver/util.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/kernel/arch/amd64/driver/util.h b/src/kernel/arch/amd64/driver/util.h
index 898875a..44d5728 100644
--- a/src/kernel/arch/amd64/driver/util.h
+++ b/src/kernel/arch/amd64/driver/util.h
@@ -11,8 +11,6 @@ int req_readcopy(VfsReq *req, const void *buf, size_t len);
/* compare request path. path MUST be a static string */
#define reqpathcmp(req, path) _reqpathcmp(req, ""path"", sizeof(path) - 1)
#define _reqpathcmp(req, path, plen) \
- (req->input.kern && \
- req->input.len == plen && \
- memcmp(req->input.buf_kern, path, plen) == 0)
+ (req->kin && req->kinlen == plen && memcmp(req->kin, path, plen) == 0)
size_t ring_to_virt(ring_t *r, Proc *proc, void __user *ubuf, size_t max);