4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync/** @file
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Implementation file for Device Path Utilities Protocol
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncCopyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncThis program and the accompanying materials
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncare licensed and made available under the terms and conditions of the BSD License
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncwhich accompanies this distribution. The full text of the license may be found at
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsynchttp://opensource.org/licenses/bsd-license.php
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncTHE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncWITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync**/
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync#include "DevicePath.h"
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync/**
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Returns the size of a device path in bytes.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync This function returns the size, in bytes, of the device path data structure specified by
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync DevicePath including the end of device path node. If DevicePath is NULL, then 0 is returned.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param DevicePath A pointer to a device path data structure.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @return The size of a device path in bytes.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync**/
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncUINTN
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncEFIAPI
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncGetDevicePathSizeProtocolInterface (
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync )
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync{
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync return GetDevicePathSize (DevicePath);
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync}
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync/**
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Creates a new device path by appending a second device path to a first device path.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync This function allocates space for a new copy of the device path specified by DevicePath. If
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync DevicePath is NULL, then NULL is returned. If the memory is successfully allocated, then the
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync contents of DevicePath are copied to the newly allocated buffer, and a pointer to that buffer
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync is returned. Otherwise, NULL is returned.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param DevicePath A pointer to a device path data structure.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @return A pointer to the duplicated device path.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync**/
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncEFI_DEVICE_PATH_PROTOCOL *
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncEFIAPI
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncDuplicateDevicePathProtocolInterface (
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync )
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync{
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync return DuplicateDevicePath (DevicePath);
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync}
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync/**
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Creates a new device path by appending a second device path to a first device path.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync This function creates a new device path by appending a copy of SecondDevicePath to a copy of
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync FirstDevicePath in a newly allocated buffer. Only the end-of-device-path device node from
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync SecondDevicePath is retained. The newly created device path is returned.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If FirstDevicePath is NULL, then it is ignored, and a duplicate of SecondDevicePath is returned.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If SecondDevicePath is NULL, then it is ignored, and a duplicate of FirstDevicePath is returned.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If both FirstDevicePath and SecondDevicePath are NULL, then a copy of an end-of-device-path is
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync returned.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If there is not enough memory for the newly allocated buffer, then NULL is returned.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync The memory for the new device path is allocated from EFI boot services memory. It is the
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync responsibility of the caller to free the memory allocated.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param FirstDevicePath A pointer to a device path data structure.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param SecondDevicePath A pointer to a device path data structure.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @return A pointer to the new device path.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync**/
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncEFI_DEVICE_PATH_PROTOCOL *
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncEFIAPI
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncAppendDevicePathProtocolInterface (
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync IN CONST EFI_DEVICE_PATH_PROTOCOL *FirstDevicePath,
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync IN CONST EFI_DEVICE_PATH_PROTOCOL *SecondDevicePath
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync )
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync{
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync return AppendDevicePath (FirstDevicePath, SecondDevicePath);
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync}
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync/**
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Creates a new path by appending the device node to the device path.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync This function creates a new device path by appending a copy of the device node specified by
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync DevicePathNode to a copy of the device path specified by DevicePath in an allocated buffer.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync The end-of-device-path device node is moved after the end of the appended device node.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If DevicePathNode is NULL then a copy of DevicePath is returned.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If DevicePath is NULL then a copy of DevicePathNode, followed by an end-of-device path device
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync node is returned.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If both DevicePathNode and DevicePath are NULL then a copy of an end-of-device-path device node
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync is returned.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If there is not enough memory to allocate space for the new device path, then NULL is returned.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync The memory is allocated from EFI boot services memory. It is the responsibility of the caller to
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync free the memory allocated.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param DevicePath A pointer to a device path data structure.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param DevicePathNode A pointer to a single device path node.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @return A pointer to the new device path.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync**/
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncEFI_DEVICE_PATH_PROTOCOL *
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncEFIAPI
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncAppendDeviceNodeProtocolInterface (
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath,
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePathNode
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync )
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync{
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync return AppendDevicePathNode (DevicePath, DevicePathNode);
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync}
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync/**
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Creates a new device path by appending the specified device path instance to the specified device
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync path.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync This function creates a new device path by appending a copy of the device path instance specified
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync by DevicePathInstance to a copy of the device path specified by DevicePath in a allocated buffer.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync The end-of-device-path device node is moved after the end of the appended device path instance
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync and a new end-of-device-path-instance node is inserted between.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If DevicePath is NULL, then a copy if DevicePathInstance is returned.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If DevicePathInstance is NULL, then NULL is returned.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If there is not enough memory to allocate space for the new device path, then NULL is returned.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync The memory is allocated from EFI boot services memory. It is the responsibility of the caller to
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync free the memory allocated.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param DevicePath A pointer to a device path data structure.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param DevicePathInstance A pointer to a device path instance.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @return A pointer to the new device path.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync**/
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncEFI_DEVICE_PATH_PROTOCOL *
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncEFIAPI
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncAppendDevicePathInstanceProtocolInterface (
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath,
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePathInstance
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync )
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync{
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync return AppendDevicePathInstance (DevicePath, DevicePathInstance);
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync}
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync/**
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Creates a copy of the current device path instance and returns a pointer to the next device path
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync instance.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync This function creates a copy of the current device path instance. It also updates DevicePath to
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync point to the next device path instance in the device path (or NULL if no more) and updates Size
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync to hold the size of the device path instance copy.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If DevicePath is NULL, then NULL is returned.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If there is not enough memory to allocate space for the new device path, then NULL is returned.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync The memory is allocated from EFI boot services memory. It is the responsibility of the caller to
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync free the memory allocated.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If Size is NULL, then ASSERT().
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param DevicePath On input, this holds the pointer to the current device path
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync instance. On output, this holds the pointer to the next device
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync path instance or NULL if there are no more device path
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync instances in the device path pointer to a device path data
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync structure.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param Size On output, this holds the size of the device path instance, in
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync bytes or zero, if DevicePath is NULL.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @return A pointer to the current device path instance.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync**/
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncEFI_DEVICE_PATH_PROTOCOL *
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncEFIAPI
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncGetNextDevicePathInstanceProtocolInterface (
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync IN OUT EFI_DEVICE_PATH_PROTOCOL **DevicePath,
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync OUT UINTN *Size
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync )
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync{
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync return GetNextDevicePathInstance (DevicePath, Size);
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync}
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync/**
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Determines if a device path is single or multi-instance.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync This function returns TRUE if the device path specified by DevicePath is multi-instance.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Otherwise, FALSE is returned. If DevicePath is NULL, then FALSE is returned.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param DevicePath A pointer to a device path data structure.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @retval TRUE DevicePath is multi-instance.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @retval FALSE DevicePath is not multi-instance or DevicePath is NULL.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync**/
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncBOOLEAN
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncEFIAPI
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncIsDevicePathMultiInstanceProtocolInterface (
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync )
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync{
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync return IsDevicePathMultiInstance (DevicePath);
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync}
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync/**
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Creates a copy of the current device path instance and returns a pointer to the next device path
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync instance.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync This function creates a new device node in a newly allocated buffer of size NodeLength and
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync initializes the device path node header with NodeType and NodeSubType. The new device path node
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync is returned.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If NodeLength is smaller than a device path header, then NULL is returned.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If there is not enough memory to allocate space for the new device path, then NULL is returned.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync The memory is allocated from EFI boot services memory. It is the responsibility of the caller to
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync free the memory allocated.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param NodeType The device node type for the new device node.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param NodeSubType The device node sub-type for the new device node.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param NodeLength The length of the new device node.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @return The new device path.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync**/
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncEFI_DEVICE_PATH_PROTOCOL *
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncEFIAPI
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncCreateDeviceNodeProtocolInterface (
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync IN UINT8 NodeType,
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync IN UINT8 NodeSubType,
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync IN UINT16 NodeLength
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync )
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync{
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync return CreateDeviceNode (NodeType, NodeSubType, NodeLength);
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync}