diff options
Diffstat (limited to 'insmod.c')
-rw-r--r-- | insmod.c | 38 |
1 files changed, 19 insertions, 19 deletions
@@ -76,9 +76,9 @@ | |||
76 | 76 | ||
77 | 77 | ||
78 | #ifndef MODUTILS_MODULE_H | 78 | #ifndef MODUTILS_MODULE_H |
79 | #define MODUTILS_MODULE_H 1 | 79 | static const int MODUTILS_MODULE_H = 1; |
80 | 80 | ||
81 | #ident "$Id: insmod.c,v 1.35 2001/01/04 02:00:17 kraai Exp $" | 81 | #ident "$Id: insmod.c,v 1.36 2001/01/23 22:30:04 markw 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 |
@@ -135,7 +135,7 @@ struct old_module | |||
135 | }; | 135 | }; |
136 | 136 | ||
137 | /* Sent to init_module(2) or'ed into the code size parameter. */ | 137 | /* Sent to init_module(2) or'ed into the code size parameter. */ |
138 | #define OLD_MOD_AUTOCLEAN 0x40000000 /* big enough, but no sign problems... */ | 138 | static const int OLD_MOD_AUTOCLEAN = 0x40000000; /* big enough, but no sign problems... */ |
139 | 139 | ||
140 | int get_kernel_syms(struct old_kernel_sym *); | 140 | int get_kernel_syms(struct old_kernel_sym *); |
141 | int old_sys_init_module(const char *name, char *code, unsigned codesize, | 141 | int old_sys_init_module(const char *name, char *code, unsigned codesize, |
@@ -158,9 +158,9 @@ int old_sys_init_module(const char *name, char *code, unsigned codesize, | |||
158 | #undef tgt_sizeof_char_p | 158 | #undef tgt_sizeof_char_p |
159 | #undef tgt_sizeof_void_p | 159 | #undef tgt_sizeof_void_p |
160 | #undef tgt_long | 160 | #undef tgt_long |
161 | #define tgt_sizeof_long 8 | 161 | static const int tgt_sizeof_long = 8; |
162 | #define tgt_sizeof_char_p 8 | 162 | static const int tgt_sizeof_char_p = 8; |
163 | #define tgt_sizeof_void_p 8 | 163 | static const int tgt_sizeof_void_p = 8; |
164 | #define tgt_long long long | 164 | #define tgt_long long long |
165 | #endif | 165 | #endif |
166 | 166 | ||
@@ -222,11 +222,11 @@ struct new_module_info | |||
222 | }; | 222 | }; |
223 | 223 | ||
224 | /* Bits of module.flags. */ | 224 | /* Bits of module.flags. */ |
225 | #define NEW_MOD_RUNNING 1 | 225 | static const int NEW_MOD_RUNNING = 1; |
226 | #define NEW_MOD_DELETED 2 | 226 | static const int NEW_MOD_DELETED = 2; |
227 | #define NEW_MOD_AUTOCLEAN 4 | 227 | static const int NEW_MOD_AUTOCLEAN = 4; |
228 | #define NEW_MOD_VISITED 8 | 228 | static const int NEW_MOD_VISITED = 8; |
229 | #define NEW_MOD_USED_ONCE 16 | 229 | static const int NEW_MOD_USED_ONCE = 16; |
230 | 230 | ||
231 | int new_sys_init_module(const char *name, const struct new_module *); | 231 | int new_sys_init_module(const char *name, const struct new_module *); |
232 | int query_module(const char *name, int which, void *buf, size_t bufsize, | 232 | int query_module(const char *name, int which, void *buf, size_t bufsize, |
@@ -234,11 +234,11 @@ int query_module(const char *name, int which, void *buf, size_t bufsize, | |||
234 | 234 | ||
235 | /* Values for query_module's which. */ | 235 | /* Values for query_module's which. */ |
236 | 236 | ||
237 | #define QM_MODULES 1 | 237 | static const int QM_MODULES = 1; |
238 | #define QM_DEPS 2 | 238 | static const int QM_DEPS = 2; |
239 | #define QM_REFS 3 | 239 | static const int QM_REFS = 3; |
240 | #define QM_SYMBOLS 4 | 240 | static const int QM_SYMBOLS = 4; |
241 | #define QM_INFO 5 | 241 | static const int QM_INFO = 5; |
242 | 242 | ||
243 | /*======================================================================*/ | 243 | /*======================================================================*/ |
244 | /* The system calls unchanged between 2.0 and 2.1. */ | 244 | /* The system calls unchanged between 2.0 and 2.1. */ |
@@ -282,9 +282,9 @@ int delete_module(const char *); | |||
282 | 282 | ||
283 | 283 | ||
284 | #ifndef MODUTILS_OBJ_H | 284 | #ifndef MODUTILS_OBJ_H |
285 | #define MODUTILS_OBJ_H 1 | 285 | static const int MODUTILS_OBJ_H = 1; |
286 | 286 | ||
287 | #ident "$Id: insmod.c,v 1.35 2001/01/04 02:00:17 kraai Exp $" | 287 | #ident "$Id: insmod.c,v 1.36 2001/01/23 22:30:04 markw Exp $" |
288 | 288 | ||
289 | /* The relocatable object is manipulated using elfin types. */ | 289 | /* The relocatable object is manipulated using elfin types. */ |
290 | 290 | ||
@@ -517,7 +517,7 @@ int arch_init_module (struct obj_file *f, struct new_module *); | |||
517 | 517 | ||
518 | 518 | ||
519 | #define _PATH_MODULES "/lib/modules" | 519 | #define _PATH_MODULES "/lib/modules" |
520 | #define STRVERSIONLEN 32 | 520 | static const int STRVERSIONLEN = 32; |
521 | 521 | ||
522 | #if !defined(BB_FEATURE_INSMOD_NEW_KERNEL) && !defined(BB_FEATURE_INSMOD_OLD_KERNEL) | 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" | 523 | #error "Must have ether BB_FEATURE_INSMOD_NEW_KERNEL or BB_FEATURE_INSMOD_OLD_KERNEL defined" |