mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Thayumanavar Sachithanantham" <thayumk@gmail.com>
To: "Greg KH" <greg@kroah.com>
Cc: "Rusty Russell" <rusty@rustcorp.com.au>,
	kay.sievers@vrfy.org, linux-kernel@vger.kernel.org
Subject: Re: modprobe bug for aliases with regular expressions
Date: Fri, 14 Apr 2006 10:47:02 +0530	[thread overview]
Message-ID: <3b8510d80604132217h4f889b4dved183444559cc3ba@mail.gmail.com> (raw)
In-Reply-To: <20060413233518.GA7597@kroah.com>

On 4/14/06, Greg KH <greg@kroah.com> wrote:
> Recently it's been pointed out to me that the modprobe functionality
> with aliases doesn't quite work properly for some USB modules.
> Specifically, the usb-storage driver has a lot of aliases with regular
> expressions for the bcd ranges.  Here's an example of it failing with a
> real device:
>
> $ modprobe -n -v --first-time usb:v054Cp0010d0410dc00dsc00dp00ic08iscFFip01
> FATAL: Module usb:v054Cp0010d0410dc00dsc00dp00ic08iscFFip01 not found.
>
> yet if we change the bcd range by replacing the first 0 with a 1 it
> somehow works:
>
> $ modprobe -n -v --first-time usb:v054Cp0010d0400dc00dsc00dp00ic08iscFFip01
> insmod /lib/modules/2.6.17-rc1-gkh/kernel/drivers/usb/storage/libusual.ko
>
> (yet this isn't a solution as the device does not have a 1 in that
> position...)

      It's because in modprobe.c, in the read_config_file , in the
wildcard , the "-" (hyphen) is turned into underscore (_) causing the
fnmatch not to match the first RE.
  a quick change to check this issue is
following change in read_config_file function of modprobe.c should fix it.
                if (strcmp(cmd, "alias") == 0) {
                        char *wildcard
                                = strsep_skipspace(&ptr, "\t ");
                        char *realname
                                = strsep_skipspace(&ptr, "\t ");


S.Thayumanavar

      parent reply	other threads:[~2006-04-14  5:17 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-13 23:35 Greg KH
2006-04-14  4:59 ` Rusty Russell
2006-04-14 16:19   ` Greg KH
2006-04-14  5:17 ` Thayumanavar Sachithanantham [this message]

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=3b8510d80604132217h4f889b4dved183444559cc3ba@mail.gmail.com \
    --to=thayumk@gmail.com \
    --cc=greg@kroah.com \
    --cc=kay.sievers@vrfy.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rusty@rustcorp.com.au \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®