diff options
Diffstat (limited to 'src/kernel/syscall/actions/sys_read.c')
-rw-r--r-- | src/kernel/syscall/actions/sys_read.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/kernel/syscall/actions/sys_read.c b/src/kernel/syscall/actions/sys_read.c index a954f56..8931ede 100644 --- a/src/kernel/syscall/actions/sys_read.c +++ b/src/kernel/syscall/actions/sys_read.c @@ -8,15 +8,15 @@ uint32_t sys_read(char *path, uint32_t offset, uint32_t count, char *buf) { struct fs_node *node = (struct fs_node *)umalloc(sizeof(struct fs_node)); strcpy(node->name, path); - ext2_root->open(node); + fs_open(node); if (node->inode != 0) { uint32_t size = ((struct ext2_file *)node->impl)->inode.size; - ext2_root->read(node, 0, size, buf); + fs_read(node, 0, size, buf); buf[size - 1] = '\0'; - ext2_root->close(node); + fs_close(node); return size; } else { - ext2_root->close(node); + fs_close(node); return -1; } }
\ No newline at end of file |