On Sun, Jan 11, 2015 at 7:23 AM, Isaac Dunham <[email protected]> wrote: > filename2modname needs to do dir-stripping,
Well, it was doing that.
Which lead to "modprobe dir/dir/dir/file"
work as if it was "modprobe file", and bug reports
from users.
So it was removed. Simply reinstating it would make
_that_ bug to reappear.
Looks like we need dir-stripping somewhere else,
in a less generic code path. Looks like adding it here
should do the trick:
/* rmmod or modprobe -r? unload module(s) */
if (is_rmmod) {
infoidx = 0;
while ((info = infovec[infoidx++]) != NULL) {
int r;
char modname[MODULE_NAME_LEN];
filename2modname(
bb_get_last_path_component_nostrip(info->pathname), modname);
r = delete_module(modname, O_NONBLOCK | O_EXCL);
dbg1_error_msg("delete_module('%s', O_NONBLOCK
| O_EXCL):%d", modname, r);
if (r != 0) {
if (!(option_mask32 & OPT_q))
bb_perror_msg("remove '%s'", modname);
goto ret;
}
Please try attached patch.
6.patch
Description: Binary data
_______________________________________________ busybox mailing list [email protected] http://lists.busybox.net/mailman/listinfo/busybox
