Changeset 1915

Show
Ignore:
Timestamp:
02/25/09 01:19:19 (3 years ago)
Author:
mwhitworth
Message:

Tidy up formatting, search for init_module symbol (for future Linux driver layer support.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • Whitix/trunk/kernel/module.c

    r1668 r1915  
    7474        ListForEachEntry(curr, &moduleList, next) 
    7575        { 
    76 //              KePrint("%#X %#X %#X\n", curr->textAddr, address, curr->textAddr+curr->textLength); 
    7776                if (address >= curr->textAddr && address < curr->textAddr+curr->textLength) 
    7877                { 
     
    9392                else 
    9493                        KePrint("%#X\n", address); 
    95         }//else 
    96 //              KePrint("%#X\n", address); 
     94        } 
    9795} 
    9896 
     
    158156 
    159157                while (i < curr->keSymTabSize) 
    160                 { 
     158                {                                
    161159                        if (!strcmp(currSym->name, name)) 
    162160                        { 
     
    208206                         * and module symbols to set its value. */ 
    209207                        case STN_UNDEF: 
    210                                 symbol->symValue=ModuleResolveKernel(symName); 
     208                                symbol->symValue = ModuleResolveKernel(symName); 
    211209 
    212210                                if (symbol->symValue) 
     
    382380        int (*modInit)(void); 
    383381 
    384         modInit=ModuleSymbolFind(module, "_ModuleInit", STT_FUNC); 
     382        modInit = ModuleSymbolFind(module, "_ModuleInit", STT_FUNC); 
     383 
     384        /* Support for Linux .ko modules. The module startup function can be found 
     385         * at init_module. */ 
     386          
     387        if (!modInit) 
     388                modInit = ModuleSymbolFind(module, "init_module", STT_FUNC); 
    385389 
    386390        PreemptDisable();