]> git.proxmox.com Git - mirror_edk2.git/blobdiff - IntelFrameworkModulePkg/Universal/StatusCode/Pei/SerialStatusCodeWorker.c
IntelFrameworkModulePkg: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / IntelFrameworkModulePkg / Universal / StatusCode / Pei / SerialStatusCodeWorker.c
index 24afa1f2d28ceeff20b88af97b3f7444e4379e95..560a7854f416ad7d2252c42bdf096c881562109b 100644 (file)
@@ -1,14 +1,8 @@
 /** @file\r
   Serial I/O status code reporting worker.\r
 \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
-  http://opensource.org/licenses/bsd-license.php\r
-\r
-  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+  Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>\r
+  SPDX-License-Identifier: BSD-2-Clause-Patent\r
 **/\r
 \r
 #include "StatusCodePei.h"\r
@@ -86,7 +80,7 @@ SerialStatusCodeReportWorker (
     CharCount = AsciiSPrint (\r
                   Buffer,\r
                   sizeof (Buffer),\r
-                  "ERROR: C%x:V%x I%x",\r
+                  "ERROR: C%08x:V%08x I%x",\r
                   CodeType,\r
                   Value,\r
                   Instance\r
@@ -122,11 +116,12 @@ SerialStatusCodeReportWorker (
     CharCount = AsciiSPrint (\r
                   Buffer,\r
                   sizeof (Buffer),\r
-                  "PROGRESS CODE: V%x I%x\n\r",\r
+                  "PROGRESS CODE: V%08x I%x\n\r",\r
                   Value,\r
                   Instance\r
                   );\r
-  } else if (CompareGuid (&Data->Type, &gEfiStatusCodeDataTypeStringGuid) &&\r
+  } else if (Data != NULL &&\r
+             CompareGuid (&Data->Type, &gEfiStatusCodeDataTypeStringGuid) &&\r
              ((EFI_STATUS_CODE_STRING_DATA *) Data)->StringType == EfiStringAscii) {\r
     //\r
     // EFI_STATUS_CODE_STRING_DATA\r
@@ -144,7 +139,7 @@ SerialStatusCodeReportWorker (
     CharCount = AsciiSPrint (\r
                   Buffer,\r
                   sizeof (Buffer),\r
-                  "Undefined: C%x:V%x I%x\n\r",\r
+                  "Undefined: C%08x:V%08x I%x\n\r",\r
                   CodeType,\r
                   Value,\r
                   Instance\r