Path: blob/main/sys/contrib/edk2/Include/Protocol/DevicePathToText.h
48383 views
/** @file1EFI_DEVICE_PATH_TO_TEXT_PROTOCOL as defined in UEFI 2.0.2This protocol provides service to convert device nodes and paths to text.34Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>5SPDX-License-Identifier: BSD-2-Clause-Patent67**/89#ifndef __DEVICE_PATH_TO_TEXT_PROTOCOL_H__10#define __DEVICE_PATH_TO_TEXT_PROTOCOL_H__1112///13/// Device Path To Text protocol14///15#define EFI_DEVICE_PATH_TO_TEXT_PROTOCOL_GUID \16{ \170x8b843e20, 0x8132, 0x4852, {0x90, 0xcc, 0x55, 0x1a, 0x4e, 0x4a, 0x7f, 0x1c } \18}1920/**21Convert a device node to its text representation.2223@param DeviceNode Points to the device node to be converted.24@param DisplayOnly If DisplayOnly is TRUE, then the shorter text representation25of the display node is used, where applicable. If DisplayOnly26is FALSE, then the longer text representation of the display node27is used.28@param AllowShortcuts If AllowShortcuts is TRUE, then the shortcut forms of text29representation for a device node can be used, where applicable.3031@retval a_pointer a pointer to the allocated text representation of the device node data32@retval NULL if DeviceNode is NULL or there was insufficient memory.3334**/35typedef36CHAR16 *37(EFIAPI *EFI_DEVICE_PATH_TO_TEXT_NODE)(38IN CONST EFI_DEVICE_PATH_PROTOCOL *DeviceNode,39IN BOOLEAN DisplayOnly,40IN BOOLEAN AllowShortcuts41);4243/**44Convert a device path to its text representation.4546@param DevicePath Points to the device path to be converted.47@param DisplayOnly If DisplayOnly is TRUE, then the shorter text representation48of the display node is used, where applicable. If DisplayOnly49is FALSE, then the longer text representation of the display node50is used.51@param AllowShortcuts The AllowShortcuts is FALSE, then the shortcut forms of52text representation for a device node cannot be used.5354@retval a_pointer a pointer to the allocated text representation of the device node.55@retval NULL if DevicePath is NULL or there was insufficient memory.5657**/58typedef59CHAR16 *60(EFIAPI *EFI_DEVICE_PATH_TO_TEXT_PATH)(61IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath,62IN BOOLEAN DisplayOnly,63IN BOOLEAN AllowShortcuts64);6566///67/// This protocol converts device paths and device nodes to text.68///69typedef struct {70EFI_DEVICE_PATH_TO_TEXT_NODE ConvertDeviceNodeToText;71EFI_DEVICE_PATH_TO_TEXT_PATH ConvertDevicePathToText;72} EFI_DEVICE_PATH_TO_TEXT_PROTOCOL;7374extern EFI_GUID gEfiDevicePathToTextProtocolGuid;7576#endif777879