Fix a bug that overwrites drive data if two FDDs are attached to a controller. Only the second drive is detected in this case.

svn path=/trunk/; revision=61162
This commit is contained in:
Eric Kohl 2013-12-01 01:32:26 +00:00
parent 415c5bf5ac
commit aef485a1f5
2 changed files with 2 additions and 5 deletions

View file

@ -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"

View file

@ -216,8 +216,6 @@ FdcFdoConfigCallback(
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 @@ FdcFdoConfigCallback(
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;