Locatedevicepath(), Device_path, Device_path protocol – Intel Extensible Firmware Interface User Manual
Page 145

Services — Boot Services
Version 1.10
12/01/02
5-47
LocateDevicePath()
Summary
Locates the handle to a device on the device path that supports the specified protocol.
Prototype
EFI_STATUS
LocateDevicePath (
IN EFI_GUID
*Protocol,
IN OUT EFI_DEVICE_PATH
**DevicePath,
OUT EFI_HANDLE
*Device
);
Parameters
Protocol
The protocol to search for. Type
EFI_GUID
is defined in the
function description.
DevicePath
On input, a pointer to a pointer to the device path. On output, the device
path pointer is modified to point to the remaining part of the device
path—that is, when the function finds the closest handle, it splits the
device path into two parts, stripping off the front part, and returning the
remaining portion. Type
EFI_DEVICE_PATH
is defined in “Related
Definitions.”
Device
A pointer to the returned device handle. Type
EFI_HANDLE
is defined
in the
InstallProtocolInterface()
function description.
Related Definitions
//*******************************************************
// EFI_DEVICE_PATH
//*******************************************************
typedef struct _EFI_DEVICE_PATH {
UINT8
Type;
UINT8
SubType;
UINT8
Length[2];
} EFI_DEVICE_PATH;