fs: implement readdir function
this also fixes flawed file parsing in ext2_open_file
This commit is contained in:
parent
4c040f280f
commit
0eb461410c
7 changed files with 292 additions and 67 deletions
|
|
@ -8,6 +8,7 @@ static const char *errno_str[] = {
|
|||
[ENOENT] = "No such file or directory",
|
||||
[EINVAL] = "Invalid argument",
|
||||
[EBADF] = "Bad file descriptor",
|
||||
[ENOTDIR] = "Not a directory",
|
||||
};
|
||||
|
||||
inline const char *strerror(int errnum)
|
||||
|
|
|
|||
|
|
@ -138,6 +138,9 @@ char *strtok(char *str, const char *delim, char **llast)
|
|||
(*llast)++;
|
||||
}
|
||||
|
||||
if(!(*ret))
|
||||
return NULL;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue