1/*
2 * Copyright 2016, NICTA
3 *
4 * This software may be distributed and modified according to the terms of
5 * the GNU General Public License version 2. Note that NO WARRANTY is provided.
6 * See "LICENSE_GPLv2.txt" for details.
7 *
8 * @TAG(NICTA_GPL)
9 */
10
11#include <plat/linux/wrapper_pp_inferred.c>
12
13static struct dentry *skelfs_mount(struct file_system_type *fs_type, int flags,
14                                   const char *dev_name, void *data)
15{
16        return mount_bdev(fs_type, flags, dev_name, data, skelfs_fill_super);
17}
18
19static void kill_skelfs_super(struct super_block *sb)
20{
21        /* TODO: implement filesystem specific super block tear-down here. */
22        kill_block_super(sb);
23}
24
25static struct file_system_type skelfs_fs_type = {
26        .owner    = THIS_MODULE,
27        .name     = "cogent-skelfs",
28        .mount    = skelfs_mount,
29        .kill_sb  = kill_skelfs_super,
30        .fs_flags = FS_REQUIRES_DEV
31};
32
33static int __init init_skel_fs(void)
34{
35        int err = 0;
36
37        printk(KERN_INFO "Registering SKEL-FS!\n");
38
39        /* TODO: Implement filesystem specific init functions here. */
40        err = register_filesystem(&skelfs_fs_type);
41
42        return err;
43}
44
45
46static void __exit exit_skel_fs(void)
47{
48        printk(KERN_INFO "Un-Registering SKEL-FS!\n");
49
50        /* TODO: Implement filesystem specific tear-down functions here. */
51        unregister_filesystem(&skelfs_fs_type);
52}
53
54
55module_init(init_skel_fs)
56module_exit(exit_skel_fs)
57
58MODULE_AUTHOR("Data61 TFS Team");
59MODULE_DESCRIPTION("Sekeleton FS implementation in Cogent");
60MODULE_LICENSE("GPL");
61