Path: blob/main/sys/contrib/edk2/Include/Protocol/DevicePathFromText.h
48383 views
/** @file1EFI_DEVICE_PATH_FROM_TEXT_PROTOCOL as defined in UEFI 2.0.2This protocol provides service to convert text to device paths and device nodes.34Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>5SPDX-License-Identifier: BSD-2-Clause-Patent67**/89#ifndef __DEVICE_PATH_FROM_TEXT_PROTOCOL_H__10#define __DEVICE_PATH_FROM_TEXT_PROTOCOL_H__1112///13/// Device Path From Text protocol14///15#define EFI_DEVICE_PATH_FROM_TEXT_PROTOCOL_GUID \16{ \170x5c99a21, 0xc70f, 0x4ad2, {0x8a, 0x5f, 0x35, 0xdf, 0x33, 0x43, 0xf5, 0x1e } \18}1920/**21Convert text to the binary representation of a device node.2223@param TextDeviceNode TextDeviceNode points to the text representation of a device24node. Conversion starts with the first character and continues25until the first non-device node character.2627@retval a_pointer Pointer to the EFI device node.28@retval NULL if TextDeviceNode is NULL or there was insufficient memory.2930**/31typedef32EFI_DEVICE_PATH_PROTOCOL *33(EFIAPI *EFI_DEVICE_PATH_FROM_TEXT_NODE)(34IN CONST CHAR16 *TextDeviceNode35);3637/**38Convert text to the binary representation of a device node.3940@param TextDeviceNode TextDevicePath points to the text representation of a device41path. Conversion starts with the first character and continues42until the first non-device path character.4344@retval a_pointer Pointer to the allocated device path.45@retval NULL if TextDeviceNode is NULL or there was insufficient memory.4647**/48typedef49EFI_DEVICE_PATH_PROTOCOL *50(EFIAPI *EFI_DEVICE_PATH_FROM_TEXT_PATH)(51IN CONST CHAR16 *TextDevicePath52);5354///55/// This protocol converts text to device paths and device nodes.56///57typedef struct {58EFI_DEVICE_PATH_FROM_TEXT_NODE ConvertTextToDeviceNode;59EFI_DEVICE_PATH_FROM_TEXT_PATH ConvertTextToDevicePath;60} EFI_DEVICE_PATH_FROM_TEXT_PROTOCOL;6162extern EFI_GUID gEfiDevicePathFromTextProtocolGuid;6364#endif656667