modprobe-small: (un)load all modules which match the alias, not only first one
authorDenys Vlasenko <vda.linux@googlemail.com>
Mon, 21 Apr 2014 14:59:36 +0000 (16:59 +0200)
committerDenys Vlasenko <vda.linux@googlemail.com>
Mon, 21 Apr 2014 14:59:36 +0000 (16:59 +0200)
commit07e5555a8f7469f6f45cacd7fc188816ae644f74
tree3a7d88959d5ed5d0ed5ab74922e1c16a18b2a35b
parent5a21c8550ef9ed9cfcc4abed7d59e58017a306e5
modprobe-small: (un)load all modules which match the alias, not only first one

Closes 627 and 7034.

Commonly seen case is (un)loading of an alias
which matches ata_generic and a more specific ata module.

For example:

modprobe [-r] pci:v00008086d00007010sv00000000sd00000000bc01sc01i80
(ata_generic and pata_acpi)

modprobe [-r] pci:v00001106d00000571sv00001509sd00009022bc01sc01i8a
(ata_generic and pata_via)

function                                             old     new   delta
process_module                                       615     728    +113
parse_module                                         309     395     +86
find_alias                                           621     653     +32
pathname_matches_modname                              78      79      +1
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 4/0 up/down: 232/0)             Total: 232 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
modutils/modprobe-small.c