patch-1.3.42 linux/fs/filesystems.c

Next file: linux/fs/inode.c
Previous file: linux/fs/file_table.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.41/linux/fs/filesystems.c linux/fs/filesystems.c
@@ -21,9 +21,15 @@
 #include <linux/sysv_fs.h>
 #include <linux/hpfs_fs.h>
 #include <linux/smb_fs.h>
+#include <linux/major.h>
 
 extern void device_setup(void);
 
+#ifdef CONFIG_ROOT_NFS
+extern int nfs_root_init(char *nfsname);
+extern char nfs_root_name [];
+#endif
+
 /* This may be used only once, enforced by 'static int callable' */
 asmlinkage int sys_setup(void)
 {
@@ -100,6 +106,14 @@
 		{hpfs_read_super, "hpfs", 1, NULL});
 #endif
 
+#ifdef CONFIG_ROOT_NFS
+	if (nfs_root_name [0]){
+		if (nfs_root_init(nfs_root_name) < 0) {
+			printk(KERN_ERR "Root-NFS: Unable to mount NFS filesystem as /, using /dev/fd0 instead\n");
+			ROOT_DEV = MKDEV(FLOPPY_MAJOR, 0);
+		}
+	}
+#endif
 	mount_root();
 	return 0;
 }

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov with Sam's (original) version
of this