From: John Hodge Date: Sun, 4 Jul 2010 03:24:15 +0000 (+0800) Subject: Added a check to the FDD driver to disable it at runtime X-Git-Tag: rel0.06~127 X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=1b9e4d77864462dc119a2acd31002fc16456b671;p=tpg%2Facess2.git Added a check to the FDD driver to disable it at runtime --- diff --git a/Modules/Storage/FDD/fdd.c b/Modules/Storage/FDD/fdd.c index 23fd4db0..4a6a5b49 100644 --- a/Modules/Storage/FDD/fdd.c +++ b/Modules/Storage/FDD/fdd.c @@ -2,7 +2,7 @@ * AcessOS 0.1 * Floppy Disk Access Code */ -#define DEBUG 0 +#define DEBUG 1 #include #include #include @@ -136,6 +136,7 @@ tDevFS_Driver gFDD_DriverInfo = { int FDD_Install(char **Arguments) { Uint8 data; + char **args = Arguments; // Determine Floppy Types (From CMOS) outb(0x70, 0x10); @@ -145,6 +146,14 @@ int FDD_Install(char **Arguments) gFDD_Devices[0].track[0] = -1; gFDD_Devices[1].track[1] = -1; + if(args) { + for(;*args;args++) + { + if(strcmp(*args, "disable")==0) + return MODULE_ERR_NOTNEEDED; + } + } + Log_Log("FDD", "Detected Disk 0: %s and Disk 1: %s", cFDD_TYPES[data>>4], cFDD_TYPES[data&0xF]); if( data == 0 ) {