]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Include/Library/BaseMemoryLib.h
MdePkg/BaseLib: Add safe string functions that convert str to value
[mirror_edk2.git] / MdePkg / Include / Library / BaseMemoryLib.h
index 0a543116890fcbe63fa6a647ac17ad38e9ac4a7a..0e565c15427ada29f788cb8c88b3826e55a98783 100644 (file)
@@ -5,7 +5,7 @@
   These functions should be used in place of coding your own loops to do equivalent common functions. \r
   This allows optimized library implementations to help increase performance. \r
 \r
-Copyright (c) 2006 - 2010, Intel Corporation.  All rights reserved<BR>\r
+Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials are licensed and made available under \r
 the terms and conditions of the BSD License that accompanies this distribution.  \r
 The full text of the license may be found at\r
@@ -443,4 +443,47 @@ ScanGuid (
   IN CONST GUID  *Guid\r
   );\r
 \r
+/**\r
+  Checks if the given GUID is a zero GUID.\r
+\r
+  This function checks whether the given GUID is a zero GUID. If the GUID is\r
+  identical to a zero GUID then TRUE is returned. Otherwise, FALSE is returned.\r
+\r
+  If Guid is NULL, then ASSERT().\r
+\r
+  @param  Guid        The pointer to a 128 bit GUID.\r
+\r
+  @retval TRUE        Guid is a zero GUID.\r
+  @retval FALSE       Guid is not a zero GUID.\r
+\r
+**/\r
+BOOLEAN\r
+EFIAPI\r
+IsZeroGuid (\r
+  IN CONST GUID  *Guid\r
+  );\r
+\r
+/**\r
+  Checks if the contents of a buffer are all zeros.\r
+\r
+  This function checks whether the contents of a buffer are all zeros. If the\r
+  contents are all zeros, return TRUE. Otherwise, return FALSE.\r
+\r
+  If Length > 0 and Buffer is NULL, then ASSERT().\r
+  If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().\r
+\r
+  @param  Buffer      The pointer to the buffer to be checked.\r
+  @param  Length      The size of the buffer (in bytes) to be checked.\r
+\r
+  @retval TRUE        Contents of the buffer are all zeros.\r
+  @retval FALSE       Contents of the buffer are not all zeros.\r
+\r
+**/\r
+BOOLEAN\r
+EFIAPI\r
+IsZeroBuffer (\r
+  IN CONST VOID  *Buffer,\r
+  IN UINTN       Length\r
+  );\r
+\r
 #endif\r