From 56463e50d1fc3f070492434cea6303b35ea000de Mon Sep 17 00:00:00 2001 From: Chuck Lever Date: Fri, 17 Sep 2010 10:54:37 -0400 Subject: NFS: Use super.c for NFSROOT mount option parsing Replace duplicate code in NFSROOT for mounting an NFS server on '/' with logic that uses the existing mainline text-based logic in the NFS client. Add documenting comments where appropriate. Note that this means NFSROOT mounts now use the same default settings as v2/v3 mounts done via mount(2) from user space. vers=3,tcp,rsize=,wsize= As before, however, no version/protocol negotiation with the server is done. Signed-off-by: Chuck Lever Signed-off-by: Trond Myklebust --- init/do_mounts.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'init/do_mounts.c') diff --git a/init/do_mounts.c b/init/do_mounts.c index 02e3ca4fc52..52387f14f9b 100644 --- a/init/do_mounts.c +++ b/init/do_mounts.c @@ -291,13 +291,13 @@ out: #ifdef CONFIG_ROOT_NFS static int __init mount_nfs_root(void) { - void *data = nfs_root_data(); + char *root_dev, *root_data; - create_dev("/dev/root", ROOT_DEV); - if (data && - do_mount_root("/dev/root", "nfs", root_mountflags, data) == 0) - return 1; - return 0; + if (nfs_root_data(&root_dev, &root_data) != 0) + return 0; + if (do_mount_root(root_dev, "nfs", root_mountflags, root_data) != 0) + return 0; + return 1; } #endif -- cgit v1.2.3