aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2000-06-19 19:53:30 +0000
committerEric Andersen <andersen@codepoet.org>2000-06-19 19:53:30 +0000
commitbb245ba0c2238d6a6b19af151249cdb25afdca87 (patch)
tree2a5bd88b7fa760aa777bf88484d04f3b965410e8
parent9ca57d377e24df3332fa7fc50322baeba8d4b08f (diff)
downloadbusybox-w32-bb245ba0c2238d6a6b19af151249cdb25afdca87.tar.gz
busybox-w32-bb245ba0c2238d6a6b19af151249cdb25afdca87.tar.bz2
busybox-w32-bb245ba0c2238d6a6b19af151249cdb25afdca87.zip
Made insmod work with both libc5 and libc6.
-Erik
-rw-r--r--insmod.c9
-rw-r--r--modutils/insmod.c9
2 files changed, 12 insertions, 6 deletions
diff --git a/insmod.c b/insmod.c
index dfea51832..9a6bf0f63 100644
--- a/insmod.c
+++ b/insmod.c
@@ -40,6 +40,7 @@
40#include <assert.h> 40#include <assert.h>
41#include <sys/utsname.h> 41#include <sys/utsname.h>
42#include <sys/syscall.h> 42#include <sys/syscall.h>
43#include <linux/unistd.h>
43 44
44//---------------------------------------------------------------------------- 45//----------------------------------------------------------------------------
45//--------modutils module.h, lines 45-242 46//--------modutils module.h, lines 45-242
@@ -70,7 +71,7 @@
70#ifndef MODUTILS_MODULE_H 71#ifndef MODUTILS_MODULE_H
71#define MODUTILS_MODULE_H 1 72#define MODUTILS_MODULE_H 1
72 73
73#ident "$Id: insmod.c,v 1.8 2000/06/12 23:11:16 andersen Exp $" 74#ident "$Id: insmod.c,v 1.9 2000/06/19 19:53:30 andersen Exp $"
74 75
75/* This file contains the structures used by the 2.0 and 2.1 kernels. 76/* This file contains the structures used by the 2.0 and 2.1 kernels.
76 We do not use the kernel headers directly because we do not wish 77 We do not use the kernel headers directly because we do not wish
@@ -276,7 +277,7 @@ int delete_module(const char *);
276#ifndef MODUTILS_OBJ_H 277#ifndef MODUTILS_OBJ_H
277#define MODUTILS_OBJ_H 1 278#define MODUTILS_OBJ_H 1
278 279
279#ident "$Id: insmod.c,v 1.8 2000/06/12 23:11:16 andersen Exp $" 280#ident "$Id: insmod.c,v 1.9 2000/06/19 19:53:30 andersen Exp $"
280 281
281/* The relocatable object is manipulated using elfin types. */ 282/* The relocatable object is manipulated using elfin types. */
282 283
@@ -529,6 +530,8 @@ _syscall2(int, new_sys_init_module, const char *, name,
529_syscall5(int, old_sys_init_module, const char *, name, char *, code, 530_syscall5(int, old_sys_init_module, const char *, name, char *, code,
530 unsigned, codesize, struct old_mod_routines *, routines, 531 unsigned, codesize, struct old_mod_routines *, routines,
531 struct old_symbol_table *, symtab) 532 struct old_symbol_table *, symtab)
533_syscall5(int, query_module, const char *, name, int, which,
534 void *, buf, size_t, bufsize, size_t*, ret);
532#ifndef BB_RMMOD 535#ifndef BB_RMMOD
533_syscall1(int, delete_module, const char *, name) 536_syscall1(int, delete_module, const char *, name)
534#else 537#else
@@ -2875,5 +2878,5 @@ extern int insmod_main( int argc, char **argv)
2875 2878
2876out: 2879out:
2877 fclose(fp); 2880 fclose(fp);
2878 exit(exit_status); 2881 return(exit_status);
2879} 2882}
diff --git a/modutils/insmod.c b/modutils/insmod.c
index dfea51832..9a6bf0f63 100644
--- a/modutils/insmod.c
+++ b/modutils/insmod.c
@@ -40,6 +40,7 @@
40#include <assert.h> 40#include <assert.h>
41#include <sys/utsname.h> 41#include <sys/utsname.h>
42#include <sys/syscall.h> 42#include <sys/syscall.h>
43#include <linux/unistd.h>
43 44
44//---------------------------------------------------------------------------- 45//----------------------------------------------------------------------------
45//--------modutils module.h, lines 45-242 46//--------modutils module.h, lines 45-242
@@ -70,7 +71,7 @@
70#ifndef MODUTILS_MODULE_H 71#ifndef MODUTILS_MODULE_H
71#define MODUTILS_MODULE_H 1 72#define MODUTILS_MODULE_H 1
72 73
73#ident "$Id: insmod.c,v 1.8 2000/06/12 23:11:16 andersen Exp $" 74#ident "$Id: insmod.c,v 1.9 2000/06/19 19:53:30 andersen Exp $"
74 75
75/* This file contains the structures used by the 2.0 and 2.1 kernels. 76/* This file contains the structures used by the 2.0 and 2.1 kernels.
76 We do not use the kernel headers directly because we do not wish 77 We do not use the kernel headers directly because we do not wish
@@ -276,7 +277,7 @@ int delete_module(const char *);
276#ifndef MODUTILS_OBJ_H 277#ifndef MODUTILS_OBJ_H
277#define MODUTILS_OBJ_H 1 278#define MODUTILS_OBJ_H 1
278 279
279#ident "$Id: insmod.c,v 1.8 2000/06/12 23:11:16 andersen Exp $" 280#ident "$Id: insmod.c,v 1.9 2000/06/19 19:53:30 andersen Exp $"
280 281
281/* The relocatable object is manipulated using elfin types. */ 282/* The relocatable object is manipulated using elfin types. */
282 283
@@ -529,6 +530,8 @@ _syscall2(int, new_sys_init_module, const char *, name,
529_syscall5(int, old_sys_init_module, const char *, name, char *, code, 530_syscall5(int, old_sys_init_module, const char *, name, char *, code,
530 unsigned, codesize, struct old_mod_routines *, routines, 531 unsigned, codesize, struct old_mod_routines *, routines,
531 struct old_symbol_table *, symtab) 532 struct old_symbol_table *, symtab)
533_syscall5(int, query_module, const char *, name, int, which,
534 void *, buf, size_t, bufsize, size_t*, ret);
532#ifndef BB_RMMOD 535#ifndef BB_RMMOD
533_syscall1(int, delete_module, const char *, name) 536_syscall1(int, delete_module, const char *, name)
534#else 537#else
@@ -2875,5 +2878,5 @@ extern int insmod_main( int argc, char **argv)
2875 2878
2876out: 2879out:
2877 fclose(fp); 2880 fclose(fp);
2878 exit(exit_status); 2881 return(exit_status);
2879} 2882}