diff options
| author | markw <markw@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2001-01-23 22:30:04 +0000 |
|---|---|---|
| committer | markw <markw@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2001-01-23 22:30:04 +0000 |
| commit | b2b4893698607c194acfd2e355154b54273b8880 (patch) | |
| tree | 852d97bdc34c44dbcf29cc8b5cd9257a8c90f7b3 /modutils | |
| parent | fc2d2e3371dbe137decc3aa2065acd6140226f94 (diff) | |
| download | busybox-w32-b2b4893698607c194acfd2e355154b54273b8880.tar.gz busybox-w32-b2b4893698607c194acfd2e355154b54273b8880.tar.bz2 busybox-w32-b2b4893698607c194acfd2e355154b54273b8880.zip | |
#define -> static const int. Also got rid of some big static buffers.
git-svn-id: svn://busybox.net/trunk/busybox@1642 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'modutils')
| -rw-r--r-- | modutils/insmod.c | 38 | ||||
| -rw-r--r-- | modutils/lsmod.c | 22 |
2 files changed, 30 insertions, 30 deletions
diff --git a/modutils/insmod.c b/modutils/insmod.c index a499bcdaa..be27a1f2b 100644 --- a/modutils/insmod.c +++ b/modutils/insmod.c | |||
| @@ -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" |
diff --git a/modutils/lsmod.c b/modutils/lsmod.c index 4c50bf4bd..586920d63 100644 --- a/modutils/lsmod.c +++ b/modutils/lsmod.c | |||
| @@ -59,19 +59,19 @@ int query_module(const char *name, int which, void *buf, size_t bufsize, | |||
| 59 | size_t *ret); | 59 | size_t *ret); |
| 60 | 60 | ||
| 61 | /* Values for query_module's which. */ | 61 | /* Values for query_module's which. */ |
| 62 | #define QM_MODULES 1 | 62 | static const int QM_MODULES = 1; |
| 63 | #define QM_DEPS 2 | 63 | static const int QM_DEPS = 2; |
| 64 | #define QM_REFS 3 | 64 | static const int QM_REFS = 3; |
| 65 | #define QM_SYMBOLS 4 | 65 | static const int QM_SYMBOLS = 4; |
| 66 | #define QM_INFO 5 | 66 | static const int QM_INFO = 5; |
| 67 | 67 | ||
| 68 | /* Bits of module.flags. */ | 68 | /* Bits of module.flags. */ |
| 69 | #define NEW_MOD_RUNNING 1 | 69 | static const int NEW_MOD_RUNNING = 1; |
| 70 | #define NEW_MOD_DELETED 2 | 70 | static const int NEW_MOD_DELETED = 2; |
| 71 | #define NEW_MOD_AUTOCLEAN 4 | 71 | static const int NEW_MOD_AUTOCLEAN = 4; |
| 72 | #define NEW_MOD_VISITED 8 | 72 | static const int NEW_MOD_VISITED = 8; |
| 73 | #define NEW_MOD_USED_ONCE 16 | 73 | static const int NEW_MOD_USED_ONCE = 16; |
| 74 | #define NEW_MOD_INITIALIZING 64 | 74 | static const int NEW_MOD_INITIALIZING = 64; |
| 75 | 75 | ||
| 76 | 76 | ||
| 77 | extern int lsmod_main(int argc, char **argv) | 77 | extern int lsmod_main(int argc, char **argv) |
