mirror of
https://github.com/reactos/reactos.git
synced 2026-05-30 23:33:24 +08:00
[FREELDR:ARCH] hwide.c: Don't rely on DEVICE_UNIT P; to be at the beginning of the HW_DEVICE_UNIT structure (#8732)
This commit is contained in:
@@ -1233,7 +1233,7 @@ AtaReadLogicalSectors(
|
||||
_In_ ULONG SectorCount,
|
||||
_Out_writes_bytes_all_(SectorCount * DeviceUnit->SectorSize) PVOID Buffer)
|
||||
{
|
||||
PHW_DEVICE_UNIT Unit = (PHW_DEVICE_UNIT)DeviceUnit;
|
||||
PHW_DEVICE_UNIT Unit = CONTAINING_RECORD(DeviceUnit, HW_DEVICE_UNIT, P);
|
||||
ATA_DEVICE_REQUEST Request = { 0 };
|
||||
|
||||
ASSERT(Unit);
|
||||
@@ -1271,8 +1271,7 @@ AtaGetDevice(
|
||||
_In_ UCHAR UnitNumber)
|
||||
{
|
||||
if (UnitNumber < RTL_NUMBER_OF(AtapUnits))
|
||||
return (PDEVICE_UNIT)AtapUnits[UnitNumber];
|
||||
|
||||
return &(AtapUnits[UnitNumber]->P);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user