]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Library/PeiMemoryLib/MemLibGuid.c
• BaseMemoryLib:
[mirror_edk2.git] / MdePkg / Library / PeiMemoryLib / MemLibGuid.c
index c54983c77b5436f21f95faf458bb3d8bb09aba7c..351e370c2cc8d63e028ad4a9fcffe7373bff7b76 100644 (file)
 **/\r
 \r
 /**\r
 **/\r
 \r
 /**\r
-  This function copies a source GUID to a destination GUID.\r
-\r
-  This function copies the contents of the 128-bit GUID specified by SourceGuid\r
-  to DestinationGuid, and returns DestinationGuid.\r
+  Copies a source GUID to a destination GUID.\r
 \r
 \r
+  This function copies the contents of the 128-bit GUID specified by SourceGuid to\r
+  DestinationGuid, and returns DestinationGuid.\r
   If DestinationGuid is NULL, then ASSERT().\r
   If SourceGuid is NULL, then ASSERT().\r
 \r
   If DestinationGuid is NULL, then ASSERT().\r
   If SourceGuid is NULL, then ASSERT().\r
 \r
-  @param  DestinationGuid Pointer to the destination GUID.\r
-  @param  SourceGuid Pointer to the source GUID.\r
+  @param  DestinationGuid   Pointer to the destination GUID.\r
+  @param  SourceGuid        Pointer to the source GUID.\r
 \r
 \r
-  @return DestinationGuid\r
+  @return DestinationGuid.\r
 \r
 **/\r
 GUID *\r
 EFIAPI\r
 CopyGuid (\r
 \r
 **/\r
 GUID *\r
 EFIAPI\r
 CopyGuid (\r
-  OUT     GUID                      *DestinationGuid,\r
-  IN      CONST GUID                *SourceGuid\r
+  OUT GUID       *DestinationGuid,\r
+  IN CONST GUID  *SourceGuid\r
   )\r
 {\r
   WriteUnaligned64 (\r
   )\r
 {\r
   WriteUnaligned64 (\r
@@ -57,27 +56,25 @@ CopyGuid (
 }\r
 \r
 /**\r
 }\r
 \r
 /**\r
-  Compares two GUIDs\r
-\r
-  This function compares Guid1 to Guid2. If the GUIDs are identical then TRUE\r
-  is returned. If there are any bit differences in the two GUIDs, then FALSE is\r
-  returned.\r
+  Compares two GUIDs.\r
 \r
 \r
+  This function compares Guid1 to Guid2.  If the GUIDs are identical then TRUE is returned.\r
+  If there are any bit differences in the two GUIDs, then FALSE is returned.\r
   If Guid1 is NULL, then ASSERT().\r
   If Guid2 is NULL, then ASSERT().\r
 \r
   If Guid1 is NULL, then ASSERT().\r
   If Guid2 is NULL, then ASSERT().\r
 \r
-  @param  Guid1 guid to compare\r
-  @param  Guid2 guid to compare\r
+  @param  Guid1       A pointer to a 128 bit GUID.\r
+  @param  Guid2       A pointer to a 128 bit GUID.\r
 \r
 \r
-  @retval TRUE  if Guid1 == Guid2\r
-  @retval FALSE if Guid1 != Guid2\r
+  @retval TRUE        Guid1 and Guid2 are identical.\r
+  @retval FALSE       Guid1 and Guid2 are not identical.\r
 \r
 **/\r
 BOOLEAN\r
 EFIAPI\r
 CompareGuid (\r
 \r
 **/\r
 BOOLEAN\r
 EFIAPI\r
 CompareGuid (\r
-  IN      CONST GUID                *Guid1,\r
-  IN      CONST GUID                *Guid2\r
+  IN CONST GUID  *Guid1,\r
+  IN CONST GUID  *Guid2\r
   )\r
 {\r
   return (BOOLEAN)(\r
   )\r
 {\r
   return (BOOLEAN)(\r
@@ -93,28 +90,27 @@ CompareGuid (
   in the target buffer.\r
 \r
   This function searches target the buffer specified by Buffer and Length from\r
   in the target buffer.\r
 \r
   This function searches target the buffer specified by Buffer and Length from\r
-  the lowest address to the highest address at 128-bit increments for the\r
-  128-bit GUID value that matches Guid. If a match is found, then a pointer to\r
-  the matching GUID in the target buffer is returned. If no match is found,\r
-  then NULL is returned. If Length is 0, then NULL is returned.\r
-\r
-  If Buffer is NULL, then ASSERT().\r
+  the lowest address to the highest address at 128-bit increments for the 128-bit\r
+  GUID value that matches Guid.  If a match is found, then a pointer to the matching\r
+  GUID in the target buffer is returned.  If no match is found, then NULL is returned.\r
+  If Length is 0, then NULL is returned.\r
+  If Length > 0 and Buffer is NULL, then ASSERT().\r
   If Buffer is not aligned on a 64-bit boundary, then ASSERT().\r
   If Buffer is not aligned on a 64-bit boundary, then ASSERT().\r
-  If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().\r
+  If Length is greater than (MAX_ADDRESS \96 Buffer + 1), then ASSERT(). \r
 \r
   @param  Buffer  Pointer to the target buffer to scan.\r
   @param  Length  Number of bytes in Buffer to scan.\r
   @param  Guid    Value to search for in the target buffer.\r
 \r
 \r
   @param  Buffer  Pointer to the target buffer to scan.\r
   @param  Length  Number of bytes in Buffer to scan.\r
   @param  Guid    Value to search for in the target buffer.\r
 \r
-  @return Pointer to the first occurrence.\r
-  @retval NULL  if Length == 0 or Guid was not found.\r
+  @return A pointer to the matching Guid in the target buffer or NULL otherwise.\r
+\r
 **/\r
 VOID *\r
 EFIAPI\r
 ScanGuid (\r
 **/\r
 VOID *\r
 EFIAPI\r
 ScanGuid (\r
-  IN      CONST VOID                *Buffer,\r
-  IN      UINTN                     Length,\r
-  IN      CONST GUID                *Guid\r
+  IN CONST VOID  *Buffer,\r
+  IN UINTN       Length,\r
+  IN CONST GUID  *Guid\r
   )\r
 {\r
   CONST GUID                        *GuidPtr;\r
   )\r
 {\r
   CONST GUID                        *GuidPtr;\r