More work on x86_64 build, error handling and IDT
[tpg/acess2.git] / Kernel / modules.c
index 41fb514..4b095bc 100644 (file)
@@ -88,7 +88,8 @@ int Module_int_Initialise(tModule *Module, char *ArgString)
                                break;
                }
                if( mod ) {
-                       Log_Warning("Module", "Circular dependency detected");
+                       Log_Warning("Module", "Circular dependency detected (%s and %s)",
+                               mod->Name, Module->Name);
                        LEAVE_RET('i', -1);
                }
                
@@ -99,7 +100,8 @@ int Module_int_Initialise(tModule *Module, char *ArgString)
                                break;
                }
                if( i == giNumBuiltinModules ) {
-                       Log_Warning("Module", "Dependency '%s' for module '%s' failed");
+                       Log_Warning("Module", "Dependency '%s' for module '%s' failed",
+                               deps[j], Module->Name);
                        return -1;
                }
                
@@ -132,6 +134,9 @@ int Module_int_Initialise(tModule *Module, char *ArgString)
        
        if(args)        free(args);
        
+       // Remove from loading list
+       gLoadingModules = gLoadingModules->Next;
+       
        if( ret != MODULE_ERR_OK ) {
                switch(ret)
                {
@@ -153,9 +158,6 @@ int Module_int_Initialise(tModule *Module, char *ArgString)
        }
        LOG("ret = %i", ret);
        
-       // Remove from loading list
-       gLoadingModules = gLoadingModules->Next;
-       
        // Add to loaded list
        LOCK( &glModuleSpinlock );
        Module->Next = gLoadedModules;

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