diff options
Diffstat (limited to 'modutils/modprobe-small.c')
-rw-r--r-- | modutils/modprobe-small.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/modutils/modprobe-small.c b/modutils/modprobe-small.c index 75b36f748..21fa9dbdd 100644 --- a/modutils/modprobe-small.c +++ b/modutils/modprobe-small.c | |||
@@ -59,7 +59,12 @@ | |||
59 | #define DEPFILE_BB CONFIG_DEFAULT_DEPMOD_FILE".bb" | 59 | #define DEPFILE_BB CONFIG_DEFAULT_DEPMOD_FILE".bb" |
60 | 60 | ||
61 | #define MOD_APPLET_CNT (ENABLE_MODPROBE + ENABLE_DEPMOD + ENABLE_INSMOD + ENABLE_LSMOD + ENABLE_RMMOD) | 61 | #define MOD_APPLET_CNT (ENABLE_MODPROBE + ENABLE_DEPMOD + ENABLE_INSMOD + ENABLE_LSMOD + ENABLE_RMMOD) |
62 | #define ONLY_APPLET (MOD_APPLET_CNT <= 1) | 62 | |
63 | /* Do not bother if MODPROBE_SMALL=y but no applets selected. */ | ||
64 | /* The rest of the file is in this if block. */ | ||
65 | #if MOD_APPLET_CNT > 0 | ||
66 | |||
67 | #define ONLY_APPLET (MOD_APPLET_CNT == 1) | ||
63 | #define is_modprobe (ENABLE_MODPROBE && (ONLY_APPLET || applet_name[0] == 'm')) | 68 | #define is_modprobe (ENABLE_MODPROBE && (ONLY_APPLET || applet_name[0] == 'm')) |
64 | #define is_depmod (ENABLE_DEPMOD && (ONLY_APPLET || applet_name[0] == 'd')) | 69 | #define is_depmod (ENABLE_DEPMOD && (ONLY_APPLET || applet_name[0] == 'd')) |
65 | #define is_insmod (ENABLE_INSMOD && (ONLY_APPLET || applet_name[0] == 'i')) | 70 | #define is_insmod (ENABLE_INSMOD && (ONLY_APPLET || applet_name[0] == 'i')) |
@@ -1063,3 +1068,5 @@ int modprobe_main(int argc UNUSED_PARAM, char **argv) | |||
1063 | return exitcode; | 1068 | return exitcode; |
1064 | #endif /* MODPROBE || INSMOD || RMMOD */ | 1069 | #endif /* MODPROBE || INSMOD || RMMOD */ |
1065 | } | 1070 | } |
1071 | |||
1072 | #endif /* MOD_APPLET_CNT > 0 */ | ||