]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Library/UefiDebugLibStdErr/DebugLib.c
Code scrub for the Debug library, PostCode library, Print library, and ExtractGuidedS...
[mirror_edk2.git] / MdePkg / Library / UefiDebugLibStdErr / DebugLib.c
index 84ba61175f81427cf0783ab62149d3b90a4e3e1c..a7d4d2829bdcac7a770532d7b87c853916183f19 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
-  UEFI Debug Library that uses PrintLib to send messages to STDERR.\r
+  UEFI Debug Lib that sends messages to the Standard Error Device in the EFI System Table.\r
 \r
-  Copyright (c) 2006 - 2007, Intel Corporation<BR>\r
+  Copyright (c) 2006 - 2008, 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
@@ -41,6 +41,7 @@
 \r
   @param  ErrorLevel  The error level of the debug message.\r
   @param  Format      Format string for the debug message to print.\r
+  @param  ...         The variable argument list.\r
 \r
 **/\r
 VOID\r
@@ -52,6 +53,7 @@ DebugPrint (
   )\r
 {\r
   CHAR16   Buffer[MAX_DEBUG_MESSAGE_LENGTH];\r
+  CHAR8    AsciiBuffer[MAX_DEBUG_MESSAGE_LENGTH];\r
   VA_LIST  Marker;\r
 \r
   //\r
@@ -70,7 +72,8 @@ DebugPrint (
   // Convert the DEBUG() message to a Unicode String\r
   //\r
   VA_START (Marker, Format);\r
-  UnicodeVSPrintAsciiFormat (Buffer, sizeof (Buffer), Format, Marker);\r
+  AsciiVSPrint (AsciiBuffer, sizeof (AsciiBuffer), Format, Marker);\r
+  AsciiStrToUnicodeStr (AsciiBuffer, Buffer);\r
   VA_END (Marker);\r
 \r
   //\r
@@ -114,11 +117,13 @@ DebugAssert (
   )\r
 {\r
   CHAR16  Buffer[MAX_DEBUG_MESSAGE_LENGTH];\r
+  CHAR8   AsciiBuffer[MAX_DEBUG_MESSAGE_LENGTH];\r
 \r
   //\r
   // Generate the ASSERT() message in Unicode format\r
   //\r
-  UnicodeSPrintAsciiFormat (Buffer, sizeof (Buffer), "ASSERT %s(%d): %s\n", FileName, LineNumber, Description);\r
+  AsciiSPrint (AsciiBuffer, sizeof (AsciiBuffer), "ASSERT %a(%d): %a\n", FileName, LineNumber, Description);\r
+  AsciiStrToUnicodeStr (AsciiBuffer, Buffer);\r
 \r
   //\r
   // Send the print string to the Standard Error device\r
@@ -152,7 +157,7 @@ DebugAssert (
   @param   Buffer  Pointer to the target buffer to fill with PcdDebugClearMemoryValue.\r
   @param   Length  Number of bytes in Buffer to fill with zeros PcdDebugClearMemoryValue. \r
 \r
-  @return  Buffer\r
+  @return  Buffer  Pointer to the target buffer filled with PcdDebugClearMemoryValue.\r
 \r
 **/\r
 VOID *\r
@@ -241,11 +246,11 @@ DebugCodeEnabled (
   \r
   Returns TRUE if DEBUG_CLEAR_MEMORY()macro is enabled.\r
 \r
-  This function returns TRUE if the DEBUG_PROPERTY_DEBUG_CLEAR_MEMORY_ENABLED bit of \r
+  This function returns TRUE if the DEBUG_PROPERTY_CLEAR_MEMORY_ENABLED bit of \r
   PcdDebugProperyMask is set.  Otherwise FALSE is returned.\r
 \r
-  @retval  TRUE    The DEBUG_PROPERTY_DEBUG_CLEAR_MEMORY_ENABLED bit of PcdDebugProperyMask is set.\r
-  @retval  FALSE   The DEBUG_PROPERTY_DEBUG_CLEAR_MEMORY_ENABLED bit of PcdDebugProperyMask is clear.\r
+  @retval  TRUE    The DEBUG_PROPERTY_CLEAR_MEMORY_ENABLED bit of PcdDebugProperyMask is set.\r
+  @retval  FALSE   The DEBUG_PROPERTY_CLEAR_MEMORY_ENABLED bit of PcdDebugProperyMask is clear.\r
 \r
 **/\r
 BOOLEAN\r