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

@ -228,5 +228,7 @@ void ahci_init()
ahci_init_device(item->ptr);
item = item->next;
}
krdy("AHCI ready\n");
}
DRIVER_ENTRY_PRIORITY(ahci_init, 3);

View file

@ -3,12 +3,12 @@
#include <drivers/block.h>
inline ssize_t block_read(struct block_device *dev, char *buf, size_t offset, size_t n)
ssize_t block_read(struct block_device *dev, char *buf, size_t offset, size_t n)
{
return dev->ops.read(dev, buf, offset, n);
}
inline ssize_t block_write(struct block_device *dev, char *buf, size_t offset, size_t n)
ssize_t block_write(struct block_device *dev, char *buf, size_t offset, size_t n)
{
return dev->ops.write(dev, buf, offset, n);
}