Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: GPL-2.0-or-later
0002 /*
0003  * Copyright 1997-1998 Transmeta Corporation -- All Rights Reserved
0004  */
0005 
0006 #include <linux/module.h>
0007 #include <linux/init.h>
0008 #include "autofs_i.h"
0009 
0010 static struct dentry *autofs_mount(struct file_system_type *fs_type,
0011     int flags, const char *dev_name, void *data)
0012 {
0013     return mount_nodev(fs_type, flags, data, autofs_fill_super);
0014 }
0015 
0016 struct file_system_type autofs_fs_type = {
0017     .owner      = THIS_MODULE,
0018     .name       = "autofs",
0019     .mount      = autofs_mount,
0020     .kill_sb    = autofs_kill_sb,
0021 };
0022 MODULE_ALIAS_FS("autofs");
0023 MODULE_ALIAS("autofs");
0024 
0025 static int __init init_autofs_fs(void)
0026 {
0027     int err;
0028 
0029     autofs_dev_ioctl_init();
0030 
0031     err = register_filesystem(&autofs_fs_type);
0032     if (err)
0033         autofs_dev_ioctl_exit();
0034 
0035     return err;
0036 }
0037 
0038 static void __exit exit_autofs_fs(void)
0039 {
0040     autofs_dev_ioctl_exit();
0041     unregister_filesystem(&autofs_fs_type);
0042 }
0043 
0044 module_init(init_autofs_fs)
0045 module_exit(exit_autofs_fs)
0046 MODULE_LICENSE("GPL");