Author: ekohl Date: Sun Dec 1 01:32:26 2013 New Revision: 61162
URL: http://svn.reactos.org/svn/reactos?rev=61162&view=rev Log: [FDC] Fix a bug that overwrites drive data if two FDDs are attached to a controller. Only the second drive is detected in this case.
Modified: trunk/reactos/drivers/storage/fdc/fdc/fdc.rc trunk/reactos/drivers/storage/fdc/fdc/fdo.c
Modified: trunk/reactos/drivers/storage/fdc/fdc/fdc.rc URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/storage/fdc/fdc/fdc... ============================================================================== --- trunk/reactos/drivers/storage/fdc/fdc/fdc.rc [iso-8859-1] (original) +++ trunk/reactos/drivers/storage/fdc/fdc/fdc.rc [iso-8859-1] Sun Dec 1 01:32:26 2013 @@ -6,7 +6,6 @@ * PROGRAMMERS: Eric Kohl */
- #define REACTOS_VERSION_DLL #define REACTOS_STR_FILE_DESCRIPTION "Floppy Disk Controller Driver\0" #define REACTOS_STR_INTERNAL_NAME "fdc\0"
Modified: trunk/reactos/drivers/storage/fdc/fdc/fdo.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/storage/fdc/fdc/fdo... ============================================================================== --- trunk/reactos/drivers/storage/fdc/fdc/fdo.c [iso-8859-1] (original) +++ trunk/reactos/drivers/storage/fdc/fdc/fdo.c [iso-8859-1] Sun Dec 1 01:32:26 2013 @@ -216,8 +216,6 @@ PeripheralResourceDescriptor = (PCM_FULL_RESOURCE_DESCRIPTOR)((PCHAR)PeripheralFullDescriptor + PeripheralFullDescriptor->DataOffset);
- DeviceExtension->ControllerInfo.NumberOfDrives = 0; - /* learn about drives attached to controller */ for(i = 0; i < PeripheralResourceDescriptor->PartialResourceList.Count; i++) { @@ -228,10 +226,10 @@
FloppyDeviceData = (PCM_FLOPPY_DEVICE_DATA)(PartialDescriptor + 1);
- DriveInfo = &DeviceExtension->ControllerInfo.DriveInfo[i]; + DriveInfo = &DeviceExtension->ControllerInfo.DriveInfo[DeviceExtension->ControllerInfo.NumberOfDrives];
DriveInfo->ControllerInfo = &DeviceExtension->ControllerInfo; - DriveInfo->UnitNumber = i; + DriveInfo->UnitNumber = DeviceExtension->ControllerInfo.NumberOfDrives; DriveInfo->PeripheralNumber = PeripheralNumber;
DriveInfo->FloppyDeviceData.MaxDensity = FloppyDeviceData->MaxDensity;