X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/e53ecb012ec4b2b87bb9ab35741241590b552a68..7f1f989a38d91dbcbf08cf93693cfe1531b58587:/package/busybox/patches/470-insmod_search.patch diff --git a/package/busybox/patches/470-insmod_search.patch b/package/busybox/patches/470-insmod_search.patch index 8d4b019c6..8f52d985f 100644 --- a/package/busybox/patches/470-insmod_search.patch +++ b/package/busybox/patches/470-insmod_search.patch @@ -4,11 +4,11 @@ #include "libbb.h" #include "modutils.h" ++#include +#ifndef CONFIG_FEATURE_2_4_MODULES +#include +#include +#include -+#include +#endif + +static char *g_filename = NULL; @@ -98,9 +98,9 @@ + return ret; +} - int insmod_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; - int insmod_main(int argc UNUSED_PARAM, char **argv) -@@ -25,9 +118,14 @@ int insmod_main(int argc UNUSED_PARAM, c + /* 2.6 style insmod has no options and required filename + * (not module name - .ko can't be omitted) */ +@@ -55,9 +148,15 @@ int insmod_main(int argc UNUSED_PARAM, c if (!filename) bb_show_usage(); @@ -111,9 +111,20 @@ + + rc = bb_init_module(g_filename, parse_cmdline_module_options(argv)); if (rc) - bb_error_msg("cannot insert '%s': %s", filename, moderror(rc)); -- + bb_error_msg("can't insert '%s': %s", filename, moderror(rc)); + free (g_filename); + +done: return rc; } +--- a/modutils/Config.src ++++ b/modutils/Config.src +@@ -228,7 +228,7 @@ config FEATURE_MODUTILS_SYMBOLS + config DEFAULT_MODULES_DIR + string "Default directory containing modules" + default "/lib/modules" +- depends on DEPMOD || MODPROBE || MODPROBE_SMALL || MODINFO ++ depends on DEPMOD || INSMOD || MODPROBE || MODPROBE_SMALL || MODINFO + help + Directory that contains kernel modules. + Defaults to "/lib/modules"