diff options
Diffstat (limited to 'src/user/app/init/driver')
-rw-r--r-- | src/user/app/init/driver/tmpfs.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/user/app/init/driver/tmpfs.c b/src/user/app/init/driver/tmpfs.c index 96fdf39..7414320 100644 --- a/src/user/app/init/driver/tmpfs.c +++ b/src/user/app/init/driver/tmpfs.c @@ -15,7 +15,9 @@ struct node { }; struct node *root = NULL; -static struct node special_root; +static struct node special_root = { + .size = 0, +}; static struct node *lookup(const char *path, size_t len) { for (struct node *iter = root; iter; iter = iter->next) { @@ -109,6 +111,11 @@ void tmpfs_drv(void) { _syscall_fs_respond(NULL, res.len, 0); break; + case VFSOP_GETSIZE: + ptr = (void*)res.id; + _syscall_fs_respond(NULL, ptr->size, 0); + break; + default: _syscall_fs_respond(NULL, -1, 0); break; |