From 34de88eefdfdcef5b1b830ec4a2dbfa2559f6dfa Mon Sep 17 00:00:00 2001 From: John Hodge Date: Tue, 19 Aug 2014 07:47:40 +0800 Subject: [PATCH] Modules/UDI - Allow disabling from module arguments --- KernelLand/Modules/Interfaces/UDI/main.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/KernelLand/Modules/Interfaces/UDI/main.c b/KernelLand/Modules/Interfaces/UDI/main.c index 1c480083..4a655f0c 100644 --- a/KernelLand/Modules/Interfaces/UDI/main.c +++ b/KernelLand/Modules/Interfaces/UDI/main.c @@ -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); -- 2.20.1