modprobe-small: added comment about multiple alias matches
authorDenys Vlasenko <vda.linux@googlemail.com>
Thu, 8 Oct 2009 20:54:41 +0000 (22:54 +0200)
committerDenys Vlasenko <vda.linux@googlemail.com>
Thu, 8 Oct 2009 20:54:41 +0000 (22:54 +0200)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
modutils/modprobe-small.c

index e2359d042259c16c31510dcf18685c85bf7509b2..8ef9101e76bd09d1bce670f72cb7f7d3468a7b4c 100644 (file)
@@ -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