Author: hpoussin Date: Sun Oct 18 22:06:09 2009 New Revision: 43576
URL: http://svn.reactos.org/svn/reactos?rev=43576&view=rev Log: Ok, reverting r43565. Someone will have to tell me why it works for me but not for buildbot
Modified: trunk/reactos/boot/freeldr/freeldr/arch/i386/hardware.c
Modified: trunk/reactos/boot/freeldr/freeldr/arch/i386/hardware.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/i... ============================================================================== --- trunk/reactos/boot/freeldr/freeldr/arch/i386/hardware.c [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/arch/i386/hardware.c [iso-8859-1] Sun Oct 18 22:06:09 2009 @@ -467,7 +467,7 @@ { DISKCONTEXT* Context = FsGetDeviceSpecific(FileId); UCHAR* Ptr = (UCHAR*)Buffer; - ULONG i, Length, Sectors; + ULONG i, Length; BOOLEAN ret;
*Count = 0; @@ -475,13 +475,12 @@ while (N > 0) { Length = N; - if (Length > DISKREADBUFFER_SIZE) - Length = DISKREADBUFFER_SIZE; - Sectors = (Length + Context->SectorSize - 1) / Context->SectorSize; + if (Length > Context->SectorSize) + Length = Context->SectorSize; ret = MachDiskReadLogicalSectors( Context->DriveNumber, Context->SectorNumber + Context->SectorOffset + i, - Sectors, + 1, (PVOID)DISKREADBUFFER); if (!ret) return EIO; @@ -489,7 +488,7 @@ Ptr += Length; *Count += Length; N -= Length; - i += Sectors; + i++; }
return ESUCCESS;