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:
Michael Shaw 2026-07-01 23:06:39 +02:00
commit a8540494a9
11 changed files with 345 additions and 137 deletions

View file

@ -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";