- fix bug in open_fs and findnode_fs
This commit is contained in:
parent
df4eaf5163
commit
b8552f1f03
1 changed files with 5 additions and 0 deletions
5
fs/fs.c
5
fs/fs.c
|
@ -72,6 +72,8 @@ int open_fs(fildes_t* file, const char* name)
|
|||
|
||||
if (name[0] == '/')
|
||||
file_node = fs_root;
|
||||
else
|
||||
return -ENOENT;
|
||||
|
||||
while((name[j] != '\0') && (file_node != NULL)) {
|
||||
i = 0;
|
||||
|
@ -180,6 +182,9 @@ vfs_node_t* findnode_fs(const char* name)
|
|||
|
||||
if (name[0] == '/')
|
||||
ret = fs_root;
|
||||
else
|
||||
return -ENOENT;
|
||||
|
||||
|
||||
while((name[j] != '\0') && ret) {
|
||||
i = 0;
|
||||
|
|
Loading…
Add table
Reference in a new issue