Re: usb-snd-audio breakage

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Sep 25, 2005 at 10:43:11PM -0400, Jon Smirl wrote:
 > The Redhat FC4 installer is adds index=0 in modprobe.conf. The index
 > parameter appears to have been removed fron snd-usb-audio.
 > 
 > There are two issues:
 > 1) should index have been left as a non-functioning param so that
 > existing installs won't break.
 > 2) Why didn't I get a decent error message about index being the
 > problem instead of the message about `'

This patch really should have been merged for 2.6.13
but somehow fell through the cracks. I don't think it
even landed in -mm

		Dave



Name: Ignore trailing whitespace on kernel parameters correctly: Fixed version
Signed-off-by: Rusty Russell <[email protected]>

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;


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]
  Powered by Linux