Correctly return parent device in BlpFindParentBlockDevice
Some checks failed
Builds / ExectOS (amd64) (push) Failing after 34s
Builds / ExectOS (i686) (push) Failing after 33s

This commit is contained in:
Aiken Harris 2025-07-28 19:43:13 +02:00 committed by CodingWorkshop Signing Team
parent ff41b0d4f7
commit 6823982227
Signed by: CodingWorkshop Signing Team
GPG Key ID: 6DC88369C82795D2

View File

@ -155,7 +155,7 @@ BlEnumerateBlockDevices()
DriveNumber, Media->MediaPresent); DriveNumber, Media->MediaPresent);
} }
if(!BlpFindParentBlockDevice(&BlockDevices, BlockDeviceData, ParentNode)) if(!BlpFindParentBlockDevice(&BlockDevices, BlockDeviceData, &ParentNode))
{ {
BlDebugPrint(L"WARNING: No parent device found, skipping orphaned media device path\n"); BlDebugPrint(L"WARNING: No parent device found, skipping orphaned media device path\n");
continue; continue;
@ -1016,7 +1016,7 @@ XTCDECL
BOOLEAN BOOLEAN
BlpFindParentBlockDevice(IN PLIST_ENTRY BlockDevices, BlpFindParentBlockDevice(IN PLIST_ENTRY BlockDevices,
IN PEFI_BLOCK_DEVICE_DATA ChildNode, IN PEFI_BLOCK_DEVICE_DATA ChildNode,
OUT PEFI_BLOCK_DEVICE_DATA ParentNode) OUT PEFI_BLOCK_DEVICE_DATA *ParentNode)
{ {
PEFI_DEVICE_PATH_PROTOCOL ChildDevicePath, ParentDevicePath; PEFI_DEVICE_PATH_PROTOCOL ChildDevicePath, ParentDevicePath;
PEFI_BLOCK_DEVICE_DATA BlockDeviceData; PEFI_BLOCK_DEVICE_DATA BlockDeviceData;
@ -1039,7 +1039,7 @@ BlpFindParentBlockDevice(IN PLIST_ENTRY BlockDevices,
if(ParentDevicePath->Type == EFI_END_DEVICE_PATH) if(ParentDevicePath->Type == EFI_END_DEVICE_PATH)
{ {
/* Parent device is a match */ /* Parent device is a match */
ParentNode = BlockDeviceData; *ParentNode = BlockDeviceData;
return TRUE; return TRUE;
} }