patch-1.3.45 linux/fs/filesystems.c

Next file: linux/fs/isofs/file.c
Previous file: linux/fs/ext2/truncate.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.44/linux/fs/filesystems.c linux/fs/filesystems.c
@@ -26,8 +26,9 @@
 extern void device_setup(void);
 
 #ifdef CONFIG_ROOT_NFS
-extern int nfs_root_init(char *nfsname);
+extern int nfs_root_init(char *nfsname, char *nfsaddrs);
 extern char nfs_root_name [];
+extern char nfs_root_addrs [];
 #endif
 
 /* This may be used only once, enforced by 'static int callable' */
@@ -108,13 +109,14 @@
 #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");
+	if (ROOT_DEV == MKDEV(UNNAMED_MAJOR, 255)) {
+		if (nfs_root_init(nfs_root_name, nfs_root_addrs) < 0) {
+			printk(KERN_ERR "Root-NFS: Unable to contact NFS server for root fs, 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