summaryrefslogtreecommitdiff
path: root/src/kernel/vfs/procfs.c
diff options
context:
space:
mode:
authordzwdz2023-09-25 00:12:57 +0200
committerdzwdz2023-09-25 00:12:57 +0200
commit2c78dc983d09e136dd016ae6ecee6b191e033de1 (patch)
treefa3f0c858a0c1b61d00d4a7474e80b1aa0368bbf /src/kernel/vfs/procfs.c
parent16138fc20fc9c472af37fb8385a997a0d9202f32 (diff)
kernel/intr: accept a message, allow killing processes via intrs
Diffstat (limited to 'src/kernel/vfs/procfs.c')
-rw-r--r--src/kernel/vfs/procfs.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/kernel/vfs/procfs.c b/src/kernel/vfs/procfs.c
index 7ba43d8..5031840 100644
--- a/src/kernel/vfs/procfs.c
+++ b/src/kernel/vfs/procfs.c
@@ -146,7 +146,9 @@ procfs_accept(VfsReq *req)
);
vfsreq_finish_short(req, res);
} else if (req->type == VFSOP_WRITE && h->type == PhIntr) {
- proc_intr(p);
+ size_t len = min(sizeof buf, req->input.len);
+ len = pcpy_from(req->caller, buf, req->input.buf, len);
+ proc_intr(p, buf, len);
vfsreq_finish_short(req, req->input.len);
} else {
vfsreq_finish_short(req, -ENOSYS);