mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
[FREELDR] Support drives with 4k sector size
PR was reviewed at pull/5784
This commit is contained in:
parent
bad0dd5991
commit
e2fc578f6d
2 changed files with 4 additions and 4 deletions
|
@ -415,7 +415,7 @@ UefiSetupBlockDevices(VOID)
|
|||
if (EFI_ERROR(Status) ||
|
||||
bio == NULL ||
|
||||
bio->Media->BlockSize == 0 ||
|
||||
bio->Media->BlockSize > 2048)
|
||||
bio->Media->BlockSize > 4096)
|
||||
{
|
||||
TRACE("UefiSetupBlockDevices: UEFI has found a block device that failed, skipping\n");
|
||||
continue;
|
||||
|
|
|
@ -1369,7 +1369,7 @@ BOOLEAN FatReadVolumeSectors(PFAT_VOLUME_INFO Volume, ULONG SectorNumber, ULONG
|
|||
//
|
||||
// Seek to right position
|
||||
//
|
||||
Position.QuadPart = (ULONGLONG)SectorNumber * 512;
|
||||
Position.QuadPart = (ULONGLONG)SectorNumber * Volume->BytesPerSector;
|
||||
Status = ArcSeek(Volume->DeviceId, &Position, SeekAbsolute);
|
||||
if (Status != ESUCCESS)
|
||||
{
|
||||
|
@ -1380,8 +1380,8 @@ BOOLEAN FatReadVolumeSectors(PFAT_VOLUME_INFO Volume, ULONG SectorNumber, ULONG
|
|||
//
|
||||
// Read data
|
||||
//
|
||||
Status = ArcRead(Volume->DeviceId, Buffer, SectorCount * 512, &Count);
|
||||
if (Status != ESUCCESS || Count != SectorCount * 512)
|
||||
Status = ArcRead(Volume->DeviceId, Buffer, SectorCount * Volume->BytesPerSector, &Count);
|
||||
if (Status != ESUCCESS || Count != SectorCount * Volume->BytesPerSector)
|
||||
{
|
||||
TRACE("FatReadVolumeSectors() Failed to read\n");
|
||||
return FALSE;
|
||||
|
|
Loading…
Reference in a new issue