Changeset 3621 in MondoRescue for branches/3.3/mindi-busybox/modutils/modutils.h
- Timestamp:
- Dec 20, 2016, 4:07:32 PM (7 years ago)
- Location:
- branches/3.3
- Files:
-
- 1 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
branches/3.3/mindi-busybox/modutils/modutils.h
r3232 r3621 17 17 * internally for the maximum alias name length, which can be quite long */ 18 18 #define MODULE_NAME_LEN 256 19 #define MODULE_HASH_SIZE 256 20 21 typedef struct module_entry { 22 struct module_entry *next; 23 char *name, *modname; 24 llist_t *deps; 25 IF_MODPROBE( 26 llist_t *realnames; 27 unsigned flags; 28 const char *probed_name; /* verbatim as seen on cmdline */ 29 char *options; /* options from config files */ 30 ) 31 IF_DEPMOD( 32 llist_t *aliases; 33 llist_t *symbols; 34 struct module_entry *dnext, *dprev; 35 ) 36 } module_entry; 37 38 typedef struct module_db { 39 module_entry *buckets[MODULE_HASH_SIZE]; 40 } module_db; 41 42 #define moddb_foreach_module(db, module, index) \ 43 for ((index) = 0; (index) < MODULE_HASH_SIZE; (index)++) \ 44 for (module = (db)->buckets[index]; module; module = module->next) 45 46 module_entry *moddb_get(module_db *db, const char *s) FAST_FUNC; 47 module_entry *moddb_get_or_create(module_db *db, const char *s) FAST_FUNC; 48 void moddb_free(module_db *db) FAST_FUNC; 19 49 20 50 void replace(char *s, char what, char with) FAST_FUNC;
Note:
See TracChangeset
for help on using the changeset viewer.