aboutsummaryrefslogtreecommitdiff
path: root/modutils
diff options
context:
space:
mode:
authorGravatar Eric Andersen <andersen@codepoet.org>2001-04-05 07:33:10 +0000
committerGravatar Eric Andersen <andersen@codepoet.org>2001-04-05 07:33:10 +0000
commit64c8b1762c269cd3d6d1bd58ba6cece39f4863cf (patch)
tree1b4ab2d9dd5c889953f911dc1e0ef0c478462b84 /modutils
parentacc7757312fe1a7a69448047d1dbea2ef1c31cde (diff)
downloadbusybox-64c8b1762c269cd3d6d1bd58ba6cece39f4863cf.tar.gz
busybox-64c8b1762c269cd3d6d1bd58ba6cece39f4863cf.tar.bz2
Another iteration -- adjust the init_module syscall a bit.
-Erik
Diffstat (limited to 'modutils')
-rw-r--r--modutils/insmod.c14
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 @@
#include <sys/utsname.h>
#include "busybox.h"
+#ifdef BB_FEATURE_NEW_MODULE_INTERFACE
+# define new_sys_init_module init_module
+#else
+# define old_sys_init_module init_module
+#endif
+
#if defined(__powerpc__)
#define BB_USE_PLT_ENTRIES
#define BB_PLT_ENTRY_SIZE 16
@@ -117,7 +123,7 @@
#ifndef MODUTILS_MODULE_H
static const int MODUTILS_MODULE_H = 1;
-#ident "$Id: insmod.c,v 1.56 2001/04/05 06:24:27 andersen Exp $"
+#ident "$Id: insmod.c,v 1.57 2001/04/05 07:33:10 andersen Exp $"
/* This file contains the structures used by the 2.0 and 2.1 kernels.
We do not use the kernel headers directly because we do not wish
@@ -267,7 +273,7 @@ static const int NEW_MOD_AUTOCLEAN = 4;
static const int NEW_MOD_VISITED = 8;
static const int NEW_MOD_USED_ONCE = 16;
-int init_module(const char *name, const struct new_module *);
+int new_sys_init_module(const char *name, const struct new_module *);
int query_module(const char *name, int which, void *buf, size_t bufsize,
size_t *ret);
@@ -323,7 +329,7 @@ int delete_module(const char *);
#ifndef MODUTILS_OBJ_H
static const int MODUTILS_OBJ_H = 1;
-#ident "$Id: insmod.c,v 1.56 2001/04/05 06:24:27 andersen Exp $"
+#ident "$Id: insmod.c,v 1.57 2001/04/05 07:33:10 andersen Exp $"
/* The relocatable object is manipulated using elfin types. */
@@ -2515,7 +2521,7 @@ new_init_module(const char *m_name, struct obj_file *f,
image = xmalloc(m_size);
obj_create_image(f, image);
- ret = init_module(m_name, (struct new_module *) image);
+ ret = new_sys_init_module(m_name, (struct new_module *) image);
if (ret)
perror_msg("init_module: %s", m_name);