modprobe-small: fix and simplify rmmod
authorDenys Vlasenko <vda.linux@googlemail.com>
Sat, 7 Feb 2015 19:44:46 +0000 (20:44 +0100)
committerDenys Vlasenko <vda.linux@googlemail.com>
Sat, 7 Feb 2015 19:44:46 +0000 (20:44 +0100)
commit68c048fb23bd8b0831bbd02ec66900b12390cf19
treec0180ca96c35db0779232b028b316f40b4ae2d15
parent782ee2aa0e1646aebc96c8590ddc0a16405b8297
modprobe-small: fix and simplify rmmod

"rmmod OUT_OF_TREE_MODULE" was not working, because module is not in depmod file.

In general, rmmod doesn't need scanning, it simply unloads every argv[i].

function                                             old     new   delta
rmmod                                                  -      63     +63
modprobe_main                                        449     465     +16
process_module                                       705     667     -38
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 1/1 up/down: 79/-38)             Total: 41 bytes

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