lkml.org 
[lkml]   [2003]   [Jun]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subjectmodule-init-tools and chained aliases
Date
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;

-
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:36    [W:0.026 / U:2.652 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site