EFI DEVICE PATH FROM TEXT PROTOCOL

From PhoenixWiki

Jump to: navigation, search

Convert text to device paths and device nodes.

Contents

GUID

#define EFI_DEVICE_PATH_FROM_TEXT_PROTOCOL_GUID \
  {0x5c99a21,0xc70f,0x4ad2,0x8a,0x5f,0x35,0xdf,0x33,0x43,0xf5, 0x1e}

Protocol Interface Structure

#include EFI_PROTOCOL_CONSUMER(DevicePathFromText)

extern EFI_GUID gEfiDevicePathFromTextProtocolGuid;
typedef struct _EFI_DEVICE_PATH_FROM_TEXT_PROTOCOL {
  EFI_DEVICE_PATH_FROM_TEXT_NODE ConvertTextToDevicNode;
  EFI_DEVICE_PATH_FROM_TEXT_PATH ConvertTextToDevicPath;
} EFI_DEVICE_PATH_FROM_TEXT_PROTOCOL;

Members

Member Description
ConvertTextToDeviceNode Converts text to a device node.
ConvertTextToDevicePath Converts text to a device path.

Description

The EFI_DEVICE_PATH_FROM_TEXT_PROTOCOL provides common utilities for converting text to device paths and device nodes.

ConvertTextToDeviceNode()

Convert text to the binary representation of a device node.

Prototype

typedef
EFI_DEVICE_PATH_PROTOCOL*
(EFIAPI *EFI_DEVICE_PATH_FROM_TEXT_NODE) (
  IN CONST CHAR16* TextDeviceNode,
  );

Parameters

Parameter Description
TextDeviceNode TextDeviceNode points to the text representation of a device node. Conversion starts with the first character and continues until the first non-device node character.

Description
This function converts text to its binary device node representation and copies it into an allocated buffer.

The memory is allocated from EFI boot services memory. It is the responsibility of the caller to free the memory allocated.

Returns
This function returns a pointer to the EFI device node or NULL if TextDeviceNode is NULL or there was insufficient memory.

ConvertTextToDevicePath()

Convert a text to its binary device path representation.

Prototype

typedef
EFI_DEVICE_PATH_PROTOCOL*
(EFIAPI *EFI_DEVICE_PATH_FROM_TEXT_PATH) (
  IN CONST CHAR16* TextDevicePath,
  );

Parameters

Parameter Description
TextDevicePath TextDevicePath points to the text representation of a device path. Conversion starts with the first character and continues until the first non-device path character.

Description
This function converts text to its binary device path representation and copies it into an allocated buffer.

The memory is allocated from EFI boot services memory. It is the responsibility of the caller to free the memory allocated.

Returns
This function returns a pointer to the allocated device path or NULL if TextDevicePath is NULL or there was insufficient memory.


Copyright (C) 2008 Phoenix Technologies Ltd. All Rights Reserved. Portions copyright (C) 2008 UEFI Forum, Inc. Used with permission

Personal tools