diff options
author | dzwdz | 2024-08-17 01:57:04 +0200 |
---|---|---|
committer | dzwdz | 2024-08-17 01:57:04 +0200 |
commit | 468ef8f1d57527af3fe8b67bbc73813e951a0ec5 (patch) | |
tree | 0e10641f6bc7548bdb0dbd77cd5c4737977a197b /src/kernel/arch/amd64/driver/time.c | |
parent | 806eecd7a2fe12daccf2c7c7171ce52e3fd93799 (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/time.c')
-rw-r--r-- | src/kernel/arch/amd64/driver/time.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/kernel/arch/amd64/driver/time.c b/src/kernel/arch/amd64/driver/time.c index f47cb74..5ec28b9 100644 --- a/src/kernel/arch/amd64/driver/time.c +++ b/src/kernel/arch/amd64/driver/time.c @@ -52,9 +52,8 @@ handle(VfsReq *req) case VFSOP_GETSIZE: return 8; case VFSOP_WRITE: - if (req->input.len == 8) { - assert(!req->input.kern); - if (pcpy_from(req->caller, u.buf, req->input.buf, sizeof u.buf) != sizeof(u.buf)) { + if (req->uinlen == 8) { + if (pcpy_from(req->caller, u.buf, req->uin, sizeof u.buf) != sizeof(u.buf)) { return -EGENERIC; } h->base = now - u.t; |