init.c 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /*
  2. * Copyright 1997-1998 Transmeta Corporation -- All Rights Reserved
  3. *
  4. * This file is part of the Linux kernel and is made available under
  5. * the terms of the GNU General Public License, version 2, or at your
  6. * option, any later version, incorporated herein by reference.
  7. */
  8. #include <linux/module.h>
  9. #include <linux/init.h>
  10. #include "autofs_i.h"
  11. static struct dentry *autofs_mount(struct file_system_type *fs_type,
  12. int flags, const char *dev_name, void *data)
  13. {
  14. return mount_nodev(fs_type, flags, data, autofs_fill_super);
  15. }
  16. static struct file_system_type autofs_fs_type = {
  17. .owner = THIS_MODULE,
  18. .name = "autofs",
  19. .mount = autofs_mount,
  20. .kill_sb = autofs_kill_sb,
  21. };
  22. MODULE_ALIAS_FS("autofs");
  23. MODULE_ALIAS("autofs");
  24. static int __init init_autofs_fs(void)
  25. {
  26. int err;
  27. autofs_dev_ioctl_init();
  28. err = register_filesystem(&autofs_fs_type);
  29. if (err)
  30. autofs_dev_ioctl_exit();
  31. return err;
  32. }
  33. static void __exit exit_autofs_fs(void)
  34. {
  35. autofs_dev_ioctl_exit();
  36. unregister_filesystem(&autofs_fs_type);
  37. }
  38. module_init(init_autofs_fs)
  39. module_exit(exit_autofs_fs)
  40. MODULE_LICENSE("GPL");