From 06e6e427c76bdb88a7f72dd04411d95a4bda3270 Mon Sep 17 00:00:00 2001 From: Miguel Date: Sun, 16 Sep 2018 23:46:30 +0200 Subject: starting to create sysfs --- kernel/syscalls.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'kernel/syscalls.c') diff --git a/kernel/syscalls.c b/kernel/syscalls.c index 5205bf1..8b5040a 100644 --- a/kernel/syscalls.c +++ b/kernel/syscalls.c @@ -16,6 +16,7 @@ #include "scheduler.h" #include "log.h" #include "timer.h" +#include "mount.h" static fd fds[MAX_FD]; static uint32_t next_fd=0; @@ -155,9 +156,7 @@ int syscall_read(int file, char *buf, int len) //TODO: replace with dirent! int syscall_readdir(const char *name,fs_dirent *dirs,int *pos) { - uint32_t inode = ext2_filename_to_inode(VMEM_EXT2_RAMIMAGE,name); - if(inode==0)return 0; - return ext2_read_dir(VMEM_EXT2_RAMIMAGE, inode, dirs, pos); + return mount_read_dir(name, dirs, pos); } // for non blocking io? @@ -330,7 +329,7 @@ int syscall_open(char *name, int flags, int mode) } else { - fds[next_fd]=fd_from_path(name); + fds[next_fd]=mount_file_open(name); if(*(uint32_t *)fds[next_fd].data==0)return -1; } -- cgit v1.2.3