aboutsummaryrefslogtreecommitdiff
path: root/kernel/params.c
diff options
context:
space:
mode:
authorJeff Garzik <jgarzik@pobox.com>2005-10-06 05:51:07 -0400
committerJeff Garzik <jgarzik@pobox.com>2005-10-06 05:51:07 -0400
commit012e060c95e547eceea4a12c6f58592473bf4011 (patch)
treeb57d3eafb50ce517577d2cf366c9ef0b4b286589 /kernel/params.c
parent923f122573851d18a3832ca808269fa2d5046fb1 (diff)
parented39f731ab2e77e58122232f6e27333331d7793d (diff)
Merge branch 'master'
Diffstat (limited to 'kernel/params.c')
-rw-r--r--kernel/params.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/kernel/params.c b/kernel/params.c
index fbf173215fd..1a8614bac5d 100644
--- a/kernel/params.c
+++ b/kernel/params.c
@@ -80,8 +80,6 @@ static char *next_arg(char *args, char **param, char **val)
int in_quote = 0, quoted = 0;
char *next;
- /* Chew any extra spaces */
- while (*args == ' ') args++;
if (*args == '"') {
args++;
in_quote = 1;
@@ -121,6 +119,10 @@ static char *next_arg(char *args, char **param, char **val)
next = args + i + 1;
} else
next = args + i;
+
+ /* Chew up trailing spaces. */
+ while (*next == ' ')
+ next++;
return next;
}
@@ -135,6 +137,10 @@ int parse_args(const char *name,
DEBUGP("Parsing ARGS: %s\n", args);
+ /* Chew leading spaces */
+ while (*args == ' ')
+ args++;
+
while (*args) {
int ret;