summaryrefslogtreecommitdiff
path: root/src/cmd/tests/kernel/path.c
diff options
context:
space:
mode:
authordzwdz2024-08-17 17:17:12 +0200
committerdzwdz2024-08-17 17:17:12 +0200
commitfa792166e13115b4262e8533da2839518df3bfe3 (patch)
treece0019f4406aa11bda8e36bedab11a2bfea181c1 /src/cmd/tests/kernel/path.c
parent2ea826b428246eb62be81630f441a4367a675968 (diff)
kernel: immediately fail open() request instead of truncating the path
less error prone
Diffstat (limited to 'src/cmd/tests/kernel/path.c')
-rw-r--r--src/cmd/tests/kernel/path.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/cmd/tests/kernel/path.c b/src/cmd/tests/kernel/path.c
index 5a22c36..215d36b 100644
--- a/src/cmd/tests/kernel/path.c
+++ b/src/cmd/tests/kernel/path.c
@@ -67,7 +67,8 @@ static void mount_resolve_drv(const char *path) {
if (mount_at(path) != 0) return;
struct ufs_request res;
- while (!c0_fs_wait(NULL, 0, &res)) {
+ char buf[512];
+ while (!c0_fs_wait(buf, sizeof(buf), &res)) {
// TODO does the first argument of c0_fs_respond need to be non-const?
c0_fs_respond((void*)path, strlen(path), 0);
}