init.c 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /* -*- c -*- --------------------------------------------------------------- *
  2. *
  3. * linux/fs/autofs/init.c
  4. *
  5. * Copyright 1997-1998 Transmeta Corporation -- All Rights Reserved
  6. *
  7. * This file is part of the Linux kernel and is made available under
  8. * the terms of the GNU General Public License, version 2, or at your
  9. * option, any later version, incorporated herein by reference.
  10. *
  11. * ------------------------------------------------------------------------- */
  12. #include <linux/module.h>
  13. #include <linux/init.h>
  14. #include "autofs_i.h"
  15. static int autofs_get_sb(struct file_system_type *fs_type,
  16. int flags, const char *dev_name, void *data, struct vfsmount *mnt)
  17. {
  18. return get_sb_nodev(fs_type, flags, data, autofs4_fill_super, mnt);
  19. }
  20. static struct file_system_type autofs_fs_type = {
  21. .owner = THIS_MODULE,
  22. .name = "autofs",
  23. .get_sb = autofs_get_sb,
  24. .kill_sb = autofs4_kill_sb,
  25. };
  26. static int __init init_autofs4_fs(void)
  27. {
  28. return register_filesystem(&autofs_fs_type);
  29. }
  30. static void __exit exit_autofs4_fs(void)
  31. {
  32. unregister_filesystem(&autofs_fs_type);
  33. }
  34. module_init(init_autofs4_fs)
  35. module_exit(exit_autofs4_fs)
  36. MODULE_LICENSE("GPL");