mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +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) ||
|
if (EFI_ERROR(Status) ||
|
||||||
bio == NULL ||
|
bio == NULL ||
|
||||||
bio->Media->BlockSize == 0 ||
|
bio->Media->BlockSize == 0 ||
|
||||||
bio->Media->BlockSize > 2048)
|
bio->Media->BlockSize > 4096)
|
||||||
{
|
{
|
||||||
TRACE("UefiSetupBlockDevices: UEFI has found a block device that failed, skipping\n");
|
TRACE("UefiSetupBlockDevices: UEFI has found a block device that failed, skipping\n");
|
||||||
continue;
|
continue;
|
||||||
|
|
|
@ -1369,7 +1369,7 @@ BOOLEAN FatReadVolumeSectors(PFAT_VOLUME_INFO Volume, ULONG SectorNumber, ULONG
|
||||||
//
|
//
|
||||||
// Seek to right position
|
// Seek to right position
|
||||||
//
|
//
|
||||||
Position.QuadPart = (ULONGLONG)SectorNumber * 512;
|
Position.QuadPart = (ULONGLONG)SectorNumber * Volume->BytesPerSector;
|
||||||
Status = ArcSeek(Volume->DeviceId, &Position, SeekAbsolute);
|
Status = ArcSeek(Volume->DeviceId, &Position, SeekAbsolute);
|
||||||
if (Status != ESUCCESS)
|
if (Status != ESUCCESS)
|
||||||
{
|
{
|
||||||
|
@ -1380,8 +1380,8 @@ BOOLEAN FatReadVolumeSectors(PFAT_VOLUME_INFO Volume, ULONG SectorNumber, ULONG
|
||||||
//
|
//
|
||||||
// Read data
|
// Read data
|
||||||
//
|
//
|
||||||
Status = ArcRead(Volume->DeviceId, Buffer, SectorCount * 512, &Count);
|
Status = ArcRead(Volume->DeviceId, Buffer, SectorCount * Volume->BytesPerSector, &Count);
|
||||||
if (Status != ESUCCESS || Count != SectorCount * 512)
|
if (Status != ESUCCESS || Count != SectorCount * Volume->BytesPerSector)
|
||||||
{
|
{
|
||||||
TRACE("FatReadVolumeSectors() Failed to read\n");
|
TRACE("FatReadVolumeSectors() Failed to read\n");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
Loading…
Reference in a new issue