Modules/UDI - Allow disabling from module arguments
authorJohn Hodge <[email protected]>
Mon, 18 Aug 2014 23:47:40 +0000 (07:47 +0800)
committerJohn Hodge <[email protected]>
Mon, 18 Aug 2014 23:47:40 +0000 (07:47 +0800)
KernelLand/Modules/Interfaces/UDI/main.c

index 1c48008..4a655f0 100644 (file)
@@ -37,6 +37,10 @@ tUDI_DriverModule    *gpUDI_LoadedModules;
  */
 int UDI_Install(char **Arguments)
 {
+       if( Arguments && Arguments[0] && strcmp(Arguments[0], "disable") == 0 ) {
+               // Module disabled by user
+               return MODULE_ERR_NOTNEEDED;
+       }
        Module_RegisterLoader( &gUDI_Loader );
 
        Proc_SpawnWorker(UDI_int_DeferredThread, NULL);

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