summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko2017-02-07 16:41:25 +0100
committerDenys Vlasenko2017-02-07 16:41:25 +0100
commitc2b18583a3df06aeecf535c3cea6856aa1f2e205 (patch)
tree15de075ca1b763bf6f4a47bf811950b5195683ec
parent415cc42b6aab3a3a90749354432e7d780840b1d8 (diff)
downloadbusybox-c2b18583a3df06aeecf535c3cea6856aa1f2e205.zip
busybox-c2b18583a3df06aeecf535c3cea6856aa1f2e205.tar.gz
modprobe_small: if only MODPROBE and DEPMOD are selected, no need to test for them
function old new delta modprobe_main 321 306 -15 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--modutils/modprobe-small.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/modutils/modprobe-small.c b/modutils/modprobe-small.c
index d6f4814..431b8ae 100644
--- a/modutils/modprobe-small.c
+++ b/modutils/modprobe-small.c
@@ -928,7 +928,9 @@ int modprobe_main(int argc UNUSED_PARAM, char **argv)
/* Prevent ugly corner cases with no modules at all */
modinfo = xzalloc(sizeof(modinfo[0]));
- if (is_depmod || is_modprobe) {
+ if ((MOD_APPLET_CNT == 2 && ENABLE_DEPMOD && ENABLE_MODPROBE)
+ || is_depmod || is_modprobe
+ ) {
/* Goto modules directory */
xchdir(CONFIG_DEFAULT_MODULES_DIR);
uname(&uts); /* never fails */