All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rusty Russell <rusty@rustcorp.com.au>
To: 240886@bugs.debian.org
Cc: Bartlomiej Zolnierkiewicz <B.Zolnierkiewicz@elka.pw.edu.pl>,
	Andrew Morton <akpm@osdl.org>,
	lkml - Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: Bug#240886: module-init-tools: modprobe pass wrong ide options to insmod
Date: Wed, 31 Mar 2004 11:14:20 +1000	[thread overview]
Message-ID: <1080695659.11048.152.camel@bach> (raw)
In-Reply-To: <20040330162503.GA7730@wonderland.linux.it>

On Wed, 2004-03-31 at 02:25, Marco d'Itri wrote:
...
> modprobe -v -k ide-mod options="ide=nodma hdc=cdrom"
> 
> resulting in
> 
>  insmod the_module "options=ide=nodma hdc=cdrom"
> 
> will not work. 

There are two problems here: one is in modprobe, but the real problem is
that putting:

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

will be handed to ide-mod as:

	"ide=nodma hdc=cdrom"

ie. with the quotes intact.  It doesn't handle that, and probably
shouldn't.

Name: Fix Quote Handling in Parameters
Status: Tested on 2.6.5-rc3

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.

diff -urpN --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal .7471-linux-2.6.5-rc3/kernel/params.c .7471-linux-2.6.5-rc3.updated/kernel/params.c
--- .7471-linux-2.6.5-rc3/kernel/params.c	2003-10-09 18:03:02.000000000 +1000
+++ .7471-linux-2.6.5-rc3.updated/kernel/params.c	2004-03-31 11:02:44.000000000 +1000
@@ -96,6 +96,13 @@ static char *next_arg(char *args, char *
 	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]) {

-- 
Anyone who quotes me in their signature is an idiot -- Rusty Russell


           reply	other threads:[~2004-03-31  1:14 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <20040330162503.GA7730@wonderland.linux.it>]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1080695659.11048.152.camel@bach \
    --to=rusty@rustcorp.com.au \
    --cc=240886@bugs.debian.org \
    --cc=B.Zolnierkiewicz@elka.pw.edu.pl \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.