diff options
author | dzwdz | 2022-08-19 19:44:36 +0200 |
---|---|---|
committer | dzwdz | 2022-08-19 19:44:36 +0200 |
commit | 390aec5ca22e62d128e71d1dee312a2f0a82ab68 (patch) | |
tree | 2a79bb1ee35dab3006a947f595891fbcfefa4bfb /src/user/app/login/login.c | |
parent | 6bea8cd391125734339dfb83db498a8651c9f7f7 (diff) |
syscall/fs_wait: return a handle for each request
Diffstat (limited to 'src/user/app/login/login.c')
-rw-r--r-- | src/user/app/login/login.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/user/app/login/login.c b/src/user/app/login/login.c index 241bcfe..9f8ba6d 100644 --- a/src/user/app/login/login.c +++ b/src/user/app/login/login.c @@ -6,6 +6,7 @@ #include <stdio.h> #include <string.h> #include <unistd.h> +#include <user/lib/compat.h> #include <user/lib/fs/misc.h> static const char *shell = "/bin/shell"; @@ -39,12 +40,12 @@ static void drv(const char *prefix) { struct fs_wait_response res; size_t prefixlen = strlen(prefix); char buf[128]; - while (!_syscall_fs_wait(buf, sizeof buf, &res)) { + while (!c0_fs_wait(buf, sizeof buf, &res)) { switch (res.op) { handle_t h; case VFSOP_OPEN: if (res.len == sizeof buf) { - _syscall_fs_respond(NULL, -1, 0); + c0_fs_respond(NULL, -1, 0); break; } buf[res.len] = '\0'; @@ -56,11 +57,11 @@ static void drv(const char *prefix) { } else { h = -EACCES; } - _syscall_fs_respond(NULL, h, FSR_DELEGATE); + c0_fs_respond(NULL, h, FSR_DELEGATE); break; default: - _syscall_fs_respond(NULL, -1, 0); + c0_fs_respond(NULL, -1, 0); break; } } |