From: Denys Vlasenko Date: Tue, 25 Sep 2012 18:37:38 +0000 (+0200) Subject: modprobe_small: make rmmod to NOT remove dependencies. Closes 5162 X-Git-Tag: 1_21_0~68 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=06a98e32ae930a4e332281b42b6bb769dcadc04e;p=oweals%2Fbusybox.git modprobe_small: make rmmod to NOT remove dependencies. Closes 5162 Signed-off-by: Denys Vlasenko --- diff --git a/modutils/modprobe-small.c b/modutils/modprobe-small.c index bd855f628..5b7836344 100644 --- a/modutils/modprobe-small.c +++ b/modutils/modprobe-small.c @@ -594,11 +594,18 @@ static void process_module(char *name, const char *cmdline_options) bb_perror_msg("remove '%s'", name); goto ret; } - /* N.B. we do not stop here - + + if (applet_name[0] == 'r') { + /* rmmod: do not remove dependencies, exit */ + goto ret; + } + + /* modprobe -r: we do not stop here - * continue to unload modules on which the module depends: * "-r --remove: option causes modprobe to remove a module. * If the modules it depends on are also unused, modprobe - * will try to remove them, too." */ + * will try to remove them, too." + */ } if (!info) {