diff options
-rw-r--r-- | modutils/modprobe.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/modutils/modprobe.c b/modutils/modprobe.c index d57dbdf75..54cd84c6a 100644 --- a/modutils/modprobe.c +++ b/modutils/modprobe.c | |||
@@ -114,7 +114,9 @@ static void add_probe(const char *name) | |||
114 | struct module_entry *m; | 114 | struct module_entry *m; |
115 | 115 | ||
116 | m = get_or_add_modentry(name); | 116 | m = get_or_add_modentry(name); |
117 | if (m->flags & MODULE_FLAG_LOADED) { | 117 | if (!(option_mask32 & MODPROBE_OPT_REMOVE) |
118 | && (m->flags & MODULE_FLAG_LOADED) | ||
119 | ) { | ||
118 | DBG("skipping %s, it is already loaded", name); | 120 | DBG("skipping %s, it is already loaded", name); |
119 | return; | 121 | return; |
120 | } | 122 | } |
@@ -350,7 +352,7 @@ int modprobe_main(int argc UNUSED_PARAM, char **argv) | |||
350 | config_close(parser); | 352 | config_close(parser); |
351 | } | 353 | } |
352 | 354 | ||
353 | if (opt & MODPROBE_OPT_INSERT_ALL) { | 355 | if (opt & (MODPROBE_OPT_INSERT_ALL | MODPROBE_OPT_REMOVE)) { |
354 | /* Each argument is a module name */ | 356 | /* Each argument is a module name */ |
355 | do { | 357 | do { |
356 | DBG("adding module %s", *argv); | 358 | DBG("adding module %s", *argv); |