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/rtl8139.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/rtl8139.c')
-rw-r--r-- | src/kernel/arch/amd64/driver/rtl8139.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/kernel/arch/amd64/driver/rtl8139.c b/src/kernel/arch/amd64/driver/rtl8139.c index c952d8a..c739527 100644 --- a/src/kernel/arch/amd64/driver/rtl8139.c +++ b/src/kernel/arch/amd64/driver/rtl8139.c @@ -204,7 +204,7 @@ static void accept(VfsReq *req) { ret = req_readcopy(req, data, sizeof data); vfsreq_finish_short(req, ret); } else if (id == HandleNet) { - ret = try_rx(req->caller, req->output.buf, req->output.len); + ret = try_rx(req->caller, req->out, req->outlen); if (ret == WAIT) { reqqueue_join(&blocked_on, req); rx_irq_enable(true); @@ -218,8 +218,7 @@ static void accept(VfsReq *req) { break; case VFSOP_WRITE: if (id == HandleNet) { - assert(!req->input.kern); - vfsreq_finish_short(req, try_tx(req->caller, req->input.buf, req->input.len)); + vfsreq_finish_short(req, try_tx(req->caller, req->uin, req->uinlen)); } else { vfsreq_finish_short(req, -ENOSYS); } |