+ if( gasBuiltinModuleArgs != NULL )
+ free(gasBuiltinModuleArgs);
+}
+
+/**
+ * \brief Initialise a builtin module given it's name
+ *
+ * E.g. Used by VTerm to load an alternate video driver at runtime
+ */
+int Modules_InitialiseBuiltin(const char *Name)
+{
+ int i;
+
+ // Check if it's loaded
+ if( Module_IsLoaded(Name) )
+ return 0;
+
+ if( !gapBuiltinModules )
+ Modules_int_GetBuiltinArray();
+
+ for( i = 0; i < giNumBuiltinModules; i++ )
+ {
+ if( strcmp(gapBuiltinModules[i]->Name, Name) == 0 ) {
+ return Module_int_Initialise(gapBuiltinModules[i],
+ (gasBuiltinModuleArgs ? gasBuiltinModuleArgs[i] : NULL)
+ );
+ }
+ }
+ return -1;
+}
+
+/**
+ * \brief Sets the parameters for a builtin module
+ */
+void Modules_SetBuiltinParams(char *Name, char *ArgString)
+{
+ int i;
+
+ if( gasBuiltinModuleArgs == NULL )
+ {
+ Modules_int_GetBuiltinArray();
+ }
+
+ // I hate expensive scans
+ for( i = 0; i < giNumBuiltinModules; i++ )
+ {
+ if(strcmp( gapBuiltinModules[i]->Name, Name ) == 0) {
+ gasBuiltinModuleArgs[i] = ArgString;
+ return ;
+ }
+ }
+
+ Log_Warning("Modules", "Unknown builtin kernel module '%s'", Name);