diff mbox

NFS: Fix handling of commmand line options for NFSROOT

Message ID 1299771798-29285-1-git-send-email-broonie@opensource.wolfsonmicro.com (mailing list archive)
State Superseded, archived
Headers show

Commit Message

Mark Brown March 10, 2011, 3:43 p.m. UTC
None
diff mbox

Patch

diff --git a/fs/nfs/nfsroot.c b/fs/nfs/nfsroot.c
index 0bc654f..309df59 100644
--- a/fs/nfs/nfsroot.c
+++ b/fs/nfs/nfsroot.c
@@ -193,10 +193,15 @@  static int __init root_nfs_parse_options(char *incoming, char *exppath,
 	 * @incoming now points to the rest of the string; if it
 	 * contains something, append it to our root options buffer
 	 */
-	if (incoming != NULL && *incoming != '\0')
+	if (incoming != NULL && *incoming != '\0') {
+		if (nfs_root_options[0] != '\0' &&
+		    root_nfs_cat(nfs_root_options, ",",
+						sizeof(nfs_root_options)))
+			return -1;
 		if (root_nfs_cat(nfs_root_options, incoming,
 						sizeof(nfs_root_options)))
 			return -1;
+	}
 
 	/*
 	 * Possibly prepare for more options to be appended