vfs: add vfs_open
vfs_open parses a path and returns the correct inode. The out inode is a double pointer argument passed to vfs_open, and the return value is an error code, or 0 Signed-off-by: Michael Shaw <m@michaelsshaw.com>
This commit is contained in:
parent
913b91189b
commit
a8540494a9
11 changed files with 345 additions and 137 deletions
|
|
@ -17,9 +17,10 @@ static const char *errno_str[] = {
|
|||
[EAGAIN] = "Try again",
|
||||
[EBUSY] = "Device or resource busy",
|
||||
[ENOSYS] = "Function not implemented",
|
||||
[ENAMETOOLONG] = "Name too long",
|
||||
};
|
||||
|
||||
inline const char *strerror(int errnum)
|
||||
const char *strerror(int errnum)
|
||||
{
|
||||
if (errnum < 0 || (size_t)errnum >= ARRAY_SIZE(errno_str))
|
||||
return "Unknown error";
|
||||
|
|
|
|||
Loading…
Reference in a new issue