diff options
author | Philippe De Swert <philippe.deswert@jollamobile.com> | 2015-10-07 18:36:58 +0300 |
---|---|---|
committer | Lucas De Marchi <lucas.demarchi@intel.com> | 2015-10-25 13:57:17 -0200 |
commit | 2b2a503e4ff02b385ff6de9741a6b6afae910f11 (patch) | |
tree | 8e91e4a96b63e328d620feef4edb234cf2f0f9fd /tools | |
parent | f7f28510244e22c3676cea40f55dbed6338005f3 (diff) | |
download | kmod-2b2a503e4ff02b385ff6de9741a6b6afae910f11.tar.gz kmod-2b2a503e4ff02b385ff6de9741a6b6afae910f11.tar.bz2 kmod-2b2a503e4ff02b385ff6de9741a6b6afae910f11.zip |
insmod: do support -f
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>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/insmod.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/insmod.c b/tools/insmod.c index 8e72e11..045fd2c 100644 --- a/tools/insmod.c +++ b/tools/insmod.c @@ -71,6 +71,7 @@ static int do_insmod(int argc, char *argv[]) size_t optslen = 0; int i, err; const char *null_config = NULL; + unsigned int flags = 0; for (;;) { int c, idx = 0; @@ -81,7 +82,8 @@ static int do_insmod(int argc, char *argv[]) case 'p': case 's': case 'f': - /* ignored, for compatibility only */ + flags |= KMOD_PROBE_FORCE_MODVERSION; + flags |= KMOD_PROBE_FORCE_VERMAGIC; break; case 'h': help(); @@ -142,7 +144,7 @@ static int do_insmod(int argc, char *argv[]) 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)); |