summaryrefslogtreecommitdiff
path: root/MdePkg/Library/UefiDevicePathLib
diff options
context:
space:
mode:
authorgikidy <gikidy@6f19259b-4bc3-4df7-8a09-765794883524>2008-11-26 03:26:37 +0000
committergikidy <gikidy@6f19259b-4bc3-4df7-8a09-765794883524>2008-11-26 03:26:37 +0000
commit3e5c323866e6f424f15ab7f59595d8929846354e (patch)
treec09161ee608fd3532880c7ed954b06285a245c51 /MdePkg/Library/UefiDevicePathLib
parent003c1db883a1e5c4011ded3fe17c2d9405292dd9 (diff)
downloadedk2-platforms-3e5c323866e6f424f15ab7f59595d8929846354e.tar.xz
Synchronize function comment in
MdePkg\Library\CpuLib.h, DebugLib.h,DevicePathLib.h, DxeServicesLib.h, DxeServicesTableLib.h, ExtractGuidedSectionLib.h, HobLib.h with the c file instance of this functions in MdePkg. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6727 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdePkg/Library/UefiDevicePathLib')
-rw-r--r--MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.c35
1 files changed, 24 insertions, 11 deletions
diff --git a/MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.c b/MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.c
index 708b48a088..8bdb598f88 100644
--- a/MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.c
+++ b/MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.c
@@ -50,8 +50,9 @@ GLOBAL_REMOVE_IF_UNREFERENCED CONST EFI_DEVICE_PATH_PROTOCOL mUefiDevicePathLib
DevicePath including the end of device path node. If DevicePath is NULL, then 0 is returned.
@param DevicePath A pointer to a device path data structure.
-
- @return The size of a device path in bytes.
+
+ @retval 0 If DevicePath is NULL.
+ @retval Others The size of a device path in bytes.
**/
UINTN
@@ -87,11 +88,14 @@ GetDevicePathSize (
DevicePath is NULL, then NULL is returned. If the memory is successfully allocated, then the
contents of DevicePath are copied to the newly allocated buffer, and a pointer to that buffer
is returned. Otherwise, NULL is returned.
+ The memory for the new device path is allocated from EFI boot services memory.
+ It is the responsibility of the caller to free the memory allocated.
@param DevicePath A pointer to a device path data structure.
- @return A pointer to the duplicated device path.
-
+ @retval NULL If DevicePath is NULL.
+ @retval Others A pointer to the duplicated device path.
+
**/
EFI_DEVICE_PATH_PROTOCOL *
EFIAPI
@@ -132,8 +136,10 @@ DuplicateDevicePath (
@param FirstDevicePath A pointer to a device path data structure.
@param SecondDevicePath A pointer to a device path data structure.
-
- @return A pointer to the new device path.
+
+ @retval NULL If there is not enough memory for the newly allocated buffer.
+ @retval Others A pointer to the new device path if success.
+ Or a copy an end-of-device-path if both FirstDevicePath and SecondDevicePath are NULL.
**/
EFI_DEVICE_PATH_PROTOCOL *
@@ -201,7 +207,11 @@ AppendDevicePath (
@param DevicePath A pointer to a device path data structure.
@param DevicePathNode A pointer to a single device path node.
- @return A pointer to the new device path.
+ @retval NULL If there is not enough memory for the new device path.
+ @retval Others A pointer to the new device path if success.
+ A copy of DevicePathNode followed by an end-of-device-path node
+ if both FirstDevicePath and SecondDevicePath are NULL.
+ A copy of an end-of-device-path node if both FirstDevicePath and SecondDevicePath are NULL.
**/
EFI_DEVICE_PATH_PROTOCOL *
@@ -381,8 +391,7 @@ GetNextDevicePathInstance (
}
/**
- Creates a copy of the current device path instance and returns a pointer to the next device path
- instance.
+ Creates a device node.
This function creates a new device node in a newly allocated buffer of size NodeLength and
initializes the device path node header with NodeType and NodeSubType. The new device path node
@@ -396,7 +405,7 @@ GetNextDevicePathInstance (
@param NodeSubType The device node sub-type for the new device node.
@param NodeLength The length of the new device node.
- @return A pointer to the new create device path.
+ @return The new device path.
**/
EFI_DEVICE_PATH_PROTOCOL *
@@ -502,13 +511,17 @@ DevicePathFromHandle (
handle Device. The allocated device path is returned. If Device is NULL or Device is a handle
that does not support the device path protocol, then a device path containing a single device
path node for the file specified by FileName is allocated and returned.
+ The memory for the new device path is allocated from EFI boot services memory. It is the responsibility
+ of the caller to free the memory allocated.
+
If FileName is NULL, then ASSERT().
+ If FileName is not aligned on a 16-bit boundary, then ASSERT().
@param Device A pointer to a device handle. This parameter is optional and
may be NULL.
@param FileName A pointer to a Null-terminated Unicode string.
- @return A pointer to the new created file device path.
+ @return The allocated device path.
**/
EFI_DEVICE_PATH_PROTOCOL *