summaryrefslogtreecommitdiff
path: root/modutils/modprobe.c
diff options
context:
space:
mode:
Diffstat (limited to 'modutils/modprobe.c')
-rw-r--r--modutils/modprobe.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/modutils/modprobe.c b/modutils/modprobe.c
index 218a898..0339ebb 100644
--- a/modutils/modprobe.c
+++ b/modutils/modprobe.c
@@ -109,7 +109,9 @@ static void add_probe(const char *name)
struct module_entry *m;
m = get_or_add_modentry(name);
- if (m->flags & MODULE_FLAG_LOADED) {
+ if (!(option_mask32 & MODPROBE_OPT_REMOVE)
+ && (m->flags & MODULE_FLAG_LOADED)
+ ) {
DBG("skipping %s, it is already loaded", name);
return;
}
@@ -339,7 +341,7 @@ int modprobe_main(int argc UNUSED_PARAM, char **argv)
config_close(parser);
}
- if (opt & MODPROBE_OPT_INSERT_ALL) {
+ if (opt & (MODPROBE_OPT_INSERT_ALL | MODPROBE_OPT_REMOVE)) {
/* Each argument is a module name */
do {
add_probe(*argv++);