summaryrefslogtreecommitdiff
path: root/src/init/fs/misc.c
diff options
context:
space:
mode:
authordzwdz2021-11-20 14:48:26 +0100
committerdzwdz2021-11-20 14:48:26 +0100
commit6caac6e940ab79960b1c1ca0e5ed8f28aa49a3a9 (patch)
tree4eb0ee06dff833a28245fc476abf4cf001e1414d /src/init/fs/misc.c
parent99520606ebfc5fbceedfd7ac3cd405e19a778ffc (diff)
kernel: fs_wait returns a success val; the op type is put in the struct
Diffstat (limited to 'src/init/fs/misc.c')
-rw-r--r--src/init/fs/misc.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/init/fs/misc.c b/src/init/fs/misc.c
index d12fce3..cb94ef5 100644
--- a/src/init/fs/misc.c
+++ b/src/init/fs/misc.c
@@ -17,8 +17,8 @@ void fs_passthru(const char *prefix) {
int ret, prefix_len;
if (prefix) prefix_len = strlen(prefix);
- for (;;) {
- switch (_syscall_fs_wait(buf, buf_size, &res)) {
+ while (!_syscall_fs_wait(buf, buf_size, &res)) {
+ switch (res.op) {
case VFSOP_OPEN:
if (prefix) {
if (prefix_len + res.len <= buf_size) {
@@ -50,4 +50,5 @@ void fs_passthru(const char *prefix) {
break;
}
}
+ _syscall_exit(0);
}