mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
Fixed a length calculation bug introduced with transfer-splitting code
--> big file transfers work now svn path=/trunk/; revision=8638
This commit is contained in:
parent
8438bc1293
commit
8e37499a90
1 changed files with 7 additions and 2 deletions
|
@ -660,10 +660,15 @@ VOID NTAPI ReadWritePassive(PDRIVE_INFO DriveInfo,
|
|||
KdPrint(("floppy: ReadWritePassive(): computing number of sectors to transfer (StartSector 0x%x): ", StartSector));
|
||||
|
||||
/* 1-based sector number */
|
||||
if( (DriveInfo->DiskGeometry.SectorsPerTrack - StartSector + 1) < Length / DriveInfo->DiskGeometry.BytesPerSector)
|
||||
if( (DriveInfo->DiskGeometry.SectorsPerTrack - StartSector + 1) <
|
||||
(Length - TransferByteOffset) / DriveInfo->DiskGeometry.BytesPerSector)
|
||||
{
|
||||
CurrentTransferSectors = (UCHAR)DriveInfo->DiskGeometry.SectorsPerTrack - StartSector + 1;
|
||||
}
|
||||
else
|
||||
CurrentTransferSectors = (UCHAR)(Length / DriveInfo->DiskGeometry.BytesPerSector);
|
||||
{
|
||||
CurrentTransferSectors = (UCHAR)((Length - TransferByteOffset) / DriveInfo->DiskGeometry.BytesPerSector);
|
||||
}
|
||||
|
||||
KdPrint(("0x%x\n", CurrentTransferSectors));
|
||||
|
||||
|
|
Loading…
Reference in a new issue