|
|
@@ -0,0 +1,24 @@
|
|
|
+#include <linux/module.h>
|
|
|
+#include <linux/kernel.h>
|
|
|
+
|
|
|
+#include "src/butterfly.h"
|
|
|
+
|
|
|
+static struct file_system_type butterfly_fs = {
|
|
|
+ .owner = THIS_MODULE,
|
|
|
+ .name = "butterflyfs",
|
|
|
+ .fs_flags = FS_REQUIRES_DEV,
|
|
|
+
|
|
|
+ .mount = butterfly_mount,
|
|
|
+ .kill_sb = butterfly_unmount
|
|
|
+};
|
|
|
+
|
|
|
+int init_module()
|
|
|
+{
|
|
|
+ return register_filesystem(&butterfly_fs);
|
|
|
+}
|
|
|
+
|
|
|
+void cleanup_module()
|
|
|
+{
|
|
|
+ unregister_filesystem(&butterfly_fs);
|
|
|
+}
|
|
|
+
|