FILE_GUID = B53DC524-6B98-4584-940B-8F1363DEF09E\r
MODULE_TYPE = PEIM\r
VERSION_STRING = 1.0\r
- LIBRARY_CLASS = PalCallLib \r
+ LIBRARY_CLASS = PalCallLib|PEI_CORE PEIM SEC\r
EDK_RELEASE_VERSION = 0x00020000\r
EFI_SPECIFICATION_VERSION = 0x00020000\r
\r
//\r
// Compute the size and add back in the size of the end device path structure\r
//\r
- return ((UINTN) DevicePath - (UINTN) Start) + sizeof (EFI_DEVICE_PATH_PROTOCOL);\r
+ return ((UINTN) DevicePath - (UINTN) Start) + EfiDevicePathNodeLength (DevicePath);\r
}\r
\r
/**\r
IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath\r
)\r
{\r
- EFI_DEVICE_PATH_PROTOCOL *NewDevicePath;\r
UINTN Size;\r
\r
//\r
//\r
// Allocate space for duplicate device path\r
//\r
- NewDevicePath = AllocateCopyPool (Size, DevicePath);\r
\r
- return NewDevicePath;\r
+ return AllocateCopyPool (Size, DevicePath);\r
}\r
\r
/**\r
//\r
Size1 = GetDevicePathSize (FirstDevicePath);\r
Size2 = GetDevicePathSize (SecondDevicePath);\r
- Size = Size1 + Size2 - sizeof (EFI_DEVICE_PATH_PROTOCOL);\r
+ Size = Size1 + Size2 - EFI_END_DEVICE_PATH_LENGTH;\r
\r
NewDevicePath = AllocatePool (Size);\r
\r
// Over write FirstDevicePath EndNode and do the copy\r
//\r
DevicePath2 = (EFI_DEVICE_PATH_PROTOCOL *) ((CHAR8 *) NewDevicePath +\r
- (Size1 - sizeof (EFI_DEVICE_PATH_PROTOCOL)));\r
+ (Size1 - EFI_END_DEVICE_PATH_LENGTH));\r
CopyMem (DevicePath2, SecondDevicePath, Size2);\r
}\r
\r
//\r
NodeLength = DevicePathNodeLength (DevicePathNode);\r
\r
- TempDevicePath = AllocatePool (NodeLength + sizeof (EFI_DEVICE_PATH_PROTOCOL));\r
+ TempDevicePath = AllocatePool (NodeLength + EFI_END_DEVICE_PATH_LENGTH);\r
if (TempDevicePath == NULL) {\r
return NULL;\r
}\r
@param NodeSubType The device node sub-type for the new device node.\r
@param NodeLength The length of the new device node.\r
\r
- @return The new device path.\r
+ @return A pointer to the new create device path.\r
\r
**/\r
EFI_DEVICE_PATH_PROTOCOL *\r
may be NULL.\r
@param FileName A pointer to a Null-terminated Unicode string.\r
\r
- @return The allocated device path.\r
+ @return A pointer to the new created file device path.\r
\r
**/\r
EFI_DEVICE_PATH_PROTOCOL *\r
#/** @file\r
-# Component description file for the entry point to a EFIDXE Drivers\r
+# Library instance implement the library class UefiDevicePathLib defined in Mde\r
+# library specification.\r
#\r
-# Library to abstract Framework extensions that conflict with UEFI 2.0 Specification\r
# Copyright (c) 2007, Intel Corporation\r
#\r
# All rights reserved. This program and the accompanying materials\r
/** @file\r
- UEFI Device Path Library.\r
+ Library instance that implement UEFI Device Path Library class based on protocol\r
+ gEfiDevicePathUtilitiesProtocolGuid.\r
\r
Copyright (c) 2006, Intel Corporation<BR>\r
All rights reserved. This program and the accompanying materials\r
#include <Library/BaseMemoryLib.h>\r
#include <Library/UefiBootServicesTableLib.h>\r
\r
-#include "UefiDevicePathLibInternal.h"\r
-\r
STATIC EFI_DEVICE_PATH_UTILITIES_PROTOCOL *mDevicePathUtilities = NULL;\r
\r
/**\r
@param NodeSubType The device node sub-type for the new device node.\r
@param NodeLength The length of the new device node.\r
\r
- @return The new device path.\r
+ @return A pointer to the new created file device path \r
\r
**/\r
EFI_DEVICE_PATH_PROTOCOL *\r
may be NULL.\r
@param FileName A pointer to a Null-terminated Unicode string.\r
\r
- @return The allocated device path.\r
+ @return A pointer to the new created file device path \r
\r
**/\r
EFI_DEVICE_PATH_PROTOCOL *\r
+++ /dev/null
-/** @file\r
- Internal Header file for UEFI Device Path Library.\r
-\r
- Copyright (c) 2006, Intel Corporation<BR>\r
- All rights reserved. This program and the accompanying materials\r
- are licensed and made available under the terms and conditions of the BSD License\r
- which accompanies this distribution. The full text of the license may be found at\r
- http://opensource.org/licenses/bsd-license.php\r
-\r
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-\r
-**/\r
-\r
-#ifndef _UEFI_DEVICEPATH_LIB_INTERNAL_H_\r
-#define _UEFI_DEVICEPATH_LIB_INTERNAL_H_\r
-\r
-\r
-/**\r
- The constructor function caches the pointer to DevicePathUtilites protocol.\r
- \r
- The constructor function locates DevicePathUtilities protocol from protocol database.\r
- It will ASSERT() if that operation fails and it will always return EFI_SUCCESS. \r
-\r
- @param ImageHandle The firmware allocated handle for the EFI image.\r
- @param SystemTable A pointer to the EFI System Table.\r
- \r
- @retval EFI_SUCCESS The constructor always returns EFI_SUCCESS.\r
-\r
-**/\r
-EFI_STATUS\r
-EFIAPI\r
-DevicePathLibConstructor (\r
- IN EFI_HANDLE ImageHandle,\r
- IN EFI_SYSTEM_TABLE *SystemTable\r
- );\r
-\r
-#endif\r