OcDevicePathLib: Import API to find device path terminator

This commit is contained in:
Marvin Häuser 2022-06-11 10:33:05 +02:00 committed by Marvin Häuser
parent e827fbe4d3
commit 3d58e26acc
2 changed files with 24 additions and 0 deletions

View File

@ -39,6 +39,18 @@ AppendFileNameDevicePath (
IN CHAR16 *FileName
);
/**
Locate the terminating node inside the device path.
@param[in] DevicePath The device path used in the search.
@return Returned is the last Device Path Node.
**/
EFI_DEVICE_PATH_PROTOCOL *
FindDevicePathEndNode (
IN EFI_DEVICE_PATH_PROTOCOL *DevicePath
);
/**
Locate the node inside the device path specified by Type an SubType values.

View File

@ -70,6 +70,18 @@ AppendFileNameDevicePath (
return AppendedDevicePath;
}
EFI_DEVICE_PATH_PROTOCOL *
FindDevicePathEndNode (
IN EFI_DEVICE_PATH_PROTOCOL *DevicePath
)
{
while (!IsDevicePathEnd (DevicePath)) {
DevicePath = NextDevicePathNode (DevicePath);
}
return DevicePath;
}
EFI_DEVICE_PATH_PROTOCOL *
FindDevicePathNodeWithType (
IN EFI_DEVICE_PATH_PROTOCOL *DevicePath,