Name: Ignore trailing whitespace on kernel parameters correctly: Fixed version Signed-off-by: Rusty Russell Dave Jones says: ... if the modprobe.conf has trailing whitespace, modules fail to load with the following helpful message.. snd_intel8x0: Unknown parameter `' Previous version truncated last argument. Index: linux-2.6.13-rc6-git7-Module/kernel/params.c =================================================================== --- linux-2.6.13-rc6-git7-Module.orig/kernel/params.c 2005-08-10 16:12:45.000000000 +1000 +++ linux-2.6.13-rc6-git7-Module/kernel/params.c 2005-08-16 14:31:16.000000000 +1000 @@ -80,8 +80,6 @@ int in_quote = 0, quoted = 0; char *next; - /* Chew any extra spaces */ - while (*args == ' ') args++; if (*args == '"') { args++; in_quote = 1; @@ -121,6 +119,9 @@ next = args + i + 1; } else next = args + i; + + /* Chew up trailing spaces. */ + while (*next == ' ') next++; return next; } @@ -134,6 +135,9 @@ char *param, *val; DEBUGP("Parsing ARGS: %s\n", args); + + /* Chew leading spaces */ + while (*args == ' ') args++; while (*args) { int ret;