still working on a more robust vfs

This commit is contained in:
2026-07-11 10:33:08 -05:00
parent 032a35206a
commit 92748fd258
8 changed files with 381 additions and 318 deletions

View File

@@ -15,15 +15,20 @@ struct vfs_node;
typedef uint32_t (*read_type_t)(struct vfs_node* node, uint32_t offset, uint32_t size, uint8_t* buffer);
typedef uint32_t (*write_type_t)(struct vfs_node* node, uint32_t offset, uint32_t size, uint8_t* buffer);
typedef struct vfs_node* (*finddir_type_t)(struct vfs_node* node, const char* name);
typedef struct vfs_node* (*mkdir_type_t)(struct vfs_node* node, const char* name);
typedef struct vfs_node {
char name[128];
uint32_t flags; // File, directory, device, etc.
uint32_t size; // Size of file in bytes
struct vfs_node* first_child;
struct vfs_node* next_sibling;
read_type_t read;
write_type_t write;
finddir_type_t finddir;
finddir_type_t find;
mkdir_type_t mkdir;
struct vfs_node* mnt;
void* data;