Ignore:
Timestamp:
Dec 20, 2016, 4:07:32 PM (7 years ago)
Author:
Bruno Cornec
Message:

New 3?3 banch for incorporation of latest busybox 1.25. Changing minor version to handle potential incompatibilities.

Location:
branches/3.3
Files:
1 edited
1 copied

Legend:

Unmodified
Added
Removed
  • branches/3.3/mindi-busybox/modutils/modutils.h

    r3232 r3621  
    1717 * internally for the maximum alias name length, which can be quite long */
    1818#define MODULE_NAME_LEN 256
     19#define MODULE_HASH_SIZE 256
     20
     21typedef 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
     38typedef 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
     46module_entry *moddb_get(module_db *db, const char *s) FAST_FUNC;
     47module_entry *moddb_get_or_create(module_db *db, const char *s) FAST_FUNC;
     48void moddb_free(module_db *db) FAST_FUNC;
    1949
    2050void replace(char *s, char what, char with) FAST_FUNC;
Note: See TracChangeset for help on using the changeset viewer.