mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrey Borzenkov <arvidjaar@mail.ru>
To: Rusty Russell <rusty@rustcorp.com.au>
Cc: linux-kernel@vger.kernel.org
Subject: module-init-tools and chained aliases
Date: Sun, 15 Jun 2003 13:52:36 +0400	[thread overview]
Message-ID: <200306151352.36226.arvidjaar@mail.ru> (raw)

Apparently modprobe from module-init-tools 0.9.11a does not support chained 
aliases like modutils did, i.e.

alias foo bar
alias bar baz

will result in error doing "modprobe foo" instead of loading "baz".

This is a real problem when converting modules.devfs, because customary

alias /dev/tts* /dev/tts
alias /dev/tts serial

simply does not work for accessing /dev/tts/*. modprobe.devfs as shipped with 
modue-init-tools has exactly the problem in parts.

It is possible to partially work around it by using

install foo /sbin/modprobe bar

consistently instead of alias but it means extra forks every time, besided it 
breaks parsing for many tools (initscripts or mkinitrd make heavy use of 
parsing sometimes, at least on Mandrake).

Is the behaviour intentional? Fixing it is just a one line patch and I fail to 
see why current state would be preferred.

regards

-andrey

--- modprobe.c.orig     2003-06-15 01:32:21.000000000 +0400
+++ modprobe.c  2003-06-15 13:46:25.000000000 +0400
@@ -1021,8 +1021,11 @@ static char *read_config(const char *fil

                        if (!wildcard || !realname)
                                grammar(cmd, filename, linenum);
-                       else if (fnmatch(wildcard,name,0) == 0)
-                               result = NOFAIL(strdup(realname));
+                       else if (fnmatch(wildcard,name,0) == 0) {
+                               if (result)
+                                       free(result);
+                               name = result = NOFAIL(strdup(realname));
+                       }
                } else if (strcmp(cmd, "include") == 0) {
                        char *newresult, *newfilename;



             reply	other threads:[~2003-06-15  9:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-06-15  9:52 Andrey Borzenkov [this message]
2003-06-16  0:04 ` 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=200306151352.36226.arvidjaar@mail.ru \
    --to=arvidjaar@mail.ru \
    --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®