summaryrefslogtreecommitdiff
path: root/modutils
diff options
context:
space:
mode:
authorDenys Vlasenko2012-09-25 20:37:38 +0200
committerDenys Vlasenko2012-09-25 20:37:38 +0200
commit06a98e32ae930a4e332281b42b6bb769dcadc04e (patch)
treee90faeb33d9e0f3affa8766ba652f8a17779c344 /modutils
parent0b4980c2527552594d4f540ebc6e6cfb398895b3 (diff)
downloadbusybox-06a98e32ae930a4e332281b42b6bb769dcadc04e.zip
busybox-06a98e32ae930a4e332281b42b6bb769dcadc04e.tar.gz
modprobe_small: make rmmod to NOT remove dependencies. Closes 5162
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'modutils')
-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 bd855f6..5b78363 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) {