modprobe-small: move lsmod code out of modprobe_main()
authorKang-Che Sung <explorer09@gmail.com>
Tue, 31 Jan 2017 09:06:43 +0000 (17:06 +0800)
committerDenys Vlasenko <vda.linux@googlemail.com>
Wed, 1 Feb 2017 00:33:37 +0000 (01:33 +0100)
commitfdfd716a858f6f63289b1156a80d06d7e86947de
treeee18761f141e343e01f5527d8937feb37a4d2d97
parentdc7637d0aa0efeb7cc8a7bcd798f0b5679251ad9
modprobe-small: move lsmod code out of modprobe_main()

Having lsmod code inside modprobe_main() makes some of the applet name
checking code awkward. Besides, this make busybox x86_64 binary a few
bytes smaller. :)

function                                  old     new   delta
lsmod_main                                  -      23     +23
modprobe_main                             599     564     -35
-------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 0/1 up/down: 23/-35) Total: -12 bytes

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