mirror of
https://github.com/reactos/reactos.git
synced 2025-05-24 03:24:45 +00:00
[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. svn path=/trunk/; revision=61162
This commit is contained in:
parent
415c5bf5ac
commit
aef485a1f5
2 changed files with 2 additions and 5 deletions
|
@ -6,7 +6,6 @@
|
||||||
* PROGRAMMERS: Eric Kohl
|
* PROGRAMMERS: Eric Kohl
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#define REACTOS_VERSION_DLL
|
#define REACTOS_VERSION_DLL
|
||||||
#define REACTOS_STR_FILE_DESCRIPTION "Floppy Disk Controller Driver\0"
|
#define REACTOS_STR_FILE_DESCRIPTION "Floppy Disk Controller Driver\0"
|
||||||
#define REACTOS_STR_INTERNAL_NAME "fdc\0"
|
#define REACTOS_STR_INTERNAL_NAME "fdc\0"
|
||||||
|
|
|
@ -216,8 +216,6 @@ FdcFdoConfigCallback(
|
||||||
PeripheralResourceDescriptor = (PCM_FULL_RESOURCE_DESCRIPTOR)((PCHAR)PeripheralFullDescriptor +
|
PeripheralResourceDescriptor = (PCM_FULL_RESOURCE_DESCRIPTOR)((PCHAR)PeripheralFullDescriptor +
|
||||||
PeripheralFullDescriptor->DataOffset);
|
PeripheralFullDescriptor->DataOffset);
|
||||||
|
|
||||||
DeviceExtension->ControllerInfo.NumberOfDrives = 0;
|
|
||||||
|
|
||||||
/* learn about drives attached to controller */
|
/* learn about drives attached to controller */
|
||||||
for(i = 0; i < PeripheralResourceDescriptor->PartialResourceList.Count; i++)
|
for(i = 0; i < PeripheralResourceDescriptor->PartialResourceList.Count; i++)
|
||||||
{
|
{
|
||||||
|
@ -228,10 +226,10 @@ FdcFdoConfigCallback(
|
||||||
|
|
||||||
FloppyDeviceData = (PCM_FLOPPY_DEVICE_DATA)(PartialDescriptor + 1);
|
FloppyDeviceData = (PCM_FLOPPY_DEVICE_DATA)(PartialDescriptor + 1);
|
||||||
|
|
||||||
DriveInfo = &DeviceExtension->ControllerInfo.DriveInfo[i];
|
DriveInfo = &DeviceExtension->ControllerInfo.DriveInfo[DeviceExtension->ControllerInfo.NumberOfDrives];
|
||||||
|
|
||||||
DriveInfo->ControllerInfo = &DeviceExtension->ControllerInfo;
|
DriveInfo->ControllerInfo = &DeviceExtension->ControllerInfo;
|
||||||
DriveInfo->UnitNumber = i;
|
DriveInfo->UnitNumber = DeviceExtension->ControllerInfo.NumberOfDrives;
|
||||||
DriveInfo->PeripheralNumber = PeripheralNumber;
|
DriveInfo->PeripheralNumber = PeripheralNumber;
|
||||||
|
|
||||||
DriveInfo->FloppyDeviceData.MaxDensity = FloppyDeviceData->MaxDensity;
|
DriveInfo->FloppyDeviceData.MaxDensity = FloppyDeviceData->MaxDensity;
|
||||||
|
|
Loading…
Reference in a new issue