From e7b54d0fcce26fdbb0559728e317fb852c63e02b Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Mon, 9 Jan 2017 16:31:21 +0100 Subject: make_single_applets.sh: show errors and warnings While at it, fix one warning in modprobe-small.c Signed-off-by: Denys Vlasenko --- modutils/modprobe-small.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'modutils/modprobe-small.c') 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 @@ #define DEPFILE_BB CONFIG_DEFAULT_DEPMOD_FILE".bb" #define MOD_APPLET_CNT (ENABLE_MODPROBE + ENABLE_DEPMOD + ENABLE_INSMOD + ENABLE_LSMOD + ENABLE_RMMOD) -#define ONLY_APPLET (MOD_APPLET_CNT <= 1) + +/* Do not bother if MODPROBE_SMALL=y but no applets selected. */ +/* The rest of the file is in this if block. */ +#if MOD_APPLET_CNT > 0 + +#define ONLY_APPLET (MOD_APPLET_CNT == 1) #define is_modprobe (ENABLE_MODPROBE && (ONLY_APPLET || applet_name[0] == 'm')) #define is_depmod (ENABLE_DEPMOD && (ONLY_APPLET || applet_name[0] == 'd')) #define is_insmod (ENABLE_INSMOD && (ONLY_APPLET || applet_name[0] == 'i')) @@ -1063,3 +1068,5 @@ int modprobe_main(int argc UNUSED_PARAM, char **argv) return exitcode; #endif /* MODPROBE || INSMOD || RMMOD */ } + +#endif /* MOD_APPLET_CNT > 0 */ -- cgit v1.2.3