diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2009-10-08 22:54:41 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2009-10-08 22:54:41 +0200 |
commit | 6332151641f2c80c0ca57bd2f7dd11393619bc3a (patch) | |
tree | bb2dc0203ccf546f0f1e5ea3a61f5f76d8e6e068 /modutils | |
parent | 784d095877ed64890700e51494badf17eca2bd82 (diff) | |
download | busybox-w32-6332151641f2c80c0ca57bd2f7dd11393619bc3a.tar.gz busybox-w32-6332151641f2c80c0ca57bd2f7dd11393619bc3a.tar.bz2 busybox-w32-6332151641f2c80c0ca57bd2f7dd11393619bc3a.zip |
modprobe-small: added comment about multiple alias matches
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'modutils')
-rw-r--r-- | modutils/modprobe-small.c | 8 |
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) | |||
573 | info = find_alias(name); | 573 | info = find_alias(name); |
574 | } | 574 | } |
575 | 575 | ||
576 | // Problem here: there can be more than one module | ||
577 | // for the given alias. For example, | ||
578 | // "pci:v00008086d00007010sv00000000sd00000000bc01sc01i80" matches | ||
579 | // ata_piix because it has an alias "pci:v00008086d00007010sv*sd*bc*sc*i*" | ||
580 | // and ata_generic, it has an alias "alias=pci:v*d*sv*sd*bc01sc01i*" | ||
581 | // Standard modprobe would load them both. | ||
582 | // In this code, find_alias() returns only the first matching module. | ||
583 | |||
576 | /* rmmod? unload it by name */ | 584 | /* rmmod? unload it by name */ |
577 | if (is_rmmod) { | 585 | if (is_rmmod) { |
578 | if (delete_module(name, O_NONBLOCK | O_EXCL) != 0 | 586 | if (delete_module(name, O_NONBLOCK | O_EXCL) != 0 |