diff options
-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 |