kv2: initialize memory manager, early pci devices
Signed-off-by: Michael Shaw <spencershawiscool@gmail.com>
This commit is contained in:
parent
e5b55a6ba5
commit
a252a3f8e9
58 changed files with 1270 additions and 505 deletions
44
fs/vfs/vfs.c
Normal file
44
fs/vfs/vfs.c
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
#include <kernel/slab.h>
|
||||
|
||||
#include <lib/list.h>
|
||||
#include <lib/string.h>
|
||||
#include <fs/vfs.h>
|
||||
|
||||
static fs_t root_fs = {0};
|
||||
|
||||
void vfs_mount(inode_t *mount_point, fs_t *fs_to_mount)
|
||||
{
|
||||
if (!mount_point) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
void vfs_close_inode(inode_t *inode)
|
||||
{
|
||||
list_item_t *entry = inode->dentries.head;
|
||||
while (entry) {
|
||||
dirent_t *dirent = entry->ptr;
|
||||
|
||||
if (dirent->inode) {
|
||||
vfs_close_inode(dirent->inode);
|
||||
}
|
||||
|
||||
inode_free(inode);
|
||||
|
||||
entry = entry->next;
|
||||
}
|
||||
}
|
||||
|
||||
void vfs_open_inode(const char *path)
|
||||
{
|
||||
}
|
||||
|
||||
void vfs_init()
|
||||
{
|
||||
void inode_init();
|
||||
inode_init();
|
||||
memset(&root_fs, 0, sizeof(root_fs));
|
||||
}
|
||||
Loading…
Reference in a new issue