root/fs/filesystems.c

/* [previous][next][first][last][top][bottom][index][help] */

DEFINITIONS

This source file includes following definitions.
  1. sys_setup

   1 /*
   2  *  linux/fs/filesystems.c
   3  *
   4  *  Copyright (C) 1991, 1992  Linus Torvalds
   5  *
   6  *  table of configured filesystems
   7  */
   8 
   9 #include <linux/config.h>
  10 #include <linux/fs.h>
  11 
  12 #include <linux/minix_fs.h>
  13 #include <linux/ext_fs.h>
  14 #include <linux/ext2_fs.h>
  15 #include <linux/xia_fs.h>
  16 #include <linux/msdos_fs.h>
  17 #include <linux/umsdos_fs.h>
  18 #include <linux/proc_fs.h>
  19 #include <linux/nfs_fs.h>
  20 #include <linux/iso_fs.h>
  21 #include <linux/sysv_fs.h>
  22 #include <linux/hpfs_fs.h>
  23 #include <linux/smb_fs.h>
  24 #include <linux/major.h>
  25 
  26 extern void device_setup(void);
  27 
  28 #ifdef CONFIG_ROOT_NFS
  29 extern int nfs_root_init(char *nfsname, char *nfsaddrs);
  30 extern char nfs_root_name [];
  31 extern char nfs_root_addrs [];
  32 #endif
  33 
  34 /* This may be used only once, enforced by 'static int callable' */
  35 asmlinkage int sys_setup(void)
     /* [previous][next][first][last][top][bottom][index][help] */
  36 {
  37         static int callable = 1;
  38 
  39         if (!callable)
  40                 return -1;
  41         callable = 0;
  42 
  43         device_setup();
  44 
  45 #ifdef CONFIG_EXT_FS
  46         register_filesystem(&(struct file_system_type)
  47                 {ext_read_super, "ext", 1, NULL});
  48 #endif
  49 
  50 #ifdef CONFIG_EXT2_FS
  51         register_filesystem(&(struct file_system_type)
  52                 {ext2_read_super, "ext2", 1, NULL});
  53 #endif
  54 
  55 #ifdef CONFIG_XIA_FS
  56         register_filesystem(&(struct file_system_type)
  57                 {xiafs_read_super, "xiafs", 1, NULL});
  58 #endif
  59 
  60 #ifdef CONFIG_MINIX_FS
  61         register_filesystem(&(struct file_system_type)
  62                 {minix_read_super, "minix", 1, NULL});
  63 #endif
  64 
  65 #ifdef CONFIG_UMSDOS_FS
  66         register_filesystem(&(struct file_system_type)
  67         {UMSDOS_read_super,     "umsdos",       1, NULL});
  68 #endif
  69 
  70 #ifdef CONFIG_MSDOS_FS
  71         register_filesystem(&(struct file_system_type)
  72                 {msdos_read_super, "msdos", 1, NULL});
  73 #endif
  74 
  75 #ifdef CONFIG_PROC_FS
  76         register_filesystem(&(struct file_system_type)
  77                 {proc_read_super, "proc", 0, NULL});
  78 #endif
  79 
  80 #ifdef CONFIG_NFS_FS
  81         register_filesystem(&(struct file_system_type)
  82                 {nfs_read_super, "nfs", 0, NULL});
  83 #endif
  84 
  85 #ifdef CONFIG_SMB_FS
  86         register_filesystem(&(struct file_system_type)
  87                 {smb_read_super, "smbfs", 0, NULL});
  88 #endif
  89 
  90 #ifdef CONFIG_ISO9660_FS
  91         register_filesystem(&(struct file_system_type)
  92                 {isofs_read_super, "iso9660", 1, NULL});
  93 #endif
  94 
  95 #ifdef CONFIG_SYSV_FS
  96         register_filesystem(&(struct file_system_type)
  97                 {sysv_read_super, "xenix", 1, NULL});
  98 
  99         register_filesystem(&(struct file_system_type)
 100                 {sysv_read_super, "sysv", 1, NULL});
 101 
 102         register_filesystem(&(struct file_system_type)
 103                 {sysv_read_super, "coherent", 1, NULL});
 104 #endif
 105 
 106 #ifdef CONFIG_HPFS_FS
 107         register_filesystem(&(struct file_system_type)
 108                 {hpfs_read_super, "hpfs", 1, NULL});
 109 #endif
 110 
 111 #ifdef CONFIG_ROOT_NFS
 112         if (ROOT_DEV == MKDEV(UNNAMED_MAJOR, 255)) {
 113                 if (nfs_root_init(nfs_root_name, nfs_root_addrs) < 0) {
 114                         printk(KERN_ERR "Root-NFS: Unable to contact NFS server for root fs, using /dev/fd0 instead\n");
 115                         ROOT_DEV = MKDEV(FLOPPY_MAJOR, 0);
 116                 }
 117         }
 118 #endif
 119 
 120         mount_root();
 121         return 0;
 122 }

/* [previous][next][first][last][top][bottom][index][help] */