kernel - whatever

This commit is contained in:
RaphProductions 2025-05-14 18:15:15 +02:00
parent 0772a48c29
commit 31e53e88b9
10 changed files with 112 additions and 32 deletions

19
kernel/src/fs/vfs.c Normal file
View file

@ -0,0 +1,19 @@
#include "fs/vfs.h"
#include "mm/liballoc/liballoc.h"
#include "mm/memop.h"
#include "lib/string.h"
vnode_t *vfs_create_node(char *name, vnode_type_t type) {
vnode_t *node = (vnode_t *)malloc(sizeof(vnode_t));
if (!node) {
return NULL;
}
memset(node, 0, sizeof(vnode_t));
strncpy(node->name, name, sizeof(node->name) - 1);
node->type = type;
node->ops = NULL;
//node->parent = NULL;
//node->child = NULL;
//node->next = NULL;
return node;
}