11#include <sys/kassert.h>
12#include <sys/kdebug.h>
13#include <sys/spinlock.h>
16#include <sys/handle.h>
51 Panic(
"Failed to get root VNode\n");
66 const char *start = path + 1;
67 const char *end = path + 1;
78 Panic(
"Failed to get root VNode\n");
81 while (*end !=
'\0' && *end !=
'/')
99 status = oldNode->
op->
lookup(oldNode, &curNode, curName);
108 Log(vfs,
"%s %lx\n", path, curNode);
#define Log(_module, _format,...)
#define DEFINE_SLAB(_type, _pool)
void Slab_Init(Slab *slab, const char *name, uintptr_t objsz, uintptr_t align)
#define SPINLOCK_TYPE_NORMAL
void Spinlock_Init(Spinlock *lock, const char *name, uint64_t type)
void * memcpy(void *dst, const void *src, size_t len)
int(* stat)(VNode *fn, struct stat *sb)
int(* getroot)(VFS *fs, VNode **dn)
int(* write)(VNode *fn, void *buf, uint64_t off, uint64_t len)
int(* readdir)(VNode *fn, void *buf, uint64_t len, uint64_t *off)
int(* lookup)(VNode *dn, VNode **fn, const char *name)
int(* read)(VNode *fn, void *buf, uint64_t off, uint64_t len)
int VFS_Stat(const char *path, struct stat *sb)
int VFS_Read(VNode *fn, void *buf, uint64_t off, uint64_t len)
VNode * VFS_Lookup(const char *path)
int VFS_ReadDir(VNode *fn, void *buf, uint64_t len, uint64_t *off)
int VFS_MountRoot(Disk *rootDisk)
int VFS_Write(VNode *fn, void *buf, uint64_t off, uint64_t len)
VFS * O2FS_Mount(Disk *root)
void Panic(const char *str)