]> git.proxmox.com Git - mirror_edk2.git/blobdiff - DuetPkg/DxeIpl/SerialStatusCode.c
Update DebugLib to provide support for "err" command in the EFI Shell to adjust the...
[mirror_edk2.git] / DuetPkg / DxeIpl / SerialStatusCode.c
index 55373774482a1e0c36f4de6368fb67dfd336b972..e936db5b59016a8a0ebf0f04af4b60f170b70fe1 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
 \r
-Copyright (c) 2006, Intel Corporation                                                         \r
-All rights reserved. This program and the accompanying materials                          \r
+Copyright (c) 2006, 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
 http://opensource.org/licenses/bsd-license.php                                            \r
@@ -708,7 +708,7 @@ Returns:
     //\r
     AsciiSPrint (\r
       Buffer,\r
-      EFI_STATUS_CODE_DATA_MAX_SIZE,\r
+      sizeof (Buffer),\r
       "\nPEI_ASSERT!: %a (%d): %a\n",\r
       Filename,\r
       LineNumber,\r
@@ -720,23 +720,23 @@ Returns:
     //\r
     // Process PEI_DEBUG () macro to Serial\r
     //\r
-    AsciiBSPrint (Buffer, EFI_STATUS_CODE_DATA_MAX_SIZE, Format, Marker);\r
+    AsciiBSPrint (Buffer, sizeof (Buffer), Format, Marker);\r
 \r
   } else if ((CodeType & EFI_STATUS_CODE_TYPE_MASK) == EFI_ERROR_CODE) { \r
     //\r
     // Process Errors\r
     //\r
-    CharCount = AsciiSPrint (Buffer, EFI_STATUS_CODE_DATA_MAX_SIZE, "ERROR: C%x:V%x I%x", CodeType, Value, Instance);\r
+    CharCount = AsciiSPrint (Buffer, sizeof (Buffer), "ERROR: C%x:V%x I%x", CodeType, Value, Instance);\r
     //\r
     // Make sure we don't try to print values that weren't intended to be printed, especially NULL GUID pointers.\r
     //\r
     if (CallerId) {\r
-      CharCount += AsciiSPrint (&Buffer[CharCount - 1], (EFI_STATUS_CODE_DATA_MAX_SIZE - (sizeof(Buffer[0]) * CharCount)), " %g", CallerId);\r
+      CharCount += AsciiSPrint (&Buffer[CharCount - 1], (sizeof (Buffer) - (sizeof(Buffer[0]) * CharCount)), " %g", CallerId);\r
     }\r
     if (Data) {\r
-      CharCount += AsciiSPrint (&Buffer[CharCount - 1], (EFI_STATUS_CODE_DATA_MAX_SIZE - (sizeof(Buffer[0]) * CharCount)), " %x", Data);\r
+      CharCount += AsciiSPrint (&Buffer[CharCount - 1], (sizeof (Buffer) - (sizeof(Buffer[0]) * CharCount)), " %x", Data);\r
     }\r
-    CharCount += AsciiSPrint (&Buffer[CharCount - 1], (EFI_STATUS_CODE_DATA_MAX_SIZE - (sizeof(Buffer[0]) * CharCount)), "\n");\r
+    CharCount += AsciiSPrint (&Buffer[CharCount - 1], (sizeof (Buffer) - (sizeof(Buffer[0]) * CharCount)), "\n");\r
 \r
   }\r
 \r
@@ -788,7 +788,7 @@ Returns:
         //\r
         AsciiSPrint (\r
           Buffer,\r
-          EFI_STATUS_CODE_DATA_MAX_SIZE,\r
+          sizeof (Buffer),\r
           "%a:%a:%a:%d\n",\r
           SeverityToken,\r
           SubClassToken,\r