aboutsummaryrefslogtreecommitdiff
path: root/modutils
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2001-01-24 23:34:48 +0000
committerEric Andersen <andersen@codepoet.org>2001-01-24 23:34:48 +0000
commitf5d5e77321ad32b3952dcdf21d14fd0ef3d4c1a9 (patch)
treebc91a3dbedbdfc52a5ade52815d241d2f1100082 /modutils
parent26439a2991f81b52c93b1e81d16f328f359a6611 (diff)
downloadbusybox-w32-f5d5e77321ad32b3952dcdf21d14fd0ef3d4c1a9.tar.gz
busybox-w32-f5d5e77321ad32b3952dcdf21d14fd0ef3d4c1a9.tar.bz2
busybox-w32-f5d5e77321ad32b3952dcdf21d14fd0ef3d4c1a9.zip
more bugs fixed -- found doing regression testing
-Erik
Diffstat (limited to 'modutils')
-rw-r--r--modutils/insmod.c22
-rw-r--r--modutils/lsmod.c10
2 files changed, 12 insertions, 20 deletions
diff --git a/modutils/insmod.c b/modutils/insmod.c
index a134fea87..e52da91e4 100644
--- a/modutils/insmod.c
+++ b/modutils/insmod.c
@@ -78,7 +78,7 @@
78#ifndef MODUTILS_MODULE_H 78#ifndef MODUTILS_MODULE_H
79static const int MODUTILS_MODULE_H = 1; 79static const int MODUTILS_MODULE_H = 1;
80 80
81#ident "$Id: insmod.c,v 1.37 2001/01/24 19:07:09 andersen Exp $" 81#ident "$Id: insmod.c,v 1.38 2001/01/24 23:34:48 andersen Exp $"
82 82
83/* This file contains the structures used by the 2.0 and 2.1 kernels. 83/* This file contains the structures used by the 2.0 and 2.1 kernels.
84 We do not use the kernel headers directly because we do not wish 84 We do not use the kernel headers directly because we do not wish
@@ -284,7 +284,7 @@ int delete_module(const char *);
284#ifndef MODUTILS_OBJ_H 284#ifndef MODUTILS_OBJ_H
285static const int MODUTILS_OBJ_H = 1; 285static const int MODUTILS_OBJ_H = 1;
286 286
287#ident "$Id: insmod.c,v 1.37 2001/01/24 19:07:09 andersen Exp $" 287#ident "$Id: insmod.c,v 1.38 2001/01/24 23:34:48 andersen Exp $"
288 288
289/* The relocatable object is manipulated using elfin types. */ 289/* The relocatable object is manipulated using elfin types. */
290 290
@@ -519,10 +519,6 @@ int arch_init_module (struct obj_file *f, struct new_module *);
519#define _PATH_MODULES "/lib/modules" 519#define _PATH_MODULES "/lib/modules"
520static const int STRVERSIONLEN = 32; 520static const int STRVERSIONLEN = 32;
521 521
522#if !defined(BB_FEATURE_INSMOD_NEW_KERNEL) && !defined(BB_FEATURE_INSMOD_OLD_KERNEL)
523#error "Must have ether BB_FEATURE_INSMOD_NEW_KERNEL or BB_FEATURE_INSMOD_OLD_KERNEL defined"
524#endif
525
526/*======================================================================*/ 522/*======================================================================*/
527 523
528int flag_force_load = 0; 524int flag_force_load = 0;
@@ -615,7 +611,7 @@ extern int delete_module(const char *);
615 611
616 -- Bryan Rittmeyer <bryan@ixiacom.com> */ 612 -- Bryan Rittmeyer <bryan@ixiacom.com> */
617 613
618#ifdef BB_FEATURE_INSMOD_OLD_KERNEL 614#ifdef BB_FEATURE_OLD_MODULE_INTERFACE
619_syscall1(int, get_kernel_syms, struct old_kernel_sym *, ks) 615_syscall1(int, get_kernel_syms, struct old_kernel_sym *, ks)
620#endif 616#endif
621 617
@@ -1549,7 +1545,7 @@ old_get_module_version(struct obj_file *f, char str[STRVERSIONLEN])
1549 1545
1550#endif /* BB_FEATURE_INSMOD_VERSION_CHECKING */ 1546#endif /* BB_FEATURE_INSMOD_VERSION_CHECKING */
1551 1547
1552#ifdef BB_FEATURE_INSMOD_OLD_KERNEL 1548#ifdef BB_FEATURE_OLD_MODULE_INTERFACE
1553 1549
1554/* Fetch all the symbols and divvy them up as appropriate for the modules. */ 1550/* Fetch all the symbols and divvy them up as appropriate for the modules. */
1555 1551
@@ -1757,7 +1753,7 @@ old_init_module(const char *m_name, struct obj_file *f,
1757#define old_create_mod_use_count(x) TRUE 1753#define old_create_mod_use_count(x) TRUE
1758#define old_init_module(x, y, z) TRUE 1754#define old_init_module(x, y, z) TRUE
1759 1755
1760#endif /* BB_FEATURE_INSMOD_OLD_KERNEL */ 1756#endif /* BB_FEATURE_OLD_MODULE_INTERFACE */
1761 1757
1762 1758
1763 1759
@@ -2036,7 +2032,7 @@ new_get_module_version(struct obj_file *f, char str[STRVERSIONLEN])
2036#endif /* BB_FEATURE_INSMOD_VERSION_CHECKING */ 2032#endif /* BB_FEATURE_INSMOD_VERSION_CHECKING */
2037 2033
2038 2034
2039#ifdef BB_FEATURE_INSMOD_NEW_KERNEL 2035#ifdef BB_FEATURE_NEW_MODULE_INTERFACE
2040 2036
2041/* Fetch the loaded modules, and all currently exported symbols. */ 2037/* Fetch the loaded modules, and all currently exported symbols. */
2042 2038
@@ -2310,7 +2306,7 @@ new_init_module(const char *m_name, struct obj_file *f,
2310#define new_create_module_ksymtab(x) 2306#define new_create_module_ksymtab(x)
2311#define query_module(v, w, x, y, z) -1 2307#define query_module(v, w, x, y, z) -1
2312 2308
2313#endif /* BB_FEATURE_INSMOD_NEW_KERNEL */ 2309#endif /* BB_FEATURE_NEW_MODULE_INTERFACE */
2314 2310
2315 2311
2316/*======================================================================*/ 2312/*======================================================================*/
@@ -2997,7 +2993,7 @@ extern int insmod_main( int argc, char **argv)
2997 k_new_syscalls = !query_module(NULL, 0, NULL, 0, NULL); 2993 k_new_syscalls = !query_module(NULL, 0, NULL, 0, NULL);
2998 2994
2999 if (k_new_syscalls) { 2995 if (k_new_syscalls) {
3000#ifdef BB_FEATURE_INSMOD_NEW_KERNEL 2996#ifdef BB_FEATURE_NEW_MODULE_INTERFACE
3001 if (!new_get_kernel_symbols()) 2997 if (!new_get_kernel_symbols())
3002 goto out; 2998 goto out;
3003 k_crcs = new_is_kernel_checksummed(); 2999 k_crcs = new_is_kernel_checksummed();
@@ -3006,7 +3002,7 @@ extern int insmod_main( int argc, char **argv)
3006 goto out; 3002 goto out;
3007#endif 3003#endif
3008 } else { 3004 } else {
3009#ifdef BB_FEATURE_INSMOD_OLD_KERNEL 3005#ifdef BB_FEATURE_OLD_MODULE_INTERFACE
3010 if (!old_get_kernel_symbols(m_name)) 3006 if (!old_get_kernel_symbols(m_name))
3011 goto out; 3007 goto out;
3012 k_crcs = old_is_kernel_checksummed(); 3008 k_crcs = old_is_kernel_checksummed();
diff --git a/modutils/lsmod.c b/modutils/lsmod.c
index 586920d63..41575585f 100644
--- a/modutils/lsmod.c
+++ b/modutils/lsmod.c
@@ -40,11 +40,7 @@
40 40
41 41
42 42
43#if !defined(BB_FEATURE_LSMOD_NEW_KERNEL) && !defined(BB_FEATURE_LSMOD_OLD_KERNEL) 43#ifdef BB_FEATURE_NEW_MODULE_INTERFACE
44#error "Must have ether BB_FEATURE_LSMOD_NEW_KERNEL or BB_FEATURE_LSMOD_OLD_KERNEL defined"
45#endif
46
47#ifdef BB_FEATURE_LSMOD_NEW_KERNEL
48 44
49struct module_info 45struct module_info
50{ 46{
@@ -132,7 +128,7 @@ extern int lsmod_main(int argc, char **argv)
132 return( 0); 128 return( 0);
133} 129}
134 130
135#else /*BB_FEATURE_LSMOD_OLD_KERNEL*/ 131#else /*BB_FEATURE_OLD_MODULE_INTERFACE*/
136 132
137#if ! defined BB_FEATURE_USE_PROCFS 133#if ! defined BB_FEATURE_USE_PROCFS
138#error Sorry, I depend on the /proc filesystem right now. 134#error Sorry, I depend on the /proc filesystem right now.
@@ -157,4 +153,4 @@ extern int lsmod_main(int argc, char **argv)
157 return 1; 153 return 1;
158} 154}
159 155
160#endif /*BB_FEATURE_LSMOD_OLD_KERNEL*/ 156#endif /*BB_FEATURE_OLD_MODULE_INTERFACE*/