From 1e08b64b43bf9c50b644da3f76d5a8bcc73f62da Mon Sep 17 00:00:00 2001 From: Miguel Date: Wed, 19 Sep 2018 01:52:14 +0200 Subject: addding sysfs and pipes etc --- fs/ext2.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'fs/ext2.c') diff --git a/fs/ext2.c b/fs/ext2.c index b518bd9..9cc5b34 100644 --- a/fs/ext2.c +++ b/fs/ext2.c @@ -315,6 +315,9 @@ fd ext2_mount_file_open(mount *m,char *path) int ext2_mount_read_dir(mount *m,char *path, fs_dirent *dirs, uint32_t *pos) { uint32_t inode= ext2_filename_to_inode(VMEM_EXT2_RAMIMAGE,path); + if(inode==0)return -1; + ext2_inode *inode_current=ext2_get_inode(VMEM_EXT2_RAMIMAGE,inode); + if(!(inode_current->permissions&0x4000))return -1; return ext2_read_dir(m->data, inode, dirs, pos); } -- cgit v1.2.3