]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.c
Minor grammatical work--mostly adding periods. Items with ONLY period added did...
[mirror_edk2.git] / MdePkg / Library / UefiDevicePathLib / UefiDevicePathLib.c
index 69f9eb77b34d333f2d214e915b77323bffc5aaac..db065e4f3aefb01103544be8f45d80f7176e1b57 100644 (file)
@@ -8,7 +8,7 @@
   environment varibles. Multi-instance device paths should never be placed\r
   on a Handle.\r
 \r
-  Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>\r
   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
@@ -113,13 +113,15 @@ DevicePathNodeLength (
 /**\r
   Returns a pointer to the next node in a device path.\r
 \r
-  Returns a pointer to the device path node that follows the device path node specified by Node.\r
+  Returns a pointer to the device path node that follows the device path node \r
+  specified by Node.\r
 \r
   If Node is NULL, then ASSERT().\r
 \r
   @param  Node      A pointer to a device path node data structure.\r
 \r
-  @return a pointer to the device path node that follows the device path node specified by Node.\r
+  @return a pointer to the device path node that follows the device path node \r
+  specified by Node.\r
 \r
 **/\r
 EFI_DEVICE_PATH_PROTOCOL *\r
@@ -134,7 +136,8 @@ NextDevicePathNode (
 \r
 /**\r
   Determines if a device path node is an end node of a device path.\r
-  This includes nodes that are the end of a device path instance and nodes that are the end of an entire device path.\r
+  This includes nodes that are the end of a device path instance and nodes that \r
+  are the end of an entire device path.\r
 \r
   Determines if the device path node specified by Node is an end node of a device path.  \r
   This includes nodes that are the end of a device path instance and nodes that are the \r
@@ -145,8 +148,10 @@ NextDevicePathNode (
 \r
   @param  Node      A pointer to a device path node data structure.\r
 \r
-  @retval TRUE      The device path node specified by Node is an end node of a device path.\r
-  @retval FALSE     The device path node specified by Node is not an end node of a device path.\r
+  @retval TRUE      The device path node specified by Node is an end node of a \r
+                    device path.\r
+  @retval FALSE     The device path node specified by Node is not an end node of \r
+                    a device path.\r
   \r
 **/\r
 BOOLEAN\r
@@ -162,15 +167,18 @@ IsDevicePathEndType (
 /**\r
   Determines if a device path node is an end node of an entire device path.\r
 \r
-  Determines if a device path node specified by Node is an end node of an entire device path.\r
-  If Node represents the end of an entire device path, then TRUE is returned.  Otherwise, FALSE is returned.\r
+  Determines if a device path node specified by Node is an end node of an entire \r
+  device path. If Node represents the end of an entire device path, then TRUE is \r
+  returned.  Otherwise, FALSE is returned.\r
 \r
   If Node is NULL, then ASSERT().\r
 \r
   @param  Node      A pointer to a device path node data structure.\r
 \r
-  @retval TRUE      The device path node specified by Node is the end of an entire device path.\r
-  @retval FALSE     The device path node specified by Node is not the end of an entire device path.\r
+  @retval TRUE      The device path node specified by Node is the end of an entire \r
+                    device path.\r
+  @retval FALSE     The device path node specified by Node is not the end of an \r
+                    entire device path.\r
 \r
 **/\r
 BOOLEAN\r
@@ -186,15 +194,18 @@ IsDevicePathEnd (
 /**\r
   Determines if a device path node is an end node of a device path instance.\r
 \r
-  Determines if a device path node specified by Node is an end node of a device path instance.\r
-  If Node represents the end of a device path instance, then TRUE is returned.  Otherwise, FALSE is returned.\r
+  Determines if a device path node specified by Node is an end node of a device \r
+  path instance. If Node represents the end of a device path instance, then TRUE \r
+  is returned.  Otherwise, FALSE is returned.\r
 \r
   If Node is NULL, then ASSERT().\r
 \r
   @param  Node      A pointer to a device path node data structure.\r
 \r
-  @retval TRUE      The device path node specified by Node is the end of a device path instance.\r
-  @retval FALSE     The device path node specified by Node is not the end of a device path instance.\r
+  @retval TRUE      The device path node specified by Node is the end of a device \r
+                    path instance.\r
+  @retval FALSE     The device path node specified by Node is not the end of a \r
+                    device path instance.\r
 \r
 **/\r
 BOOLEAN\r
@@ -265,13 +276,14 @@ SetDevicePathEndNode (
 /**\r
   Returns the size of a device path in bytes.\r
 \r
-  This function returns the size, in bytes, of the device path data structure specified by\r
-  DevicePath including the end of device path node.  If DevicePath is NULL, then 0 is returned.\r
+  This function returns the size, in bytes, of the device path data structure \r
+  specified by DevicePath including the end of device path node.  If DevicePath \r
+  is NULL, then 0 is returned.\r
 \r
-  @param  DevicePath                 A pointer to a device path data structure.\r
+  @param  DevicePath  A pointer to a device path data structure.\r
   \r
-  @retval 0       If DevicePath is NULL.\r
-  @retval Others  The size of a device path in bytes.\r
+  @retval 0           If DevicePath is NULL.\r
+  @retval Others      The size of a device path in bytes.\r
 \r
 **/\r
 UINTN\r
@@ -303,17 +315,17 @@ GetDevicePathSize (
 /**\r
   Creates a new copy of an existing device path.\r
 \r
-  This function allocates space for a new copy of the device path specified by DevicePath.  If\r
-  DevicePath is NULL, then NULL is returned.  If the memory is successfully allocated, then the\r
-  contents of DevicePath are copied to the newly allocated buffer, and a pointer to that buffer\r
-  is returned.  Otherwise, NULL is returned.  \r
+  This function allocates space for a new copy of the device path specified by DevicePath.  \r
+  If DevicePath is NULL, then NULL is returned.  If the memory is successfully \r
+  allocated, then the contents of DevicePath are copied to the newly allocated \r
+  buffer, and a pointer to that buffer is returned.  Otherwise, NULL is returned.  \r
   The memory for the new device path is allocated from EFI boot services memory. \r
   It is the responsibility of the caller to free the memory allocated. \r
   \r
-  @param  DevicePath                 A pointer to a device path data structure.\r
+  @param  DevicePath    A pointer to a device path data structure.\r
 \r
-  @retval NULL    If DevicePath is NULL.\r
-  @retval Others  A pointer to the duplicated device path.\r
+  @retval NULL          If DevicePath is NULL.\r
+  @retval Others        A pointer to the duplicated device path.\r
   \r
 **/\r
 EFI_DEVICE_PATH_PROTOCOL *\r
@@ -342,16 +354,17 @@ DuplicateDevicePath (
 /**\r
   Creates a new device path by appending a second device path to a first device path.\r
 \r
-  This function creates a new device path by appending a copy of SecondDevicePath to a copy of\r
-  FirstDevicePath in a newly allocated buffer.  Only the end-of-device-path device node from\r
-  SecondDevicePath is retained. The newly created device path is returned.  \r
-  If FirstDevicePath is NULL, then it is ignored, and a duplicate of SecondDevicePath is returned.  \r
-  If SecondDevicePath is NULL, then it is ignored, and a duplicate of FirstDevicePath is returned.  \r
-  If both FirstDevicePath and SecondDevicePath are NULL, then a copy of an end-of-device-path is\r
-  returned.  \r
+  This function creates a new device path by appending a copy of SecondDevicePath \r
+  to a copy of FirstDevicePath in a newly allocated buffer.  Only the end-of-device-path \r
+  device node from SecondDevicePath is retained. The newly created device path is \r
+  returned. If FirstDevicePath is NULL, then it is ignored, and a duplicate of \r
+  SecondDevicePath is returned.  If SecondDevicePath is NULL, then it is ignored, \r
+  and a duplicate of FirstDevicePath is returned. If both FirstDevicePath and \r
+  SecondDevicePath are NULL, then a copy of an end-of-device-path is returned.  \r
+  \r
   If there is not enough memory for the newly allocated buffer, then NULL is returned.\r
-  The memory for the new device path is allocated from EFI boot services memory. It is the\r
-  responsibility of the caller to free the memory allocated.\r
+  The memory for the new device path is allocated from EFI boot services memory. \r
+  It is the responsibility of the caller to free the memory allocated.\r
 \r
   @param  FirstDevicePath            A pointer to a device path data structure.\r
   @param  SecondDevicePath           A pointer to a device path data structure.\r
@@ -411,17 +424,19 @@ AppendDevicePath (
 /**\r
   Creates a new path by appending the device node to the device path.\r
 \r
-  This function creates a new device path by appending a copy of the device node specified by\r
-  DevicePathNode to a copy of the device path specified by DevicePath in an allocated buffer.\r
-  The end-of-device-path device node is moved after the end of the appended device node.\r
+  This function creates a new device path by appending a copy of the device node \r
+  specified by DevicePathNode to a copy of the device path specified by DevicePath \r
+  in an allocated buffer. The end-of-device-path device node is moved after the \r
+  end of the appended device node.\r
   If DevicePathNode is NULL then a copy of DevicePath is returned.\r
-  If DevicePath is NULL then a copy of DevicePathNode, followed by an end-of-device path device\r
-  node is returned.\r
-  If both DevicePathNode and DevicePath are NULL then a copy of an end-of-device-path device node\r
-  is returned.\r
-  If there is not enough memory to allocate space for the new device path, then NULL is returned.  \r
-  The memory is allocated from EFI boot services memory. It is the responsibility of the caller to\r
-  free the memory allocated.\r
+  If DevicePath is NULL then a copy of DevicePathNode, followed by an end-of-device \r
+  path device node is returned.\r
+  If both DevicePathNode and DevicePath are NULL then a copy of an end-of-device-path \r
+  device node is returned.\r
+  If there is not enough memory to allocate space for the new device path, then \r
+  NULL is returned.  \r
+  The memory is allocated from EFI boot services memory. It is the responsibility \r
+  of the caller to free the memory allocated.\r
 \r
   @param  DevicePath                 A pointer to a device path data structure.\r
   @param  DevicePathNode             A pointer to a single device path node.\r
@@ -430,7 +445,8 @@ AppendDevicePath (
   @retval Others    A pointer to the new device path if success.\r
                     A copy of DevicePathNode followed by an end-of-device-path node \r
                     if both FirstDevicePath and SecondDevicePath are NULL.\r
-                    A copy of an end-of-device-path node if both FirstDevicePath and SecondDevicePath are NULL.\r
+                    A copy of an end-of-device-path node if both FirstDevicePath \r
+                    and SecondDevicePath are NULL.\r
 \r
 **/\r
 EFI_DEVICE_PATH_PROTOCOL *\r
@@ -477,15 +493,17 @@ AppendDevicePathNode (
   Creates a new device path by appending the specified device path instance to the specified device\r
   path.\r
  \r
-  This function creates a new device path by appending a copy of the device path instance specified\r
-  by DevicePathInstance to a copy of the device path secified by DevicePath in a allocated buffer.\r
-  The end-of-device-path device node is moved after the end of the appended device path instance\r
-  and a new end-of-device-path-instance node is inserted between. \r
+  This function creates a new device path by appending a copy of the device path \r
+  instance specified by DevicePathInstance to a copy of the device path specified \r
+  by DevicePath in a allocated buffer.\r
+  The end-of-device-path device node is moved after the end of the appended device \r
+  path instance and a new end-of-device-path-instance node is inserted between. \r
   If DevicePath is NULL, then a copy if DevicePathInstance is returned.\r
   If DevicePathInstance is NULL, then NULL is returned.\r
-  If there is not enough memory to allocate space for the new device path, then NULL is returned.  \r
-  The memory is allocated from EFI boot services memory. It is the responsibility of the caller to\r
-  free the memory allocated.\r
+  If there is not enough memory to allocate space for the new device path, then \r
+  NULL is returned.  \r
+  The memory is allocated from EFI boot services memory. It is the responsibility \r
+  of the caller to free the memory allocated.\r
   \r
   @param  DevicePath                 A pointer to a device path data structure.\r
   @param  DevicePathInstance         A pointer to a device path instance.\r
@@ -537,22 +555,25 @@ AppendDevicePathInstance (
   Creates a copy of the current device path instance and returns a pointer to the next device path\r
   instance.\r
 \r
-  This function creates a copy of the current device path instance. It also updates DevicePath to\r
-  point to the next device path instance in the device path (or NULL if no more) and updates Size\r
-  to hold the size of the device path instance copy.\r
+  This function creates a copy of the current device path instance. It also updates \r
+  DevicePath to point to the next device path instance in the device path (or NULL \r
+  if no more) and updates Size to hold the size of the device path instance copy.\r
   If DevicePath is NULL, then NULL is returned.\r
-  If there is not enough memory to allocate space for the new device path, then NULL is returned.  \r
-  The memory is allocated from EFI boot services memory. It is the responsibility of the caller to\r
-  free the memory allocated.\r
+  If there is not enough memory to allocate space for the new device path, then \r
+  NULL is returned.  \r
+  The memory is allocated from EFI boot services memory. It is the responsibility \r
+  of the caller to free the memory allocated.\r
   If Size is NULL, then ASSERT().\r
  \r
-  @param  DevicePath                 On input, this holds the pointer to the current device path\r
-                                     instance. On output, this holds the pointer to the next device\r
-                                     path instance or NULL if there are no more device path\r
-                                     instances in the device path pointer to a device path data\r
-                                     structure.\r
-  @param  Size                       On output, this holds the size of the device path instance, in\r
-                                     bytes or zero, if DevicePath is NULL.\r
+  @param  DevicePath                 On input, this holds the pointer to the current \r
+                                     device path instance. On output, this holds \r
+                                     the pointer to the next device path instance \r
+                                     or NULL if there are no more device path\r
+                                     instances in the device path pointer to a \r
+                                     device path data structure.\r
+  @param  Size                       On output, this holds the size of the device \r
+                                     path instance, in bytes or zero, if DevicePath \r
+                                     is NULL.\r
 \r
   @return A pointer to the current device path instance.\r
 \r
@@ -612,13 +633,14 @@ GetNextDevicePathInstance (
 /**\r
   Creates a device node.\r
 \r
-  This function creates a new device node in a newly allocated buffer of size NodeLength and\r
-  initializes the device path node header with NodeType and NodeSubType.  The new device path node\r
-  is returned.\r
+  This function creates a new device node in a newly allocated buffer of size \r
+  NodeLength and initializes the device path node header with NodeType and NodeSubType.  \r
+  The new device path node is returned.\r
   If NodeLength is smaller than a device path header, then NULL is returned.  \r
-  If there is not enough memory to allocate space for the new device path, then NULL is returned.  \r
-  The memory is allocated from EFI boot services memory. It is the responsibility of the caller to\r
-  free the memory allocated.\r
+  If there is not enough memory to allocate space for the new device path, then \r
+  NULL is returned.  \r
+  The memory is allocated from EFI boot services memory. It is the responsibility \r
+  of the caller to free the memory allocated.\r
 \r
   @param  NodeType                   The device node type for the new device node.\r
   @param  NodeSubType                The device node sub-type for the new device node.\r
@@ -657,13 +679,15 @@ CreateDeviceNode (
 /**\r
   Determines if a device path is single or multi-instance.\r
 \r
-  This function returns TRUE if the device path specified by DevicePath is multi-instance.\r
+  This function returns TRUE if the device path specified by DevicePath is\r
+  multi-instance.\r
   Otherwise, FALSE is returned.  If DevicePath is NULL, then FALSE is returned.\r
 \r
   @param  DevicePath                 A pointer to a device path data structure.\r
 \r
   @retval  TRUE                      DevicePath is multi-instance.\r
-  @retval  FALSE                     DevicePath is not multi-instance or DevicePath is NULL.\r
+  @retval  FALSE                     DevicePath is not multi-instance or DevicePath \r
+                                     is NULL.\r
 \r
 **/\r
 BOOLEAN\r
@@ -694,10 +718,12 @@ IsDevicePathMultiInstance (
 /**\r
   Retrieves the device path protocol from a handle.\r
 \r
-  This function returns the device path protocol from the handle specified by Handle.  If Handle is\r
-  NULL or Handle does not contain a device path protocol, then NULL is returned.\r
+  This function returns the device path protocol from the handle specified by Handle.  \r
+  If Handle is NULL or Handle does not contain a device path protocol, then NULL \r
+  is returned.\r
  \r
-  @param  Handle                     The handle from which to retrieve the device path protocol.\r
+  @param  Handle                     The handle from which to retrieve the device \r
+                                     path protocol.\r
 \r
   @return The device path protocol from the handle specified by Handle.\r
 \r
@@ -736,8 +762,8 @@ DevicePathFromHandle (
   If FileName is NULL, then ASSERT().\r
   If FileName is not aligned on a 16-bit boundary, then ASSERT().\r
 \r
-  @param  Device                     A pointer to a device handle.  This parameter is optional and\r
-                                     may be NULL.\r
+  @param  Device                     A pointer to a device handle.  This parameter \r
+                                     is optional and may be NULL.\r
   @param  FileName                   A pointer to a Null-terminated Unicode string.\r
 \r
   @return The allocated device path.\r