]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/C/Common/EfiUtilityMsgs.c
License header updated to match correct format.
[mirror_edk2.git] / BaseTools / Source / C / Common / EfiUtilityMsgs.c
index 68cf02469e18a4de9ab9d6f4c4bb037a4f7254f5..438f338a915cefa0cea7e88c2d05b52ae5bf00ab 100644 (file)
@@ -1,7 +1,8 @@
 /** @file\r
+EFI tools utility functions to display warning, error, and informational messages\r
 \r
-Copyright (c) 2004 - 2008, Intel Corporation\r
-All rights reserved. This program and the accompanying materials\r
+Copyright (c) 2004 - 2014, 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
@@ -9,15 +10,6 @@ http://opensource.org/licenses/bsd-license.php
 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
 \r
-Module Name:\r
-\r
-  EfiUtilityMsgs.c\r
-\r
-Abstract:\r
-\r
-  EFI tools utility functions to display warning, error, and informational\r
-  messages.\r
-\r
 --*/\r
 \r
 #include <stdio.h>\r
@@ -44,18 +36,6 @@ STATIC UINT32 mMaxWarnings            = 0;
 STATIC UINT32 mMaxWarningsPlusErrors  = 0;\r
 STATIC INT8   mPrintLimitsSet         = 0;\r
 \r
-STATIC\r
-VOID\r
-PrintMessage (\r
-  CHAR8   *Type,\r
-  CHAR8   *FileName,\r
-  UINT32  LineNumber,\r
-  UINT32  MessageCode,\r
-  CHAR8   *Text,\r
-  CHAR8   *MsgFmt,\r
-  va_list List\r
-  );\r
-\r
 STATIC\r
 VOID\r
 PrintLimitExceeded (\r
@@ -151,12 +131,6 @@ Notes:
   va_start (List, MsgFmt);\r
   PrintMessage ("ERROR", FileName, LineNumber, MessageCode, Text, MsgFmt, List);\r
   va_end (List);\r
-  //\r
-  // Set status accordingly\r
-  //\r
-  if (mStatus < STATUS_ERROR) {\r
-    mStatus = STATUS_ERROR;\r
-  }\r
 }\r
 \r
 VOID\r
@@ -211,12 +185,6 @@ Returns:
   va_start (List, MsgFmt);\r
   PrintMessage ("ERROR", mSourceFileName, mSourceFileLineNum, MessageCode, Text, MsgFmt, List);\r
   va_end (List);\r
-  //\r
-  // Set status accordingly\r
-  //\r
-  if (mStatus < STATUS_ERROR) {\r
-    mStatus = STATUS_ERROR;\r
-  }\r
 }\r
 \r
 VOID\r
@@ -396,7 +364,6 @@ Returns:
   va_end (List);\r
 }\r
 \r
-STATIC\r
 VOID\r
 PrintMessage (\r
   CHAR8   *Type,\r
@@ -517,6 +484,15 @@ Notes:
         sprintf (Line, "%s", mUtilityName);\r
       }\r
     }\r
+\r
+    if (strcmp (Type, "ERROR") == 0) {\r
+      //\r
+      // Set status accordingly for ERROR information.\r
+      //\r
+      if (mStatus < STATUS_ERROR) {\r
+        mStatus = STATUS_ERROR;\r
+      }\r
+    }\r
   }\r
 \r
   //\r
@@ -545,6 +521,7 @@ Notes:
     vsprintf (Line2, MsgFmt, List);\r
     fprintf (stdout, "  %s\n", Line2);\r
   }\r
+\r
 }\r
 \r
 STATIC\r