diff options
author | dzwdz | 2021-11-20 14:48:26 +0100 |
---|---|---|
committer | dzwdz | 2021-11-20 14:48:26 +0100 |
commit | 6caac6e940ab79960b1c1ca0e5ed8f28aa49a3a9 (patch) | |
tree | 4eb0ee06dff833a28245fc476abf4cf001e1414d /src/init/tar.c | |
parent | 99520606ebfc5fbceedfd7ac3cd405e19a778ffc (diff) |
kernel: fs_wait returns a success val; the op type is put in the struct
Diffstat (limited to 'src/init/tar.c')
-rw-r--r-- | src/init/tar.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/init/tar.c b/src/init/tar.c index b041a98..e0843e7 100644 --- a/src/init/tar.c +++ b/src/init/tar.c @@ -18,8 +18,8 @@ static const char *root_fakemeta = ""; /* see comment in tar_open */ void tar_driver(void *base) { static char buf[BUF_SIZE]; struct fs_wait_response res; - for (;;) { - switch (_syscall_fs_wait(buf, BUF_SIZE, &res)) { + while (!_syscall_fs_wait(buf, BUF_SIZE, &res)) { + switch (res.op) { case VFSOP_OPEN: _syscall_fs_respond(NULL, tar_open(buf, res.len, base, ~0)); break; @@ -33,6 +33,7 @@ void tar_driver(void *base) { break; } } + _syscall_exit(0); } static int tar_open(const char *path, int len, void *base, size_t base_len) { |