mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
To: Rusty Russell <rusty@rustcorp.com.au>
Cc: akpm@osdl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Module Alias back compat code
Date: Sat, 20 Dec 2003 01:16:45 +0900	[thread overview]
Message-ID: <87hdzwye8i.fsf@devron.myhome.or.jp> (raw)
In-Reply-To: <20031219031034.A38502C06C@lists.samba.org>

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>

  reply	other threads:[~2003-12-19 16:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-12-19  3:08 Rusty Russell
2003-12-19 16:16 ` OGAWA Hirofumi [this message]
2003-12-21 23:59   ` Rusty Russell

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=87hdzwye8i.fsf@devron.myhome.or.jp \
    --to=hirofumi@mail.parknet.co.jp \
    --cc=akpm@osdl.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

Powered by JetHome