]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/EventLogInfo.c
ShellPkg/Debug1CommandsLib: Fix bugs in func DisplaySysEventLogData
[mirror_edk2.git] / ShellPkg / Library / UefiShellDebug1CommandsLib / SmbiosView / EventLogInfo.c
index b40276dee7ae0e6b07ce78fc92f9462557c2333d..984c17889059e01d6046517c264e58b0a814b3f1 100644 (file)
@@ -1,14 +1,8 @@
 /** @file\r
   Module for clarifying the content of the smbios structure element info.\r
 \r
-  Copyright (c) 2005 - 2011, 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) 2005 - 2019, Intel Corporation. All rights reserved. <BR>\r
+  SPDX-License-Identifier: BSD-2-Clause-Patent\r
 \r
 **/\r
 \r
@@ -353,16 +347,12 @@ DisplaySysEventLogData (
   Offset  = 0;\r
   Log     = (LOG_RECORD_FORMAT *) LogData;\r
   while (Log != NULL && Log->Type != END_OF_LOG && Offset < LogAreaLength) {\r
-    //\r
-    // Get a Event Log Record\r
-    //\r
-    Log = (LOG_RECORD_FORMAT *) (LogData + Offset);\r
 \r
     if (Log != NULL) {\r
       //\r
       // Display Event Log Record Information\r
       //\r
-      DisplaySELVarDataFormatType (Log->Type, SHOW_DETAIL);\r
+      DisplaySELTypes (Log->Type, SHOW_DETAIL);\r
       DisplaySELLogHeaderLen (Log->Length, SHOW_DETAIL);\r
 \r
       Offset += Log->Length;\r
@@ -379,6 +369,10 @@ DisplaySysEventLogData (
         Print (L"20");\r
       } else {\r
         ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_EVENTLOGINFO_ERROR), gShellDebug1HiiHandle);\r
+        //\r
+        // Get a Event Log Record\r
+        //\r
+        Log = (LOG_RECORD_FORMAT *) (LogData + Offset);\r
         continue;\r
       }\r
 \r
@@ -397,11 +391,19 @@ DisplaySysEventLogData (
       // Display Variable Data Format\r
       //\r
       if (Log->Length <= (sizeof (LOG_RECORD_FORMAT) - 1)) {\r
+        //\r
+        // Get a Event Log Record\r
+        //\r
+        Log = (LOG_RECORD_FORMAT *) (LogData + Offset);\r
         continue;\r
       }\r
 \r
       ElVdfType = Log->LogVariableData[0];\r
       DisplayElVdfInfo (ElVdfType, Log->LogVariableData);\r
+      //\r
+      // Get a Event Log Record\r
+      //\r
+      Log = (LOG_RECORD_FORMAT *) (LogData + Offset);\r
     }\r
   }\r
 }\r