Index: busybox-1.7.2/modutils/insmod.c
===================================================================
Index: busybox-1.7.2/modutils/insmod.c
===================================================================
---- busybox-1.7.2.orig/modutils/insmod.c 2007-10-05 14:39:19.922555340 +0200
-+++ busybox-1.7.2/modutils/insmod.c 2007-10-05 21:08:55.442650322 +0200
-@@ -61,19 +61,107 @@
+--- busybox-1.7.2.orig/modutils/insmod.c 2007-10-08 22:22:17.132454529 +0200
++++ busybox-1.7.2/modutils/insmod.c 2007-10-08 22:29:04.267655851 +0200
+@@ -61,19 +61,110 @@
+ check_module_name_match, 0, filename, 0);
+
+ /* Check if we have a complete path */
+ check_module_name_match, 0, filename, 0);
+
+ /* Check if we have a complete path */
-+ if (g_filename != NULL) {
-+ if ((stat(g_filename, &st) == 0) && S_ISREG(st.st_mode))
-+ ret = 0;
-+ else
-+ free(g_filename);
-+ }
++ if (g_filename == NULL)
++ goto done;
++
++ if ((stat(g_filename, &st) == 0) && S_ISREG(st.st_mode))
++ ret = 0;
++ else
++ free(g_filename);
++
++done:
enum { STRVERSIONLEN = 64 };
/*======================================================================*/
enum { STRVERSIONLEN = 64 };
/*======================================================================*/
-#if ENABLE_FEATURE_2_6_MODULES
- if (k_version > 4 && len > 3 && tmp[len - 3] == '.'
- && tmp[len - 2] == 'k' && tmp[len - 1] == 'o'
-#if ENABLE_FEATURE_2_6_MODULES
- if (k_version > 4 && len > 3 && tmp[len - 3] == '.'
- && tmp[len - 2] == 'k' && tmp[len - 1] == 'o'
-#if ENABLE_FEATURE_2_6_MODULES
- if (k_version > 4)
- m_fullName = xasprintf("%s.ko", tmp);
-#if ENABLE_FEATURE_2_6_MODULES
- if (k_version > 4)
- m_fullName = xasprintf("%s.ko", tmp);
"\t%s was compiled for kernel version %s\n"
"\twhile this kernel is version %s",
flag_force_load ? "warning: " : "",
"\t%s was compiled for kernel version %s\n"
"\twhile this kernel is version %s",
flag_force_load ? "warning: " : "",
optlen += sprintf(options + optlen, (strchr(*argv,' ') ? "\"%s\" " : "%s "), *argv);
}
optlen += sprintf(options + optlen, (strchr(*argv,' ') ? "\"%s\" " : "%s "), *argv);
}
+#if ENABLE_FEATURE_2_6_MODULES
+ ret = insmod_main_26(argc, argv);
+ if (ret != ENOTSUP)
+#if ENABLE_FEATURE_2_6_MODULES
+ ret = insmod_main_26(argc, argv);
+ if (ret != ENOTSUP)