diff options
author | Phil Blundell <philb@gnu.org> | 2004-12-10 23:03:26 +0000 |
---|---|---|
committer | Phil Blundell <philb@gnu.org> | 2004-12-10 23:03:26 +0000 |
commit | 672b2c4f445ca8d0a575c0d612baf0e31c2a46b2 (patch) | |
tree | 5edaa583fef693520ce93f7b9b7e624bfc27c051 /packages/busybox/busybox-1.00 | |
parent | 0d5585941f7b870f5f5690c40ab2517754798e57 (diff) |
this time, the correct patch
BKrev: 41ba2b3eeQbWoHYn-h0EKSELO9c0Eg
Diffstat (limited to 'packages/busybox/busybox-1.00')
-rw-r--r-- | packages/busybox/busybox-1.00/rmmod.patch | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/packages/busybox/busybox-1.00/rmmod.patch b/packages/busybox/busybox-1.00/rmmod.patch index e69de29bb2..5a557ef35d 100644 --- a/packages/busybox/busybox-1.00/rmmod.patch +++ b/packages/busybox/busybox-1.00/rmmod.patch @@ -0,0 +1,44 @@ +Index: modutils/rmmod.c +=================================================================== +RCS file: /var/cvs/busybox/modutils/rmmod.c,v +retrieving revision 1.31 +diff -u -r1.31 rmmod.c +--- busybox/modutils/rmmod.c 20 Jul 2004 18:36:51 -0000 1.31 ++++ busybox/modutils/rmmod.c 10 Dec 2004 22:56:36 -0000 +@@ -28,6 +28,7 @@ + #include <fcntl.h> + #include <string.h> + #include <sys/syscall.h> ++#include <sys/utsname.h> + #include "busybox.h" + + #ifdef CONFIG_FEATURE_2_6_MODULES +@@ -63,6 +64,16 @@ + void *buf; /* hold the module names which we ignore but must get */ + size_t bufsize = 0; + #endif ++#ifdef CONFIG_FEATURE_2_6_MODULES ++ int k_version = 0; ++ struct utsname myuname; ++ ++ if (uname(&myuname) == 0) { ++ if (myuname.release[0] == '2') { ++ k_version = myuname.release[2] - '0'; ++ } ++ } ++#endif + + /* Parse command line. */ + while ((n = getopt(argc, argv, "a")) != EOF) { +@@ -109,7 +120,10 @@ + for (n = optind; n < argc; n++) { + #ifdef CONFIG_FEATURE_2_6_MODULES + char module_name[strlen(argv[n]) + 1]; +- filename2modname(module_name, argv[n]); ++ if (k_version != 4) ++ filename2modname(module_name, argv[n]); ++ else ++ strcpy(module_name, argv[n]); + #else + #define module_name argv[n] + #endif |