| 
									
										
										
										
											2005-04-16 15:20:36 -07:00
										 |  |  | /* -*- c -*- --------------------------------------------------------------- *
 | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * linux/fs/autofs/init.c | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  *  Copyright 1997-1998 Transmeta Corporation -- All Rights Reserved | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * This file is part of the Linux kernel and is made available under | 
					
						
							|  |  |  |  * the terms of the GNU General Public License, version 2, or at your | 
					
						
							|  |  |  |  * option, any later version, incorporated herein by reference. | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * ------------------------------------------------------------------------- */ | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #include <linux/module.h>
 | 
					
						
							|  |  |  | #include <linux/init.h>
 | 
					
						
							|  |  |  | #include "autofs_i.h"
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-07-25 11:46:36 +04:00
										 |  |  | static struct dentry *autofs_mount(struct file_system_type *fs_type, | 
					
						
							|  |  |  | 	int flags, const char *dev_name, void *data) | 
					
						
							| 
									
										
										
										
											2005-04-16 15:20:36 -07:00
										 |  |  | { | 
					
						
							| 
									
										
										
										
											2010-07-25 11:46:36 +04:00
										 |  |  | 	return mount_nodev(fs_type, flags, data, autofs4_fill_super); | 
					
						
							| 
									
										
										
										
											2005-04-16 15:20:36 -07:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | static struct file_system_type autofs_fs_type = { | 
					
						
							|  |  |  | 	.owner		= THIS_MODULE, | 
					
						
							|  |  |  | 	.name		= "autofs", | 
					
						
							| 
									
										
										
										
											2010-07-25 11:46:36 +04:00
										 |  |  | 	.mount		= autofs_mount, | 
					
						
							| 
									
										
										
										
											2006-10-11 01:22:15 -07:00
										 |  |  | 	.kill_sb	= autofs4_kill_sb, | 
					
						
							| 
									
										
										
										
											2005-04-16 15:20:36 -07:00
										 |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | static int __init init_autofs4_fs(void) | 
					
						
							|  |  |  | { | 
					
						
							| 
									
										
										
										
											2008-10-15 22:02:54 -07:00
										 |  |  | 	int err; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	err = register_filesystem(&autofs_fs_type); | 
					
						
							|  |  |  | 	if (err) | 
					
						
							|  |  |  | 		return err; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	autofs_dev_ioctl_init(); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	return err; | 
					
						
							| 
									
										
										
										
											2005-04-16 15:20:36 -07:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | static void __exit exit_autofs4_fs(void) | 
					
						
							|  |  |  | { | 
					
						
							| 
									
										
										
										
											2008-10-15 22:02:54 -07:00
										 |  |  | 	autofs_dev_ioctl_exit(); | 
					
						
							| 
									
										
										
										
											2005-04-16 15:20:36 -07:00
										 |  |  | 	unregister_filesystem(&autofs_fs_type); | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | module_init(init_autofs4_fs)  | 
					
						
							|  |  |  | module_exit(exit_autofs4_fs) | 
					
						
							|  |  |  | MODULE_LICENSE("GPL"); |