summaryrefslogtreecommitdiff
path: root/etcfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'etcfs.c')
-rw-r--r--etcfs.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/etcfs.c b/etcfs.c
new file mode 100644
index 0000000..c88040e
--- /dev/null
+++ b/etcfs.c
@@ -0,0 +1,28 @@
+#include <linux/module.h>
+#include <linux/kernel.h>
+#include <linux/fs.h>
+
+static struct file_system_type etc_fs_type = {
+ .name = "etcfs",
+ .f_flasgs = FS_USERNS_MOUNT,
+};
+
+static int __init etcfs_init(void) {
+ int err;
+ err = register_filesystem(etcfs);
+ if (err) {
+ return err;
+ }
+ return 0;
+}
+
+static int __exit etcfs_exit(void) {
+ return 0;
+}
+
+module_init(etcfs_init);
+module_exit(etcfs_exit);
+
+MODULE_LICENSE("GPL");
+MODULE_AUTHOR("c4llv07e <igor@c4llv07e.xyz>");
+MODULE_DESCRIPTION("Read-only preconfigured etc filesystem");