More behavior fixes (changes to resolution only apply on a mode set)
[tpg/acess2.git] / Kernel / modules.c
index c9f3a70..009ade3 100644 (file)
@@ -43,6 +43,7 @@ char  **gasBuiltinModuleArgs;
 /**
  * \brief Initialises a module
  * \param Module       Pointer to the module header
+ * \param ArgString    Comma separated list of module arguments
  * \return Zero on success, eModuleErrors or -1 on error
  * \retval -1  Returned if a dependency fails, or a circular dependency
  *              exists.
@@ -349,53 +350,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