lkml.org 
[lkml]   [2006]   [Apr]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: modprobe bug for aliases with regular expressions
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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-04-14 07:22    [W:0.041 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site