aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2009-10-08 22:54:41 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2009-10-08 22:54:41 +0200
commit6332151641f2c80c0ca57bd2f7dd11393619bc3a (patch)
treebb2dc0203ccf546f0f1e5ea3a61f5f76d8e6e068
parent784d095877ed64890700e51494badf17eca2bd82 (diff)
downloadbusybox-6332151641f2c80c0ca57bd2f7dd11393619bc3a.tar.gz
modprobe-small: added comment about multiple alias matches
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--modutils/modprobe-small.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/modutils/modprobe-small.c b/modutils/modprobe-small.c
index e2359d042..8ef9101e7 100644
--- a/modutils/modprobe-small.c
+++ b/modutils/modprobe-small.c
@@ -573,6 +573,14 @@ static void process_module(char *name, const char *cmdline_options)
info = find_alias(name);
}
+// Problem here: there can be more than one module
+// for the given alias. For example,
+// "pci:v00008086d00007010sv00000000sd00000000bc01sc01i80" matches
+// ata_piix because it has an alias "pci:v00008086d00007010sv*sd*bc*sc*i*"
+// and ata_generic, it has an alias "alias=pci:v*d*sv*sd*bc01sc01i*"
+// Standard modprobe would load them both.
+// In this code, find_alias() returns only the first matching module.
+
/* rmmod? unload it by name */
if (is_rmmod) {
if (delete_module(name, O_NONBLOCK | O_EXCL) != 0