- twi_pile = cake_new_pile("twifs_node", sizeof(struct twifs_node), 1, 0);
-
- struct filesystem* twifs = vzalloc(sizeof(struct filesystem));
- twifs->fs_name = HSTR("twifs", 5);
- twifs->mount = __twifs_mount;
- twifs->types = FSTYPE_ROFS;
- twifs->fs_id = 0;
-
- fsm_register(twifs);
+ struct filesystem* fs;
+ fs = fsapi_fs_declare("twifs", FSTYPE_PSEUDO | FSTYPE_ROFS);
+
+ fsapi_fs_set_mntops(fs, __twifs_mount, __twifs_unmount);
+ fsapi_fs_finalise(fs);