diff options
author | Eric Andersen <andersen@codepoet.org> | 2001-04-05 06:24:28 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2001-04-05 06:24:28 +0000 |
commit | acc7757312fe1a7a69448047d1dbea2ef1c31cde (patch) | |
tree | 7cfedf980c887571183922c5d54bfb5c24661ed7 | |
parent | a2a978ae23e267c24eb7b11662afdcc9ea47e789 (diff) | |
download | busybox-w32-acc7757312fe1a7a69448047d1dbea2ef1c31cde.tar.gz busybox-w32-acc7757312fe1a7a69448047d1dbea2ef1c31cde.tar.bz2 busybox-w32-acc7757312fe1a7a69448047d1dbea2ef1c31cde.zip |
*** empty log message ***
-rw-r--r-- | insmod.c | 8 | ||||
-rw-r--r-- | libbb/module_syscalls.c | 30 | ||||
-rw-r--r-- | modutils/insmod.c | 8 |
3 files changed, 35 insertions, 11 deletions
@@ -117,7 +117,7 @@ | |||
117 | #ifndef MODUTILS_MODULE_H | 117 | #ifndef MODUTILS_MODULE_H |
118 | static const int MODUTILS_MODULE_H = 1; | 118 | static const int MODUTILS_MODULE_H = 1; |
119 | 119 | ||
120 | #ident "$Id: insmod.c,v 1.55 2001/04/05 06:08:14 andersen Exp $" | 120 | #ident "$Id: insmod.c,v 1.56 2001/04/05 06:24:27 andersen Exp $" |
121 | 121 | ||
122 | /* This file contains the structures used by the 2.0 and 2.1 kernels. | 122 | /* This file contains the structures used by the 2.0 and 2.1 kernels. |
123 | We do not use the kernel headers directly because we do not wish | 123 | We do not use the kernel headers directly because we do not wish |
@@ -267,7 +267,7 @@ static const int NEW_MOD_AUTOCLEAN = 4; | |||
267 | static const int NEW_MOD_VISITED = 8; | 267 | static const int NEW_MOD_VISITED = 8; |
268 | static const int NEW_MOD_USED_ONCE = 16; | 268 | static const int NEW_MOD_USED_ONCE = 16; |
269 | 269 | ||
270 | int new_sys_init_module(const char *name, const struct new_module *); | 270 | int init_module(const char *name, const struct new_module *); |
271 | int query_module(const char *name, int which, void *buf, size_t bufsize, | 271 | int query_module(const char *name, int which, void *buf, size_t bufsize, |
272 | size_t *ret); | 272 | size_t *ret); |
273 | 273 | ||
@@ -323,7 +323,7 @@ int delete_module(const char *); | |||
323 | #ifndef MODUTILS_OBJ_H | 323 | #ifndef MODUTILS_OBJ_H |
324 | static const int MODUTILS_OBJ_H = 1; | 324 | static const int MODUTILS_OBJ_H = 1; |
325 | 325 | ||
326 | #ident "$Id: insmod.c,v 1.55 2001/04/05 06:08:14 andersen Exp $" | 326 | #ident "$Id: insmod.c,v 1.56 2001/04/05 06:24:27 andersen Exp $" |
327 | 327 | ||
328 | /* The relocatable object is manipulated using elfin types. */ | 328 | /* The relocatable object is manipulated using elfin types. */ |
329 | 329 | ||
@@ -2515,7 +2515,7 @@ new_init_module(const char *m_name, struct obj_file *f, | |||
2515 | image = xmalloc(m_size); | 2515 | image = xmalloc(m_size); |
2516 | obj_create_image(f, image); | 2516 | obj_create_image(f, image); |
2517 | 2517 | ||
2518 | ret = new_sys_init_module(m_name, (struct new_module *) image); | 2518 | ret = init_module(m_name, (struct new_module *) image); |
2519 | if (ret) | 2519 | if (ret) |
2520 | perror_msg("init_module: %s", m_name); | 2520 | perror_msg("init_module: %s", m_name); |
2521 | 2521 | ||
diff --git a/libbb/module_syscalls.c b/libbb/module_syscalls.c index d0c1a36d4..87662ff21 100644 --- a/libbb/module_syscalls.c +++ b/libbb/module_syscalls.c | |||
@@ -31,9 +31,33 @@ | |||
31 | #include <asm/unistd.h> | 31 | #include <asm/unistd.h> |
32 | #include "libbb.h" | 32 | #include "libbb.h" |
33 | 33 | ||
34 | #define __NR_new_sys_init_module __NR_init_module | 34 | |
35 | _syscall2(int, new_sys_init_module, const char *, name, | 35 | struct old_module_ref |
36 | const struct new_module *, info); | 36 | { |
37 | unsigned long module; /* kernel addresses */ | ||
38 | unsigned long next; | ||
39 | }; | ||
40 | |||
41 | struct old_module_symbol | ||
42 | { | ||
43 | unsigned long addr; | ||
44 | unsigned long name; | ||
45 | }; | ||
46 | |||
47 | struct old_symbol_table | ||
48 | { | ||
49 | int size; /* total, including string table!!! */ | ||
50 | int n_symbols; | ||
51 | int n_refs; | ||
52 | struct old_module_symbol symbol[0]; /* actual size defined by n_symbols */ | ||
53 | struct old_module_ref ref[0]; /* actual size defined by n_refs */ | ||
54 | }; | ||
55 | |||
56 | struct old_mod_routines | ||
57 | { | ||
58 | unsigned long init; | ||
59 | unsigned long cleanup; | ||
60 | }; | ||
37 | 61 | ||
38 | #define __NR_old_sys_init_module __NR_init_module | 62 | #define __NR_old_sys_init_module __NR_init_module |
39 | _syscall5(int, old_sys_init_module, const char *, name, char *, code, | 63 | _syscall5(int, old_sys_init_module, const char *, name, char *, code, |
diff --git a/modutils/insmod.c b/modutils/insmod.c index c2ebd2e24..abd639c6b 100644 --- a/modutils/insmod.c +++ b/modutils/insmod.c | |||
@@ -117,7 +117,7 @@ | |||
117 | #ifndef MODUTILS_MODULE_H | 117 | #ifndef MODUTILS_MODULE_H |
118 | static const int MODUTILS_MODULE_H = 1; | 118 | static const int MODUTILS_MODULE_H = 1; |
119 | 119 | ||
120 | #ident "$Id: insmod.c,v 1.55 2001/04/05 06:08:14 andersen Exp $" | 120 | #ident "$Id: insmod.c,v 1.56 2001/04/05 06:24:27 andersen Exp $" |
121 | 121 | ||
122 | /* This file contains the structures used by the 2.0 and 2.1 kernels. | 122 | /* This file contains the structures used by the 2.0 and 2.1 kernels. |
123 | We do not use the kernel headers directly because we do not wish | 123 | We do not use the kernel headers directly because we do not wish |
@@ -267,7 +267,7 @@ static const int NEW_MOD_AUTOCLEAN = 4; | |||
267 | static const int NEW_MOD_VISITED = 8; | 267 | static const int NEW_MOD_VISITED = 8; |
268 | static const int NEW_MOD_USED_ONCE = 16; | 268 | static const int NEW_MOD_USED_ONCE = 16; |
269 | 269 | ||
270 | int new_sys_init_module(const char *name, const struct new_module *); | 270 | int init_module(const char *name, const struct new_module *); |
271 | int query_module(const char *name, int which, void *buf, size_t bufsize, | 271 | int query_module(const char *name, int which, void *buf, size_t bufsize, |
272 | size_t *ret); | 272 | size_t *ret); |
273 | 273 | ||
@@ -323,7 +323,7 @@ int delete_module(const char *); | |||
323 | #ifndef MODUTILS_OBJ_H | 323 | #ifndef MODUTILS_OBJ_H |
324 | static const int MODUTILS_OBJ_H = 1; | 324 | static const int MODUTILS_OBJ_H = 1; |
325 | 325 | ||
326 | #ident "$Id: insmod.c,v 1.55 2001/04/05 06:08:14 andersen Exp $" | 326 | #ident "$Id: insmod.c,v 1.56 2001/04/05 06:24:27 andersen Exp $" |
327 | 327 | ||
328 | /* The relocatable object is manipulated using elfin types. */ | 328 | /* The relocatable object is manipulated using elfin types. */ |
329 | 329 | ||
@@ -2515,7 +2515,7 @@ new_init_module(const char *m_name, struct obj_file *f, | |||
2515 | image = xmalloc(m_size); | 2515 | image = xmalloc(m_size); |
2516 | obj_create_image(f, image); | 2516 | obj_create_image(f, image); |
2517 | 2517 | ||
2518 | ret = new_sys_init_module(m_name, (struct new_module *) image); | 2518 | ret = init_module(m_name, (struct new_module *) image); |
2519 | if (ret) | 2519 | if (ret) |
2520 | perror_msg("init_module: %s", m_name); | 2520 | perror_msg("init_module: %s", m_name); |
2521 | 2521 | ||