aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2012-09-25 20:37:38 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2012-09-25 20:37:38 +0200
commit06a98e32ae930a4e332281b42b6bb769dcadc04e (patch)
treee90faeb33d9e0f3affa8766ba652f8a17779c344
parent0b4980c2527552594d4f540ebc6e6cfb398895b3 (diff)
downloadbusybox-w32-06a98e32ae930a4e332281b42b6bb769dcadc04e.tar.gz
busybox-w32-06a98e32ae930a4e332281b42b6bb769dcadc04e.tar.bz2
busybox-w32-06a98e32ae930a4e332281b42b6bb769dcadc04e.zip
modprobe_small: make rmmod to NOT remove dependencies. Closes 5162
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--modutils/modprobe-small.c11
1 files changed, 9 insertions, 2 deletions
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)
594 bb_perror_msg("remove '%s'", name); 594 bb_perror_msg("remove '%s'", name);
595 goto ret; 595 goto ret;
596 } 596 }
597 /* N.B. we do not stop here - 597
598 if (applet_name[0] == 'r') {
599 /* rmmod: do not remove dependencies, exit */
600 goto ret;
601 }
602
603 /* modprobe -r: we do not stop here -
598 * continue to unload modules on which the module depends: 604 * continue to unload modules on which the module depends:
599 * "-r --remove: option causes modprobe to remove a module. 605 * "-r --remove: option causes modprobe to remove a module.
600 * If the modules it depends on are also unused, modprobe 606 * If the modules it depends on are also unused, modprobe
601 * will try to remove them, too." */ 607 * will try to remove them, too."
608 */
602 } 609 }
603 610
604 if (!info) { 611 if (!info) {