diff options
author | c4llv07e <igor@c4llv07e.xyz> | 2025-05-06 18:24:57 +0300 |
---|---|---|
committer | c4llv07e <igor@c4llv07e.xyz> | 2025-05-06 18:24:57 +0300 |
commit | a6e6702727d2fdba6e921db16feb703a859687c8 (patch) | |
tree | 9ea84973b65cf7adc4819665bc47740c4274b9ea | |
parent | 352bea70e563ecfb2034f09faf03a43102c0dbf7 (diff) | |
download | etcfs-a6e6702727d2fdba6e921db16feb703a859687c8.tar.gz etcfs-a6e6702727d2fdba6e921db16feb703a859687c8.tar.bz2 etcfs-a6e6702727d2fdba6e921db16feb703a859687c8.zip |
Experimenting with VFS
-rw-r--r-- | etcfs.c | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -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; } |