diff options
Diffstat (limited to 'modutils')
-rw-r--r-- | modutils/insmod.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/modutils/insmod.c b/modutils/insmod.c index abd639c6b..f1798ad09 100644 --- a/modutils/insmod.c +++ b/modutils/insmod.c | |||
@@ -62,6 +62,12 @@ | |||
62 | #include <sys/utsname.h> | 62 | #include <sys/utsname.h> |
63 | #include "busybox.h" | 63 | #include "busybox.h" |
64 | 64 | ||
65 | #ifdef BB_FEATURE_NEW_MODULE_INTERFACE | ||
66 | # define new_sys_init_module init_module | ||
67 | #else | ||
68 | # define old_sys_init_module init_module | ||
69 | #endif | ||
70 | |||
65 | #if defined(__powerpc__) | 71 | #if defined(__powerpc__) |
66 | #define BB_USE_PLT_ENTRIES | 72 | #define BB_USE_PLT_ENTRIES |
67 | #define BB_PLT_ENTRY_SIZE 16 | 73 | #define BB_PLT_ENTRY_SIZE 16 |
@@ -117,7 +123,7 @@ | |||
117 | #ifndef MODUTILS_MODULE_H | 123 | #ifndef MODUTILS_MODULE_H |
118 | static const int MODUTILS_MODULE_H = 1; | 124 | static const int MODUTILS_MODULE_H = 1; |
119 | 125 | ||
120 | #ident "$Id: insmod.c,v 1.56 2001/04/05 06:24:27 andersen Exp $" | 126 | #ident "$Id: insmod.c,v 1.57 2001/04/05 07:33:10 andersen Exp $" |
121 | 127 | ||
122 | /* This file contains the structures used by the 2.0 and 2.1 kernels. | 128 | /* 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 | 129 | We do not use the kernel headers directly because we do not wish |
@@ -267,7 +273,7 @@ static const int NEW_MOD_AUTOCLEAN = 4; | |||
267 | static const int NEW_MOD_VISITED = 8; | 273 | static const int NEW_MOD_VISITED = 8; |
268 | static const int NEW_MOD_USED_ONCE = 16; | 274 | static const int NEW_MOD_USED_ONCE = 16; |
269 | 275 | ||
270 | int init_module(const char *name, const struct new_module *); | 276 | int new_sys_init_module(const char *name, const struct new_module *); |
271 | int query_module(const char *name, int which, void *buf, size_t bufsize, | 277 | int query_module(const char *name, int which, void *buf, size_t bufsize, |
272 | size_t *ret); | 278 | size_t *ret); |
273 | 279 | ||
@@ -323,7 +329,7 @@ int delete_module(const char *); | |||
323 | #ifndef MODUTILS_OBJ_H | 329 | #ifndef MODUTILS_OBJ_H |
324 | static const int MODUTILS_OBJ_H = 1; | 330 | static const int MODUTILS_OBJ_H = 1; |
325 | 331 | ||
326 | #ident "$Id: insmod.c,v 1.56 2001/04/05 06:24:27 andersen Exp $" | 332 | #ident "$Id: insmod.c,v 1.57 2001/04/05 07:33:10 andersen Exp $" |
327 | 333 | ||
328 | /* The relocatable object is manipulated using elfin types. */ | 334 | /* The relocatable object is manipulated using elfin types. */ |
329 | 335 | ||
@@ -2515,7 +2521,7 @@ new_init_module(const char *m_name, struct obj_file *f, | |||
2515 | image = xmalloc(m_size); | 2521 | image = xmalloc(m_size); |
2516 | obj_create_image(f, image); | 2522 | obj_create_image(f, image); |
2517 | 2523 | ||
2518 | ret = init_module(m_name, (struct new_module *) image); | 2524 | ret = new_sys_init_module(m_name, (struct new_module *) image); |
2519 | if (ret) | 2525 | if (ret) |
2520 | perror_msg("init_module: %s", m_name); | 2526 | perror_msg("init_module: %s", m_name); |
2521 | 2527 | ||