summaryrefslogtreecommitdiff
path: root/etcfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'etcfs.c')
-rw-r--r--etcfs.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/etcfs.c b/etcfs.c
index c88040e..82e7220 100644
--- a/etcfs.c
+++ b/etcfs.c
@@ -1,10 +1,21 @@
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/fs.h>
+#include <linux/fs_context.h>
+
+static struct fs_context_operations etcfs_context_ops = {
+};
+
+static int etcfs_init_fs_context(struct fs_context *fc) {
+ int err;
+ fc->ops = &etcfs_context_ops;
+ return 0;
+}
static struct file_system_type etc_fs_type = {
.name = "etcfs",
.f_flasgs = FS_USERNS_MOUNT,
+ .init_fs_context = etcfs_init_fs_context,
};
static int __init etcfs_init(void) {
@@ -17,6 +28,11 @@ static int __init etcfs_init(void) {
}
static int __exit etcfs_exit(void) {
+ int err;
+ err = unregister_filesystem(etcfs);
+ if (err) {
+ return err;
+ }
return 0;
}