diff options
author | landley <landley@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2006-03-10 19:22:06 +0000 |
---|---|---|
committer | landley <landley@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2006-03-10 19:22:06 +0000 |
commit | 07ea853040a1240d40fefe5bb871a5c3c98c77a6 (patch) | |
tree | beb32cedafc6232bf8a49fe90f0769d471ea6791 /modutils/insmod.c | |
parent | 8ee3984df387bf31ba1d652a861d7fedbac7bfa8 (diff) | |
download | busybox-w32-07ea853040a1240d40fefe5bb871a5c3c98c77a6.tar.gz busybox-w32-07ea853040a1240d40fefe5bb871a5c3c98c77a6.tar.bz2 busybox-w32-07ea853040a1240d40fefe5bb871a5c3c98c77a6.zip |
Patch from Denis Vlasenko turning static const int (which gets emitted into
the busybox binary) into enums (which don't).
git-svn-id: svn://busybox.net/trunk/busybox@14513 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'modutils/insmod.c')
-rw-r--r-- | modutils/insmod.c | 39 |
1 files changed, 22 insertions, 17 deletions
diff --git a/modutils/insmod.c b/modutils/insmod.c index 8b112787f..26dd9783b 100644 --- a/modutils/insmod.c +++ b/modutils/insmod.c | |||
@@ -343,7 +343,7 @@ extern int insmod_ng_main( int argc, char **argv); | |||
343 | 343 | ||
344 | 344 | ||
345 | #ifndef MODUTILS_MODULE_H | 345 | #ifndef MODUTILS_MODULE_H |
346 | static const int MODUTILS_MODULE_H = 1; | 346 | /* Why? static const int MODUTILS_MODULE_H = 1;*/ |
347 | 347 | ||
348 | #ident "$Id: insmod.c,v 1.126 2004/12/26 09:13:32 vapier Exp $" | 348 | #ident "$Id: insmod.c,v 1.126 2004/12/26 09:13:32 vapier Exp $" |
349 | 349 | ||
@@ -364,9 +364,11 @@ static const int MODUTILS_MODULE_H = 1; | |||
364 | #undef tgt_sizeof_char_p | 364 | #undef tgt_sizeof_char_p |
365 | #undef tgt_sizeof_void_p | 365 | #undef tgt_sizeof_void_p |
366 | #undef tgt_long | 366 | #undef tgt_long |
367 | static const int tgt_sizeof_long = 8; | 367 | enum { |
368 | static const int tgt_sizeof_char_p = 8; | 368 | tgt_sizeof_long = 8, |
369 | static const int tgt_sizeof_void_p = 8; | 369 | tgt_sizeof_char_p = 8, |
370 | tgt_sizeof_void_p = 8 | ||
371 | }; | ||
370 | #define tgt_long long long | 372 | #define tgt_long long long |
371 | #endif | 373 | #endif |
372 | 374 | ||
@@ -441,23 +443,26 @@ struct new_module_info | |||
441 | }; | 443 | }; |
442 | 444 | ||
443 | /* Bits of module.flags. */ | 445 | /* Bits of module.flags. */ |
444 | static const int NEW_MOD_RUNNING = 1; | 446 | enum { |
445 | static const int NEW_MOD_DELETED = 2; | 447 | NEW_MOD_RUNNING = 1, |
446 | static const int NEW_MOD_AUTOCLEAN = 4; | 448 | NEW_MOD_DELETED = 2, |
447 | static const int NEW_MOD_VISITED = 8; | 449 | NEW_MOD_AUTOCLEAN = 4, |
448 | static const int NEW_MOD_USED_ONCE = 16; | 450 | NEW_MOD_VISITED = 8, |
451 | NEW_MOD_USED_ONCE = 16 | ||
452 | }; | ||
449 | 453 | ||
450 | int init_module(const char *name, const struct new_module *); | 454 | int init_module(const char *name, const struct new_module *); |
451 | int query_module(const char *name, int which, void *buf, | 455 | int query_module(const char *name, int which, void *buf, |
452 | size_t bufsize, size_t *ret); | 456 | size_t bufsize, size_t *ret); |
453 | 457 | ||
454 | /* Values for query_module's which. */ | 458 | /* Values for query_module's which. */ |
455 | 459 | enum { | |
456 | static const int QM_MODULES = 1; | 460 | QM_MODULES = 1, |
457 | static const int QM_DEPS = 2; | 461 | QM_DEPS = 2, |
458 | static const int QM_REFS = 3; | 462 | QM_REFS = 3, |
459 | static const int QM_SYMBOLS = 4; | 463 | QM_SYMBOLS = 4, |
460 | static const int QM_INFO = 5; | 464 | QM_INFO = 5 |
465 | }; | ||
461 | 466 | ||
462 | /*======================================================================*/ | 467 | /*======================================================================*/ |
463 | /* The system calls unchanged between 2.0 and 2.1. */ | 468 | /* The system calls unchanged between 2.0 and 2.1. */ |
@@ -501,7 +506,7 @@ int delete_module(const char *); | |||
501 | 506 | ||
502 | 507 | ||
503 | #ifndef MODUTILS_OBJ_H | 508 | #ifndef MODUTILS_OBJ_H |
504 | static const int MODUTILS_OBJ_H = 1; | 509 | /* Why? static const int MODUTILS_OBJ_H = 1; */ |
505 | 510 | ||
506 | #ident "$Id: insmod.c,v 1.126 2004/12/26 09:13:32 vapier Exp $" | 511 | #ident "$Id: insmod.c,v 1.126 2004/12/26 09:13:32 vapier Exp $" |
507 | 512 | ||
@@ -700,7 +705,7 @@ static int obj_gpl_license(struct obj_file *f, const char **license); | |||
700 | 705 | ||
701 | 706 | ||
702 | #define _PATH_MODULES "/lib/modules" | 707 | #define _PATH_MODULES "/lib/modules" |
703 | static const int STRVERSIONLEN = 32; | 708 | enum { STRVERSIONLEN = 32 }; |
704 | 709 | ||
705 | /*======================================================================*/ | 710 | /*======================================================================*/ |
706 | 711 | ||