summaryrefslogtreecommitdiff
path: root/src/user/app
diff options
context:
space:
mode:
Diffstat (limited to 'src/user/app')
-rw-r--r--src/user/app/tmpfs/tmpfs.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/user/app/tmpfs/tmpfs.c b/src/user/app/tmpfs/tmpfs.c
index 88a9fac..ed3c2e3 100644
--- a/src/user/app/tmpfs/tmpfs.c
+++ b/src/user/app/tmpfs/tmpfs.c
@@ -77,7 +77,6 @@ int main(void) {
} else {
fs_normslice(&res.offset, &res.len, ptr->size, false);
_syscall_fs_respond(ptr->buf + res.offset, res.len, 0);
- break;
}
break;
@@ -119,7 +118,15 @@ int main(void) {
case VFSOP_GETSIZE:
ptr = (void*)res.id;
- _syscall_fs_respond(NULL, ptr->size, 0);
+ if (ptr == &special_root) {
+ struct dirbuild db;
+ dir_start(&db, res.offset, NULL, buflen);
+ for (struct node *iter = root; iter; iter = iter->next)
+ dir_append(&db, iter->name);
+ _syscall_fs_respond(NULL, dir_finish(&db), 0);
+ } else {
+ _syscall_fs_respond(NULL, ptr->size, 0);
+ }
break;
default: