The -f switch is accepted by insmod, but silently ignored. This
causes the user to wonder why things don't work. As insmod is
most often used with "evil" modules, -f is almost default and
thus needs to work.
Signed-off-by: Philippe De Swert <philippe.deswert@jollamobile.com>
size_t optslen = 0;
int i, err;
const char *null_config = NULL;
+ unsigned int flags = 0;
for (;;) {
int c, idx = 0;
case 'p':
case 's':
case 'f':
- /* ignored, for compatibility only */
+ flags |= KMOD_PROBE_FORCE_MODVERSION;
+ flags |= KMOD_PROBE_FORCE_VERMAGIC;
break;
case 'h':
help();
goto end;
}
- err = kmod_module_insert_module(mod, 0, opts);
+ err = kmod_module_insert_module(mod, flags, opts);
if (err < 0) {
ERR("could not insert module %s: %s\n", filename,
mod_strerror(-err));