Commit 8e1aabbc authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] Strip quotes from kernel parameters

From: Rusty Russell <rusty@rustcorp.com.au>

Agustin Martin <agmartin@debian.org> pointed out that this doesn't work:

	options ide-mod options="ide=nodma hdc=cdrom"

The quotes are understood by kernel/params.c (ie.  it skips over spaces
inside them), but are not stripped before handing to the underlying
function.  They should be.
parent 7feebd5c
...@@ -96,6 +96,13 @@ static char *next_arg(char *args, char **param, char **val) ...@@ -96,6 +96,13 @@ static char *next_arg(char *args, char **param, char **val)
else { else {
args[equals] = '\0'; args[equals] = '\0';
*val = args + equals + 1; *val = args + equals + 1;
/* Don't include quotes in value. */
if (**val == '"') {
(*val)++;
if (args[i-1] == '"')
args[i-1] = '\0';
}
} }
if (args[i]) { if (args[i]) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment