summaryrefslogtreecommitdiffstats
path: root/meta/packages/busybox/busybox-1.01/rmmod.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/packages/busybox/busybox-1.01/rmmod.patch')
-rw-r--r--meta/packages/busybox/busybox-1.01/rmmod.patch44
1 files changed, 44 insertions, 0 deletions
diff --git a/meta/packages/busybox/busybox-1.01/rmmod.patch b/meta/packages/busybox/busybox-1.01/rmmod.patch
new file mode 100644
index 0000000000..5a557ef35d
--- /dev/null
+++ b/meta/packages/busybox/busybox-1.01/rmmod.patch
@@ -0,0 +1,44 @@
1Index: modutils/rmmod.c
2===================================================================
3RCS file: /var/cvs/busybox/modutils/rmmod.c,v
4retrieving revision 1.31
5diff -u -r1.31 rmmod.c
6--- busybox/modutils/rmmod.c 20 Jul 2004 18:36:51 -0000 1.31
7+++ busybox/modutils/rmmod.c 10 Dec 2004 22:56:36 -0000
8@@ -28,6 +28,7 @@
9 #include <fcntl.h>
10 #include <string.h>
11 #include <sys/syscall.h>
12+#include <sys/utsname.h>
13 #include "busybox.h"
14
15 #ifdef CONFIG_FEATURE_2_6_MODULES
16@@ -63,6 +64,16 @@
17 void *buf; /* hold the module names which we ignore but must get */
18 size_t bufsize = 0;
19 #endif
20+#ifdef CONFIG_FEATURE_2_6_MODULES
21+ int k_version = 0;
22+ struct utsname myuname;
23+
24+ if (uname(&myuname) == 0) {
25+ if (myuname.release[0] == '2') {
26+ k_version = myuname.release[2] - '0';
27+ }
28+ }
29+#endif
30
31 /* Parse command line. */
32 while ((n = getopt(argc, argv, "a")) != EOF) {
33@@ -109,7 +120,10 @@
34 for (n = optind; n < argc; n++) {
35 #ifdef CONFIG_FEATURE_2_6_MODULES
36 char module_name[strlen(argv[n]) + 1];
37- filename2modname(module_name, argv[n]);
38+ if (k_version != 4)
39+ filename2modname(module_name, argv[n]);
40+ else
41+ strcpy(module_name, argv[n]);
42 #else
43 #define module_name argv[n]
44 #endif