]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/C/Common/EfiUtilityMsgs.c
BaseTools: Update Gensec to set PROCESSING_REQUIRED value
[mirror_edk2.git] / BaseTools / Source / C / Common / EfiUtilityMsgs.c
index 0e7608d1cfbd2d5218442b4b23521153e0d4c73b..7b4c2310ca9fd2c974fe6d4ba370f89e056ca43d 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 - 2016, 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
@@ -459,14 +451,16 @@ Notes:
     //\r
     time (&CurrentTime);\r
     NewTime = localtime (&CurrentTime);\r
-    fprintf (stdout, "%04d-%02d-%02d %02d:%02d:%02d",\r
-                     NewTime->tm_year + 1900,\r
-                     NewTime->tm_mon + 1,\r
-                     NewTime->tm_mday,\r
-                     NewTime->tm_hour,\r
-                     NewTime->tm_min,\r
-                     NewTime->tm_sec\r
-                     );\r
+    if (NewTime != NULL) {\r
+      fprintf (stdout, "%04d-%02d-%02d %02d:%02d:%02d",\r
+                       NewTime->tm_year + 1900,\r
+                       NewTime->tm_mon + 1,\r
+                       NewTime->tm_mday,\r
+                       NewTime->tm_hour,\r
+                       NewTime->tm_min,\r
+                       NewTime->tm_sec\r
+                       );\r
+    }\r
     if (Cptr != NULL) {\r
       sprintf (Line, ": %s", Cptr);\r
       if (LineNumber != 0) {\r