init.c 862 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. // SPDX-License-Identifier: GPL-2.0-or-later
  2. /*
  3. * Copyright 1997-1998 Transmeta Corporation -- All Rights Reserved
  4. */
  5. #include <linux/module.h>
  6. #include <linux/init.h>
  7. #include "autofs_i.h"
  8. struct file_system_type autofs_fs_type = {
  9. .owner = THIS_MODULE,
  10. .name = "autofs",
  11. .init_fs_context = autofs_init_fs_context,
  12. .parameters = autofs_param_specs,
  13. .kill_sb = autofs_kill_sb,
  14. };
  15. MODULE_ALIAS_FS("autofs");
  16. MODULE_ALIAS("autofs");
  17. static int __init init_autofs_fs(void)
  18. {
  19. int err;
  20. autofs_dev_ioctl_init();
  21. err = register_filesystem(&autofs_fs_type);
  22. if (err)
  23. autofs_dev_ioctl_exit();
  24. return err;
  25. }
  26. static void __exit exit_autofs_fs(void)
  27. {
  28. autofs_dev_ioctl_exit();
  29. unregister_filesystem(&autofs_fs_type);
  30. }
  31. module_init(init_autofs_fs)
  32. module_exit(exit_autofs_fs)
  33. MODULE_DESCRIPTION("Kernel automounter support");
  34. MODULE_LICENSE("GPL");