/* * linux/fs/filesystems.c * * Copyright (C) 1991, 1992 Linus Torvalds * * table of configured filesystems */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #ifdef CONFIG_KERNELD #include #endif #include #include #include #include extern void device_setup(void); extern void binfmt_setup(void); extern void free_initmem(void); __initfunc(static void do_sys_setup(void)) { device_setup(); binfmt_setup(); #ifdef CONFIG_EXT2_FS init_ext2_fs(); #endif #ifdef CONFIG_MINIX_FS init_minix_fs(); #endif #ifdef CONFIG_ROMFS_FS init_romfs_fs(); #endif #ifdef CONFIG_UMSDOS_FS init_umsdos_fs(); #endif #ifdef CONFIG_FAT_FS init_fat_fs(); #endif #ifdef CONFIG_MSDOS_FS init_msdos_fs(); #endif #ifdef CONFIG_VFAT_FS init_vfat_fs(); #endif #ifdef CONFIG_PROC_FS init_proc_fs(); #endif #ifdef CONFIG_LOCKD nlmxdr_init(); #endif #ifdef CONFIG_NFS_FS init_nfs_fs(); #endif #ifdef CONFIG_SMB_FS init_smb_fs(); #endif #ifdef CONFIG_NCP_FS init_ncp_fs(); #endif #ifdef CONFIG_ISO9660_FS init_iso9660_fs(); #endif #ifdef CONFIG_SYSV_FS init_sysv_fs(); #endif #ifdef CONFIG_HPFS_FS init_hpfs_fs(); #endif #ifdef CONFIG_AFFS_FS init_affs_fs(); #endif #ifdef CONFIG_UFS_FS init_ufs_fs(); #endif #ifdef CONFIG_AUTOFS_FS init_autofs_fs(); #endif #ifdef CONFIG_EFS_FS init_efs_fs(); #endif #ifdef CONFIG_NLS init_nls(); #endif mount_root(); } int initmem_freed = 0; /* This may be used only twice, enforced by 'static int callable' */ asmlinkage int sys_setup(int magic) { static int callable = 1; int err = -1; lock_kernel(); if (magic) { if (!initmem_freed) { initmem_freed = 1; free_initmem (); err = 0; } } else if (callable) { callable = 0; do_sys_setup(); err = 0; } unlock_kernel(); return err; } #ifndef CONFIG_NFSD #ifdef CONFIG_NFSD_MODULE int (*do_nfsservctl)(int, void *, void *) = NULL; #endif int asmlinkage sys_nfsservctl(int cmd, void *argp, void *resp) { #ifndef CONFIG_NFSD_MODULE return -ENOSYS; #else int ret = -ENOSYS; lock_kernel(); if (do_nfsservctl) { ret = do_nfsservctl(cmd, argp, resp); goto out; } #ifdef CONFIG_KERNELD if (request_module ("nfsd") == 0) { if (do_nfsservctl) ret = do_nfsservctl(cmd, argp, resp); } #endif /* CONFIG_KERNELD */ out: unlock_kernel(); return ret; #endif /* CONFIG_NFSD_MODULE */ } #endif /* CONFIG_NFSD */