X-Git-Url: https://scm.lunaixsky.com/lunaix-os.git/blobdiff_plain/0e1309c02f0703c050df09b71346dab60fc6df87..ddb4e08c76afcae5e40e0bcb418683dfb2a22aa8:/lunaix-os/kernel/fs/fsm.c?ds=sidebyside diff --git a/lunaix-os/kernel/fs/fsm.c b/lunaix-os/kernel/fs/fsm.c index 10e766a..bce983a 100644 --- a/lunaix-os/kernel/fs/fsm.c +++ b/lunaix-os/kernel/fs/fsm.c @@ -11,6 +11,7 @@ #include #include #include +#include #define HASH_BUCKET_BITS 4 #define HASH_BUCKET_NUM (1 << HASH_BUCKET_BITS) @@ -21,6 +22,8 @@ void fsm_init() { hashtable_init(fs_registry); + + fsm_register_all(); } void @@ -45,4 +48,12 @@ fsm_get(const char* fs_name) } return NULL; +} + +struct filesystem* +fsm_new_fs(char* name, size_t name_len) +{ + struct filesystem* fs = vzalloc(sizeof(*fs)); + fs->fs_name = HHSTR(name, name_len, 0); + return fs; } \ No newline at end of file