summaryrefslogtreecommitdiff
path: root/src/kernel/vfs
diff options
context:
space:
mode:
authordzwdz2024-08-17 17:17:12 +0200
committerdzwdz2024-08-17 17:17:12 +0200
commitfa792166e13115b4262e8533da2839518df3bfe3 (patch)
treece0019f4406aa11bda8e36bedab11a2bfea181c1 /src/kernel/vfs
parent2ea826b428246eb62be81630f441a4367a675968 (diff)
kernel: immediately fail open() request instead of truncating the path
less error prone
Diffstat (limited to 'src/kernel/vfs')
-rw-r--r--src/kernel/vfs/request.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/kernel/vfs/request.c b/src/kernel/vfs/request.c
index 50fcc22..4e8a162 100644
--- a/src/kernel/vfs/request.c
+++ b/src/kernel/vfs/request.c
@@ -155,7 +155,9 @@ vfsback_useraccept(VfsReq *req)
len = req->kinlen;
pcpy_to(handler, buf, req->kin, len+1); /* +1 for NUL */
} else {
- panic_unimplemented(); // TODO! fail
+ // XXX this is an easy way to tell user fses apart from kernel fses
+ vfsreq_finish_short(req, -ENOENT);
+ return;
}
} else if (req->uin) {
void __user *buf = handler->awaited_req.buf;