<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">
From: "Randy.Dunlap" &lt;rddunlap@osdl.org&gt;

Fix module parameter quote handling.
Module parameter strings (with spaces) are quoted like so:
"modprm=this test"
and not like this:
modprm="this test"

Signed-off-by: Randy Dunlap &lt;rddunlap@osdl.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
---

 25-akpm/kernel/params.c |   15 ++++++++++++---
 1 files changed, 12 insertions(+), 3 deletions(-)

diff -puN kernel/params.c~handle-quoted-module-parameters kernel/params.c
--- 25/kernel/params.c~handle-quoted-module-parameters	2004-11-12 01:30:19.185010208 -0800
+++ 25-akpm/kernel/params.c	2004-11-12 01:30:19.189009600 -0800
@@ -77,10 +77,16 @@ static int parse_one(char *param,
 static char *next_arg(char *args, char **param, char **val)
 {
 	unsigned int i, equals = 0;
-	int in_quote = 0;
+	int in_quote = 0, quoted = 0;
+	char *next;
 
 	/* Chew any extra spaces */
 	while (*args == ' ') args++;
+	if (*args == '"') {
+		args++;
+		in_quote = 1;
+		quoted = 1;
+	}
 
 	for (i = 0; args[i]; i++) {
 		if (args[i] == ' ' &amp;&amp; !in_quote)
@@ -106,13 +112,16 @@ static char *next_arg(char *args, char *
 			if (args[i-1] == '"')
 				args[i-1] = '\0';
 		}
+		if (quoted &amp;&amp; args[i-1] == '"')
+			args[i-1] = '\0';
 	}
 
 	if (args[i]) {
 		args[i] = '\0';
-		return args + i + 1;
+		next = args + i + 1;
 	} else
-		return args + i;
+		next = args + i;
+	return next;
 }
 
 /* Args looks like "foo=bar,bar2 baz=fuz wiz". */
_
</pre></body></html>