fs: Initial VFS port
This commit is contained in:
@@ -1,3 +1,21 @@
|
||||
#include <zinnia/vfs.h>
|
||||
// SPDX-License-Identifier: ISC
|
||||
|
||||
void vfs_init() {}
|
||||
#include <zinnia/alloc.h>
|
||||
#include <zinnia/assert.h>
|
||||
#include <zinnia/initgraph.h>
|
||||
#include <zinnia/vfs.h>
|
||||
#include "internal.h"
|
||||
|
||||
static void vfs_stage_init(struct boot_info* info) {
|
||||
// Mount a tmpfs as root.
|
||||
struct vfs_mount* tmpfs;
|
||||
errno_t status = vfs_mount("tmpfs", 0, nullptr, &tmpfs);
|
||||
assert(status == 0, "Unable to mount the root tmpfs (%i)", status);
|
||||
|
||||
struct vfs_path root = {.mount = tmpfs, .entry = tmpfs->root};
|
||||
vfs_set_root(root);
|
||||
vfs_mount_unref(tmpfs);
|
||||
}
|
||||
|
||||
INIT_TASK(vfs_stage, "fs.vfs", vfs_stage_init);
|
||||
INIT_DEPENDS(vfs_stage, mem_stage);
|
||||
|
||||
Reference in New Issue
Block a user