lkml.org 
[lkml]   [2003]   [Dec]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
SubjectRe: [PATCH] Module Alias back compat code
From
Date
Rusty Russell <rusty@rustcorp.com.au> writes:

> The provides backwards compat for old char and block aliases.
>
> MODULE_ALIAS_BLOCK() and MODULE_ALIAS_CHAR() define aliases of form
> "XXX-<major>-<minor>", so we should probe for modules using this
> form. Unfortunately in 2.4, block aliases were "XXX-<major>" and
> char aliases were of both forms.
>
> Ideally, all modules would now be using MODULE_ALIAS() macros to
> define their aliases, and the old configuration files wouldn't
> matter as much. Unfortunately, this hasn't happened, so we make
> request_module() return the exit status of modprobe, and then
> do fallback when probing for char and block devices.

Umm.. Although I may be mis-understanding this problem, is the following
scripts the not enough?

This does

block-major-1 -> block-major-1-*


--- generate-modprobe.conf.orig 2003-08-12 05:03:59.000000000 +0900
+++ generate-modprobe.conf 2003-12-20 00:31:17.000000000 +0900
@@ -59,8 +59,9 @@
parse_alias()
{
PA_ALIAS=`resolve_alias $1 $3`
+ NAME=`echo $2|sed -e 's/\(block\|char\)-major-\([0-9]\+\)$/\1-major-\2-*/'`

- echo "alias $2 $PA_ALIAS"
+ echo "alias $NAME $PA_ALIAS"
}

# Parse options: args modulename aliasto.
--
OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
-
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: 2005-03-22 13:59    [W:0.036 / U:0.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site