DevicePathToText.c revision 4fd606d1f5abe38e1f42c38de1d2e895166bd0f4
/** @file
DevicePathToText protocol as defined in the UEFI 2.0 specification.
Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
#include "DevicePath.h"
/**
Concatenates a formatted unicode string to allocated pool. The caller must
free the resulting buffer.
@param Str Tracks the allocated pool, size in use, and
amount of pool allocated.
@param Fmt The format string
@param ... Variable arguments based on the format string.
@return Allocated buffer with the formatted string printed in it.
The caller must free the allocated buffer. The buffer
allocation is not packed.
**/
CHAR16 *
CatPrint (
...
)
{
);
}
} else {
}
}
/**
Converts a PCI device path structure to its string representative.
@param Str The string representative of input device.
@param DevPath The input device path structure.
@param DisplayOnly If DisplayOnly is TRUE, then the shorter text representation
of the display node is used, where applicable. If DisplayOnly
is FALSE, then the longer text representation of the display node
is used.
@param AllowShortcuts If AllowShortcuts is TRUE, then the shortcut forms of text
representation for a device node can be used, where applicable.
**/
)
{
}
/**
Converts a PC Card device path structure to its string representative.
@param Str The string representative of input device.
@param DevPath The input device path structure.
@param DisplayOnly If DisplayOnly is TRUE, then the shorter text representation
of the display node is used, where applicable. If DisplayOnly
is FALSE, then the longer text representation of the display node
is used.
@param AllowShortcuts If AllowShortcuts is TRUE, then the shortcut forms of text
representation for a device node can be used, where applicable.
**/
)
{
}
/**
Converts a Memory Map device path structure to its string representative.
@param Str The string representative of input device.
@param DevPath The input device path structure.
@param DisplayOnly If DisplayOnly is TRUE, then the shorter text representation
of the display node is used, where applicable. If DisplayOnly
is FALSE, then the longer text representation of the display node
is used.
@param AllowShortcuts If AllowShortcuts is TRUE, then the shortcut forms of text
representation for a device node can be used, where applicable.
**/
)
{
CatPrint (
Str,
L"MemoryMapped(0x%x,0x%lx,0x%lx)",
);
}
/**
Converts a Vendor device path structure to its string representative.
@param Str The string representative of input device.
@param DevPath The input device path structure.
@param DisplayOnly If DisplayOnly is TRUE, then the shorter text representation
of the display node is used, where applicable. If DisplayOnly
is FALSE, then the longer text representation of the display node
is used.
@param AllowShortcuts If AllowShortcuts is TRUE, then the shortcut forms of text
representation for a device node can be used, where applicable.
**/
)
{
case HARDWARE_DEVICE_PATH:
Type = L"Hw";
break;
case MESSAGING_DEVICE_PATH:
Type = L"Msg";
if (AllowShortcuts) {
return ;
return ;
return ;
return ;
switch (FlowControlMap & 0x00000003) {
case 0:
break;
case 1:
break;
case 2:
break;
default:
break;
}
return ;
CatPrint (
Str,
L"SAS(0x%lx,0x%lx,0x%x,",
);
if ((Info & 0x0f) == 0) {
CatPrint (
Str,
L"%s,%s,%s,",
);
} else {
}
} else {
}
return ;
return ;
}
}
break;
case MEDIA_DEVICE_PATH:
Type = L"Media";
break;
default:
Type = L"?";
break;
}
if (DataLength != 0) {
}
}
}
/**
Converts a Controller device path structure to its string representative.
@param Str The string representative of input device.
@param DevPath The input device path structure.
@param DisplayOnly If DisplayOnly is TRUE, then the shorter text representation
of the display node is used, where applicable. If DisplayOnly
is FALSE, then the longer text representation of the display node
is used.
@param AllowShortcuts If AllowShortcuts is TRUE, then the shortcut forms of text
representation for a device node can be used, where applicable.
**/
)
{
CatPrint (
Str,
L"Ctrl(0x%x)",
);
}
/**
Converts a ACPI device path structure to its string representative.
@param Str The string representative of input device.
@param DevPath The input device path structure.
@param DisplayOnly If DisplayOnly is TRUE, then the shorter text representation
of the display node is used, where applicable. If DisplayOnly
is FALSE, then the longer text representation of the display node
is used.
@param AllowShortcuts If AllowShortcuts is TRUE, then the shortcut forms of text
representation for a device node can be used, where applicable.
**/
)
{
case 0x0a03:
break;
case 0x0a08:
break;
case 0x0604:
break;
case 0x0301:
break;
case 0x0501:
break;
case 0x0401:
break;
default:
break;
}
} else {
}
}
/**
Converts EISA identification to string.
@param EisaId The input EISA identification.
@param Text A pointer to the output string.
**/
)
{
//
//UnicodeSPrint ("%X", 0x0a03) => "0000000000000A03"
//
Text,
L"%c%c%c%s",
);
}
/**
Converts a ACPI extended HID device path structure to its string representative.
@param Str The string representative of input device.
@param DevPath The input device path structure.
@param DisplayOnly If DisplayOnly is TRUE, then the shorter text representation
of the display node is used, where applicable. If DisplayOnly
is FALSE, then the longer text representation of the display node
is used.
@param AllowShortcuts If AllowShortcuts is TRUE, then the shortcut forms of text
representation for a device node can be used, where applicable.
**/
)
{
//
// use AcpiExp()
//
CatPrint (
Str,
L"AcpiExp(%s,%s,%a)",
);
} else {
if (AllowShortcuts) {
//
// display only
//
} else {
}
} else {
}
} else {
}
} else {
CatPrint (
Str,
L"AcpiEx(%s,%s,0x%x,%a,%a,%a)",
);
}
}
}
/**
Converts a ACPI address device path structure to its string representative.
@param Str The string representative of input device.
@param DevPath The input device path structure.
@param DisplayOnly If DisplayOnly is TRUE, then the shorter text representation
of the display node is used, where applicable. If DisplayOnly
is FALSE, then the longer text representation of the display node
is used.
@param AllowShortcuts If AllowShortcuts is TRUE, then the shortcut forms of text
representation for a device node can be used, where applicable.
**/
)
{
}
}
/**
Converts a ATAPI device path structure to its string representative.
@param Str The string representative of input device.
@param DevPath The input device path structure.
@param DisplayOnly If DisplayOnly is TRUE, then the shorter text representation
of the display node is used, where applicable. If DisplayOnly
is FALSE, then the longer text representation of the display node
is used.
@param AllowShortcuts If AllowShortcuts is TRUE, then the shortcut forms of text
representation for a device node can be used, where applicable.
**/
)
{
if (DisplayOnly) {
} else {
CatPrint (
Str,
L"Ata(%s,%s,0x%x)",
);
}
}
/**
Converts a SCSI device path structure to its string representative.
@param Str The string representative of input device.
@param DevPath The input device path structure.
@param DisplayOnly If DisplayOnly is TRUE, then the shorter text representation
of the display node is used, where applicable. If DisplayOnly
is FALSE, then the longer text representation of the display node
is used.
@param AllowShortcuts If AllowShortcuts is TRUE, then the shortcut forms of text
representation for a device node can be used, where applicable.
**/
)
{
}
/**
Converts a Fibre device path structure to its string representative.
@param Str The string representative of input device.
@param DevPath The input device path structure.
@param DisplayOnly If DisplayOnly is TRUE, then the shorter text representation
of the display node is used, where applicable. If DisplayOnly
is FALSE, then the longer text representation of the display node
is used.
@param AllowShortcuts If AllowShortcuts is TRUE, then the shortcut forms of text
representation for a device node can be used, where applicable.
**/
)
{
}
/**
Converts a FibreEx device path structure to its string representative.
@param Str The string representative of input device.
@param DevPath The input device path structure.
@param DisplayOnly If DisplayOnly is TRUE, then the shorter text representation
of the display node is used, where applicable. If DisplayOnly
is FALSE, then the longer text representation of the display node
is used.
@param AllowShortcuts If AllowShortcuts is TRUE, then the shortcut forms of text
representation for a device node can be used, where applicable.
**/
)
{
}
}
}
/**
Converts a Sas Ex device path structure to its string representative.
@param Str The string representative of input device.
@param DevPath The input device path structure.
@param DisplayOnly If DisplayOnly is TRUE, then the shorter text representation
of the display node is used, where applicable. If DisplayOnly
is FALSE, then the longer text representation of the display node
is used.
@param AllowShortcuts If AllowShortcuts is TRUE, then the shortcut forms of text
representation for a device node can be used, where applicable.
**/
)
{
}
}
CatPrint (
Str,
L"%s,%s,%s,",
);
} else {
}
} else {
}
return ;
}
/**
Converts a 1394 device path structure to its string representative.
@param Str The string representative of input device.
@param DevPath The input device path structure.
@param DisplayOnly If DisplayOnly is TRUE, then the shorter text representation
of the display node is used, where applicable. If DisplayOnly
is FALSE, then the longer text representation of the display node
is used.
@param AllowShortcuts If AllowShortcuts is TRUE, then the shortcut forms of text
representation for a device node can be used, where applicable.
**/
)
{
//
// Guid has format of IEEE-EUI64
//
}
/**
Converts a USB device path structure to its string representative.
@param Str The string representative of input device.
@param DevPath The input device path structure.
@param DisplayOnly If DisplayOnly is TRUE, then the shorter text representation
of the display node is used, where applicable. If DisplayOnly
is FALSE, then the longer text representation of the display node
is used.
@param AllowShortcuts If AllowShortcuts is TRUE, then the shortcut forms of text
representation for a device node can be used, where applicable.
**/
)
{
}
/**
Converts a USB WWID device path structure to its string representative.
@param Str The string representative of input device.
@param DevPath The input device path structure.
@param DisplayOnly If DisplayOnly is TRUE, then the shorter text representation
of the display node is used, where applicable. If DisplayOnly
is FALSE, then the longer text representation of the display node
is used.
@param AllowShortcuts If AllowShortcuts is TRUE, then the shortcut forms of text
representation for a device node can be used, where applicable.
**/
)
{
Length = (UINT16) ((DevicePathNodeLength ((EFI_DEVICE_PATH_PROTOCOL *) UsbWWId) - sizeof (USB_WWID_DEVICE_PATH)) / sizeof (CHAR16));
//
// In case no NULL terminator in SerialNumber, create a new one with NULL terminator
//
}
CatPrint (
Str,
L"UsbWwid(0x%x,0x%x,0x%x,\"%s\")",
);
}
/**
Converts a Logic Unit device path structure to its string representative.
@param Str The string representative of input device.
@param DevPath The input device path structure.
@param DisplayOnly If DisplayOnly is TRUE, then the shorter text representation
of the display node is used, where applicable. If DisplayOnly
is FALSE, then the longer text representation of the display node
is used.
@param AllowShortcuts If AllowShortcuts is TRUE, then the shortcut forms of text
representation for a device node can be used, where applicable.
**/
)
{
}
/**
Converts a USB class device path structure to its string representative.
@param Str The string representative of input device.
@param DevPath The input device path structure.
@param DisplayOnly If DisplayOnly is TRUE, then the shorter text representation
of the display node is used, where applicable. If DisplayOnly
is FALSE, then the longer text representation of the display node
is used.
@param AllowShortcuts If AllowShortcuts is TRUE, then the shortcut forms of text
representation for a device node can be used, where applicable.
**/
)
{
switch (UsbClass->DeviceClass) {
case USB_CLASS_AUDIO:
break;
case USB_CLASS_CDCCONTROL:
break;
case USB_CLASS_HID:
break;
case USB_CLASS_IMAGE:
break;
case USB_CLASS_PRINTER:
break;
case USB_CLASS_MASS_STORAGE:
break;
case USB_CLASS_HUB:
break;
case USB_CLASS_CDCDATA:
break;
case USB_CLASS_SMART_CARD:
break;
case USB_CLASS_VIDEO:
break;
case USB_CLASS_DIAGNOSTIC:
break;
case USB_CLASS_WIRELESS:
break;
default:
break;
}
if (IsKnownSubClass) {
CatPrint (
Str,
L"(0x%x,0x%x,0x%x,0x%x)",
);
return;
}
CatPrint (
Str,
L"UsbDeviceFirmwareUpdate(0x%x,0x%x,0x%x)",
);
return;
CatPrint (
Str,
L"UsbIrdaBridge(0x%x,0x%x,0x%x)",
);
return;
CatPrint (
Str,
L"UsbTestAndMeasurement(0x%x,0x%x,0x%x)",
);
return;
}
}
CatPrint (
Str,
L"UsbClass(0x%x,0x%x,0x%x,0x%x,0x%x)",
);
}
/**
Converts a SATA device path structure to its string representative.
@param Str The string representative of input device.
@param DevPath The input device path structure.
@param DisplayOnly If DisplayOnly is TRUE, then the shorter text representation
of the display node is used, where applicable. If DisplayOnly
is FALSE, then the longer text representation of the display node
is used.
@param AllowShortcuts If AllowShortcuts is TRUE, then the shortcut forms of text
representation for a device node can be used, where applicable.
**/
)
{
CatPrint (
Str,
L"Sata(0x%x,0x%x)",
);
} else {
CatPrint (
Str,
L"Sata(0x%x,0x%x,0x%x)",
);
}
}
/**
Converts a I20 device path structure to its string representative.
@param Str The string representative of input device.
@param DevPath The input device path structure.
@param DisplayOnly If DisplayOnly is TRUE, then the shorter text representation
of the display node is used, where applicable. If DisplayOnly
is FALSE, then the longer text representation of the display node
is used.
@param AllowShortcuts If AllowShortcuts is TRUE, then the shortcut forms of text
representation for a device node can be used, where applicable.
**/
)
{
}
/**
Converts a MAC address device path structure to its string representative.
@param Str The string representative of input device.
@param DevPath The input device path structure.
@param DisplayOnly If DisplayOnly is TRUE, then the shorter text representation
of the display node is used, where applicable. If DisplayOnly
is FALSE, then the longer text representation of the display node
is used.
@param AllowShortcuts If AllowShortcuts is TRUE, then the shortcut forms of text
representation for a device node can be used, where applicable.
**/
)
{
HwAddressSize = sizeof (EFI_MAC_ADDRESS);
HwAddressSize = 6;
}
}
}
/**
Converts network protocol string to its text representation.
@param Str The string representative of input device.
@param Protocol The network protocol ID.
**/
)
{
if (Protocol == RFC_1700_TCP_PROTOCOL) {
} else if (Protocol == RFC_1700_UDP_PROTOCOL) {
} else {
}
}
/**
Converts a IPv4 device path structure to its string representative.
@param Str The string representative of input device.
@param DevPath The input device path structure.
@param DisplayOnly If DisplayOnly is TRUE, then the shorter text representation
of the display node is used, where applicable. If DisplayOnly
is FALSE, then the longer text representation of the display node
is used.
@param AllowShortcuts If AllowShortcuts is TRUE, then the shortcut forms of text
representation for a device node can be used, where applicable.
**/
)
{
if (DisplayOnly) {
CatPrint (
Str,
L"IPv4(%d.%d.%d.%d)",
);
return ;
}
CatPrint (
Str,
L"IPv4(%d.%d.%d.%d,",
);
Str,
);
CatPrint (
Str,
L",%s,%d.%d.%d.%d",
);
CatPrint (
Str,
L",%d.%d.%d.%d,%d.%d.%d.%d",
);
}
}
/**
Converts a IPv6 device path structure to its string representative.
@param Str The string representative of input device.
@param DevPath The input device path structure.
@param DisplayOnly If DisplayOnly is TRUE, then the shorter text representation
of the display node is used, where applicable. If DisplayOnly
is FALSE, then the longer text representation of the display node
is used.
@param AllowShortcuts If AllowShortcuts is TRUE, then the shortcut forms of text
representation for a device node can be used, where applicable.
**/
)
{
if (DisplayOnly) {
CatPrint (
Str,
L"IPv6(%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x)",
);
return ;
}
CatPrint (
Str,
L"IPv6(%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x,",
);
Str,
);
switch (IPDevPath->IpAddressOrigin) {
case 0:
break;
case 1:
break;
default:
break;
}
CatPrint (
Str,
L",%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x",
);
CatPrint (
Str,
L",0x%x,%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x",
);
}
}
/**
Converts an Infini Band device path structure to its string representative.
@param Str The string representative of input device.
@param DevPath The input device path structure.
@param DisplayOnly If DisplayOnly is TRUE, then the shorter text representation
of the display node is used, where applicable. If DisplayOnly
is FALSE, then the longer text representation of the display node
is used.
@param AllowShortcuts If AllowShortcuts is TRUE, then the shortcut forms of text
representation for a device node can be used, where applicable.
**/
)
{
CatPrint (
Str,
L"Infiniband(0x%x,%g,0x%lx,0x%lx,0x%lx)",
);
}
/**
Converts a UART device path structure to its string representative.
@param Str The string representative of input device.
@param DevPath The input device path structure.
@param DisplayOnly If DisplayOnly is TRUE, then the shorter text representation
of the display node is used, where applicable. If DisplayOnly
is FALSE, then the longer text representation of the display node
is used.
@param AllowShortcuts If AllowShortcuts is TRUE, then the shortcut forms of text
representation for a device node can be used, where applicable.
**/
)
{
case 0:
Parity = 'D';
break;
case 1:
Parity = 'N';
break;
case 2:
Parity = 'E';
break;
case 3:
Parity = 'O';
break;
case 4:
Parity = 'M';
break;
case 5:
Parity = 'S';
break;
default:
Parity = 'x';
break;
}
} else {
}
} else {
}
case 0:
break;
case 1:
break;
case 2:
break;
case 3:
break;
default:
break;
}
}
/**
Converts an iSCSI device path structure to its string representative.
@param Str The string representative of input device.
@param DevPath The input device path structure.
@param DisplayOnly If DisplayOnly is TRUE, then the shorter text representation
of the display node is used, where applicable. If DisplayOnly
is FALSE, then the longer text representation of the display node
is used.
@param AllowShortcuts If AllowShortcuts is TRUE, then the shortcut forms of text
representation for a device node can be used, where applicable.
**/
)
{
CatPrint (
Str,
L"iSCSI(%a,0x%x,0x%lx,",
);
} else {
}
}
/**
Converts a VLAN device path structure to its string representative.
@param Str The string representative of input device.
@param DevPath The input device path structure.
@param DisplayOnly If DisplayOnly is TRUE, then the shorter text representation
of the display node is used, where applicable. If DisplayOnly
is FALSE, then the longer text representation of the display node
is used.
@param AllowShortcuts If AllowShortcuts is TRUE, then the shortcut forms of text
representation for a device node can be used, where applicable.
**/
)
{
}
/**
Converts a Hard drive device path structure to its string representative.
@param Str The string representative of input device.
@param DevPath The input device path structure.
@param DisplayOnly If DisplayOnly is TRUE, then the shorter text representation
of the display node is used, where applicable. If DisplayOnly
is FALSE, then the longer text representation of the display node
is used.
@param AllowShortcuts If AllowShortcuts is TRUE, then the shortcut forms of text
representation for a device node can be used, where applicable.
**/
)
{
switch (Hd->SignatureType) {
case SIGNATURE_TYPE_MBR:
CatPrint (
Str,
L"HD(%d,%s,0x%08x,",
L"MBR",
);
break;
case SIGNATURE_TYPE_GUID:
CatPrint (
Str,
L"HD(%d,%s,%g,",
L"GPT",
);
break;
default:
CatPrint (
Str,
L"HD(%d,%d,0,",
);
break;
}
}
/**
Converts a CDROM device path structure to its string representative.
@param Str The string representative of input device.
@param DevPath The input device path structure.
@param DisplayOnly If DisplayOnly is TRUE, then the shorter text representation
of the display node is used, where applicable. If DisplayOnly
is FALSE, then the longer text representation of the display node
is used.
@param AllowShortcuts If AllowShortcuts is TRUE, then the shortcut forms of text
representation for a device node can be used, where applicable.
**/
)
{
if (DisplayOnly) {
return ;
}
}
/**
Converts a File device path structure to its string representative.
@param Str The string representative of input device.
@param DevPath The input device path structure.
@param DisplayOnly If DisplayOnly is TRUE, then the shorter text representation
of the display node is used, where applicable. If DisplayOnly
is FALSE, then the longer text representation of the display node
is used.
@param AllowShortcuts If AllowShortcuts is TRUE, then the shortcut forms of text
representation for a device node can be used, where applicable.
**/
)
{
}
/**
Converts a Media protocol device path structure to its string representative.
@param Str The string representative of input device.
@param DevPath The input device path structure.
@param DisplayOnly If DisplayOnly is TRUE, then the shorter text representation
of the display node is used, where applicable. If DisplayOnly
is FALSE, then the longer text representation of the display node
is used.
@param AllowShortcuts If AllowShortcuts is TRUE, then the shortcut forms of text
representation for a device node can be used, where applicable.
**/
)
{
}
/**
Converts a Firmware Volume device path structure to its string representative.
@param Str The string representative of input device.
@param DevPath The input device path structure.
@param DisplayOnly If DisplayOnly is TRUE, then the shorter text representation
of the display node is used, where applicable. If DisplayOnly
is FALSE, then the longer text representation of the display node
is used.
@param AllowShortcuts If AllowShortcuts is TRUE, then the shortcut forms of text
representation for a device node can be used, where applicable.
**/
)
{
}
/**
Converts a Firmware Volume File device path structure to its string representative.
@param Str The string representative of input device.
@param DevPath The input device path structure.
@param DisplayOnly If DisplayOnly is TRUE, then the shorter text representation
of the display node is used, where applicable. If DisplayOnly
is FALSE, then the longer text representation of the display node
is used.
@param AllowShortcuts If AllowShortcuts is TRUE, then the shortcut forms of text
representation for a device node can be used, where applicable.
**/
)
{
}
/**
Converts a Relative Offset device path structure to its string representative.
@param Str The string representative of input device.
@param DevPath The input device path structure.
@param DisplayOnly If DisplayOnly is TRUE, then the shorter text representation
of the display node is used, where applicable. If DisplayOnly
is FALSE, then the longer text representation of the display node
is used.
@param AllowShortcuts If AllowShortcuts is TRUE, then the shortcut forms of text
representation for a device node can be used, where applicable.
**/
)
{
CatPrint (
Str,
L"Offset(0x%lx,0x%lx)",
);
}
/**
Converts a BIOS Boot Specification device path structure to its string representative.
@param Str The string representative of input device.
@param DevPath The input device path structure.
@param DisplayOnly If DisplayOnly is TRUE, then the shorter text representation
of the display node is used, where applicable. If DisplayOnly
is FALSE, then the longer text representation of the display node
is used.
@param AllowShortcuts If AllowShortcuts is TRUE, then the shortcut forms of text
representation for a device node can be used, where applicable.
**/
)
{
switch (Bbs->DeviceType) {
case BBS_TYPE_FLOPPY:
Type = L"Floppy";
break;
case BBS_TYPE_HARDDRIVE:
Type = L"HD";
break;
case BBS_TYPE_CDROM:
Type = L"CDROM";
break;
case BBS_TYPE_PCMCIA:
Type = L"PCMCIA";
break;
case BBS_TYPE_USB:
Type = L"USB";
break;
Type = L"Network";
break;
default:
break;
}
} else {
}
if (DisplayOnly) {
return ;
}
}
/**
Converts an End-of-Device-Path structure to its string representative.
@param Str The string representative of input device.
@param DevPath The input device path structure.
@param DisplayOnly If DisplayOnly is TRUE, then the shorter text representation
of the display node is used, where applicable. If DisplayOnly
is FALSE, then the longer text representation of the display node
is used.
@param AllowShortcuts If AllowShortcuts is TRUE, then the shortcut forms of text
representation for a device node can be used, where applicable.
**/
)
{
}
/**
Converts an unknown device path structure to its string representative.
@param Str The string representative of input device.
@param DevPath The input device path structure.
@param DisplayOnly If DisplayOnly is TRUE, then the shorter text representation
of the display node is used, where applicable. If DisplayOnly
is FALSE, then the longer text representation of the display node
is used.
@param AllowShortcuts If AllowShortcuts is TRUE, then the shortcut forms of text
representation for a device node can be used, where applicable.
**/
)
{
}
{0, 0, NULL}
};
/**
Converts a device node to its string representation.
@param DeviceNode A Pointer to the device node to be converted.
@param DisplayOnly If DisplayOnly is TRUE, then the shorter text representation
of the display node is used, where applicable. If DisplayOnly
is FALSE, then the longer text representation of the display node
is used.
@param AllowShortcuts If AllowShortcuts is TRUE, then the shortcut forms of text
representation for a device node can be used, where applicable.
@return A pointer to the allocated text representation of the device node or NULL if DeviceNode
is NULL or there was insufficient memory.
**/
CHAR16 *
)
{
if (DeviceNode == NULL) {
return NULL;
}
//
// Process the device path node
//
) {
break;
}
}
//
// If not found, use a generic function
//
}
//
// Print this node
//
}
/**
Converts a device path to its text representation.
@param DevicePath A Pointer to the device to be converted.
@param DisplayOnly If DisplayOnly is TRUE, then the shorter text representation
of the display node is used, where applicable. If DisplayOnly
is FALSE, then the longer text representation of the display node
is used.
@param AllowShortcuts If AllowShortcuts is TRUE, then the shortcut forms of text
representation for a device node can be used, where applicable.
@return A pointer to the allocated text representation of the device path or
NULL if DeviceNode is NULL or there was insufficient memory.
**/
CHAR16 *
)
{
if (DevicePath == NULL) {
return NULL;
}
//
// Process each device path node
//
while (!IsDevicePathEnd (DevPathNode)) {
//
// Find the handler to dump this device path node
//
) {
break;
}
}
//
// If not found, use a generic function
//
if (!DumpNode) {
}
//
// Put a path separator in if needed
//
}
}
//
// Print this node of the device path
//
//
// Next device path node
//
}
return AllocateZeroPool (sizeof (CHAR16));
} else {
}
}