Modules with rmmod are removed by name and it is not important if a module is in the default module's path or if the path exist, so it useless check if default path exist and require its existence.
Signed-off-by: Federico Vaga <[email protected]> --- modutils/modprobe-small.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modutils/modprobe-small.c b/modutils/modprobe-small.c index f5b283b..57b83c0 100644 --- a/modutils/modprobe-small.c +++ b/modutils/modprobe-small.c @@ -763,7 +763,7 @@ int modprobe_main(int argc UNUSED_PARAM, char **argv) /* Prevent ugly corner cases with no modules at all */ modinfo = xzalloc(sizeof(modinfo[0])); - if ('i' != applet0) { /* not insmod */ + if ('i' != applet0 && 'r' != applet0) { /* not insmod and not rmmod */ /* Goto modules directory */ xchdir(CONFIG_DEFAULT_MODULES_DIR); } @@ -813,7 +813,7 @@ int modprobe_main(int argc UNUSED_PARAM, char **argv) option_mask32 |= OPT_r; } - if ('i' != applet0) { /* not insmod */ + if ('i' != applet0 && 'r' != applet0) { /* not insmod and not rmmod*/ /* Goto $VERSION directory */ xchdir(uts.release); } -- 1.7.5.4 _______________________________________________ busybox mailing list [email protected] http://lists.busybox.net/mailman/listinfo/busybox
