summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorAndrew Morton <akpm@osdl.org>2004-04-11 23:06:08 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2004-04-11 23:06:08 -0700
commit8e1aabbc236128b9e696ae61235b17165bb73ada (patch)
treeb48bf7220b0a0e7e0a6f1cddb97625f9a57e3a5c /kernel
parent7feebd5c337842ba67cbba5e2d9a74893e3b81cf (diff)
[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.
Diffstat (limited to 'kernel')
-rw-r--r--kernel/params.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/kernel/params.c b/kernel/params.c
index 4d9a71b743c5..59667bce9ce0 100644
--- a/kernel/params.c
+++ b/kernel/params.c
@@ -96,6 +96,13 @@ static char *next_arg(char *args, char **param, char **val)
else {
args[equals] = '\0';
*val = args + equals + 1;
+
+ /* Don't include quotes in value. */
+ if (**val == '"') {
+ (*val)++;
+ if (args[i-1] == '"')
+ args[i-1] = '\0';
+ }
}
if (args[i]) {