本文整理汇总了C++中EFI_DEVICE_PATH_TO_TEXT_PROTOCOL::ConvertDeviceNodeToText方法的典型用法代码示例。如果您正苦于以下问题:C++ EFI_DEVICE_PATH_TO_TEXT_PROTOCOL::ConvertDeviceNodeToText方法的具体用法?C++ EFI_DEVICE_PATH_TO_TEXT_PROTOCOL::ConvertDeviceNodeToText怎么用?C++ EFI_DEVICE_PATH_TO_TEXT_PROTOCOL::ConvertDeviceNodeToText使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类EFI_DEVICE_PATH_TO_TEXT_PROTOCOL
的用法示例。
在下文中一共展示了EFI_DEVICE_PATH_TO_TEXT_PROTOCOL::ConvertDeviceNodeToText方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: AllocateZeroPool
//.........这里部分代码省略.........
StandardLib,
EFI_TEST_ASSERTION_FAILED,
gTestGenericFailureGuid,
L"BS.AllocateMemory - Allocate Memory Fail",
L"%a:%d:",
__FILE__,
(UINTN)__LINE__
);
goto EXIT;
}
if (BlockIo->Media->MediaPresent) {
//
// EFI_WARN_BUFFER_TOO_SMALL
//
Status = gtBS->HandleProtocol (
Handle,
&gEfiDevicePathProtocolGuid,
&DevicePath
);
if (!EFI_ERROR(Status)) {
Status = gtBS->LocateProtocol (
&gEfiDevicePathToTextProtocolGuid,
NULL,
&DevicePathToText
);
if (!EFI_ERROR(Status)) {
//
// Search for Ata device Node in devicepath
//
DevPathNode = DevicePath;
while (!IsDevicePathEnd(DevPathNode)) {
DevicePathNodeStr = DevicePathToText->ConvertDeviceNodeToText (
DevPathNode,
FALSE,
FALSE
);
if ((DevicePathNodeStr != NULL) && ((EfiStrStr(DevicePathNodeStr, L"Ata(") != NULL) || (EfiStrStr(DevicePathNodeStr, L"Sata(") != NULL))) {
IsAtaDevice = TRUE;
FreePool(DevicePathNodeStr);
DevicePathNodeStr = NULL;
break;
}
FreePool(DevicePathNodeStr);
DevicePathNodeStr = NULL;
DevPathNode = NextDevicePathNode(DevPathNode);
}
}
}
//
// According to TCG definition, when the Security Protocol field is set to 00h, and SP
// Specific is set to 0000h in a TRUSTED RECEIVE command, return security protocol
// information. This Command is not associated with a security send command
//
Status = StorageSecurityCommand->ReceiveData (
StorageSecurityCommand,
BlockIo->Media->MediaId,
100000000, // Timeout 10-sec
0, // SecurityProtocol
0, // SecurityProtocolSpecifcData
10, // PayloadBufferSize,
DataBuffer, // PayloadBuffer
&RcvDataSize