fix: remove unnecessary backtracing in mnt_mkbusy/chillax
[lunaix-os.git] / lunaix-os / kernel / fs / fsm.c
index 10e766ac229b098d87070cb64f7bd58f43473192..bce983a1c2b51d3c3743cf9edcdca9e2ef43780d 100644 (file)
@@ -11,6 +11,7 @@
 #include <klibc/string.h>
 #include <lunaix/ds/hashtable.h>
 #include <lunaix/fs.h>
 #include <klibc/string.h>
 #include <lunaix/ds/hashtable.h>
 #include <lunaix/fs.h>
+#include <lunaix/mm/valloc.h>
 
 #define HASH_BUCKET_BITS 4
 #define HASH_BUCKET_NUM (1 << HASH_BUCKET_BITS)
 
 #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_init()
 {
     hashtable_init(fs_registry);
+
+    fsm_register_all();
 }
 
 void
 }
 
 void
@@ -45,4 +48,12 @@ fsm_get(const char* fs_name)
     }
 
     return NULL;
     }
 
     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
 }
\ No newline at end of file