summaryrefslogtreecommitdiff
path: root/src/kernel/arch/amd64/driver/serial.c
diff options
context:
space:
mode:
authordzwdz2022-08-07 22:07:27 +0200
committerdzwdz2022-08-07 22:07:27 +0200
commit9a43ead118ec1506848bad9d2bcddfb0fd458552 (patch)
tree295103e04a01e0eaa319d0984c9a74bb50956c4c /src/kernel/arch/amd64/driver/serial.c
parentfbbe8a1cb4c421e9658c5009ecfab6845137587b (diff)
kernel: ps2 mouse support
Diffstat (limited to 'src/kernel/arch/amd64/driver/serial.c')
-rw-r--r--src/kernel/arch/amd64/driver/serial.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/kernel/arch/amd64/driver/serial.c b/src/kernel/arch/amd64/driver/serial.c
index d8ee90b..921e140 100644
--- a/src/kernel/arch/amd64/driver/serial.c
+++ b/src/kernel/arch/amd64/driver/serial.c
@@ -80,8 +80,8 @@ static void accept(struct vfs_request *req) {
while (*slot) slot = &(*slot)->postqueue_next;
*slot = req;
} else if (req->caller) {
- if (ret < 0) ret = 0;
ret = ring_to_virt((void*)&backlog, req->caller->pages, req->output.buf, req->output.len);
+ // TODO output.len can overflow here
vfsreq_finish_short(req, ret);
} else {
vfsreq_finish_short(req, -1);