Cleaning up some old code
[tpg/acess2.git] / Kernel / modules.c
index 6894873..92dd8d3 100644 (file)
@@ -2,7 +2,7 @@
  * Acess2
  * - Module Loader
  */
-#define DEBUG  1
+#define DEBUG  0
 #include <acess.h>
 #include <modules.h>
 
@@ -349,53 +349,12 @@ int Module_LoadFile(char *Path, char *ArgString)
                return 0;
        }
        
-       // Check magic number
-       if(info->Magic != MODULE_MAGIC)
-       {
-               Log_Warning("Module", "Module's magic value is invalid (0x%x != 0x%x)", info->Magic, MODULE_MAGIC);
-               return 0;
-       }
-       
-       // Check Architecture
-       if(info->Arch != MODULE_ARCH_ID)
-       {
-               Log_Warning("Module", "Module is for a different architecture");
-               return 0;
-       }
-       
-       #if 1
+       // Initialise (and register)
        if( Module_int_Initialise( info, ArgString ) )
        {
                Binary_Unload(base);
                return 0;
        }
-       #else
-       // Resolve Dependencies
-       if( !Module_int_ResolveDeps(info) ) {
-               Binary_Unload(base);
-               return 0;
-       }
-       
-       Log_Log("Module", "Initialising %p '%s' v%i.%i...",
-                               info,
-                               info->Name,
-                               info->Version>>8, info->Version & 0xFF
-                               );
-       
-       // Call Initialiser
-       //if( info->Init( ArgString ) != 0 )
-       if( info->Init( NULL ) == 0 )
-       {
-               Binary_Unload(base);
-               return 0;
-       }
-       
-       // Add to list
-       LOCK( &glModuleSpinlock );
-       info->Next = gLoadedModules;
-       gLoadedModules = info;
-       RELEASE( &glModuleSpinlock );
-       #endif
        
        return 1;
 }

UCC git Repository :: git.ucc.asn.au