From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.151, mailfrom: dandan.bi@intel.com) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by groups.io with SMTP; Mon, 10 Jun 2019 17:51:38 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Jun 2019 17:51:37 -0700 X-ExtLoop1: 1 Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by FMSMGA003.fm.intel.com with ESMTP; 10 Jun 2019 17:51:37 -0700 Received: from fmsmsx114.amr.corp.intel.com (10.18.116.8) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.408.0; Mon, 10 Jun 2019 17:51:37 -0700 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by FMSMSX114.amr.corp.intel.com (10.18.116.8) with Microsoft SMTP Server (TLS) id 14.3.408.0; Mon, 10 Jun 2019 17:51:37 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.137]) by shsmsx102.ccr.corp.intel.com ([169.254.2.134]) with mapi id 14.03.0415.000; Tue, 11 Jun 2019 08:51:34 +0800 From: "Dandan Bi" To: "devel@edk2.groups.io" , "oleksiyy@ami.com" , "Ni, Ray" , "Carsey, Jaben" CC: "Gao, Zhichao" Subject: Re: [patch] ShellPkg/Debug1CommandsLib: Fix bugs in func DisplaySysEventLogData Thread-Topic: [patch] ShellPkg/Debug1CommandsLib: Fix bugs in func DisplaySysEventLogData Thread-Index: AQHVFPyx4N8u0yxCTkGw/s2i/uX7BqaBQJVggBR0nsA= Date: Tue, 11 Jun 2019 00:51:33 +0000 Message-ID: <3C0D5C461C9E904E8F62152F6274C0BB40BECF3B@SHSMSX104.ccr.corp.intel.com> References: <20190528022509.15152-1-dandan.bi@intel.com> <3CE959C139B4C44DBEA1810E3AA6F9000B7D5896@SHSMSX101.ccr.corp.intel.com> In-Reply-To: <3CE959C139B4C44DBEA1810E3AA6F9000B7D5896@SHSMSX101.ccr.corp.intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Return-Path: dandan.bi@intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi Ray and Jaben, Do you have any comments for this patch? If no, could you give the R-B and then help push the patch? Thanks, Dandan > -----Original Message----- > From: Gao, Zhichao > Sent: Wednesday, May 29, 2019 8:32 AM > To: Bi, Dandan ; devel@edk2.groups.io; > oleksiyy@ami.com > Cc: Carsey, Jaben ; Ni, Ray > Subject: RE: [patch] ShellPkg/Debug1CommandsLib: Fix bugs in func > DisplaySysEventLogData >=20 > Reviewed-by: Zhichao Gao >=20 > > -----Original Message----- > > From: Bi, Dandan > > Sent: Tuesday, May 28, 2019 10:25 AM > > To: devel@edk2.groups.io; oleksiyy@ami.com > > Cc: Carsey, Jaben ; Ni, Ray > > ; Gao, Zhichao > > Subject: [patch] ShellPkg/Debug1CommandsLib: Fix bugs in func > > DisplaySysEventLogData > > > > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D1498 > > > > This patch fix following bugs in func DisplaySysEventLogData: > > 1. Log increment (Log =3D (LOG_RECORD_FORMAT *) (LogData + Offset);) > > should happened in the end of while loop, not in the very beginning. > > 2. DisplaySELTypes function should be used in while loop instead of > > DisplaySELVarDataFormatType. > > > > Cc: Jaben Carsey > > Cc: Ray Ni > > Cc: Zhichao Gao > > Signed-off-by: Dandan Bi > > --- > > .../SmbiosView/EventLogInfo.c | 20 +++++++++++++------ > > 1 file changed, 14 insertions(+), 6 deletions(-) > > > > diff --git > > > a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/EventLogInf > > o.c > > > b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/EventLogInf > > o.c > > index b8adf438d3..984c178890 100644 > > --- > > > a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/EventLogInf > > o.c > > +++ > > > b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/EventLogInf > > +++ o.c > > @@ -1,9 +1,9 @@ > > /** @file > > Module for clarifying the content of the smbios structure element in= fo. > > > > - Copyright (c) 2005 - 2011, Intel Corporation. All rights reserved. > >
> > + Copyright (c) 2005 - 2019, Intel Corporation. All rights reserved. > > +
> > SPDX-License-Identifier: BSD-2-Clause-Patent > > > > **/ > > > > #include "UefiShellDebug1CommandsLib.h" > > @@ -345,20 +345,16 @@ DisplaySysEventLogData ( > > // Print Log info > > // > > Offset =3D 0; > > Log =3D (LOG_RECORD_FORMAT *) LogData; > > while (Log !=3D NULL && Log->Type !=3D END_OF_LOG && Offset < > > LogAreaLength) { > > - // > > - // Get a Event Log Record > > - // > > - Log =3D (LOG_RECORD_FORMAT *) (LogData + Offset); > > > > if (Log !=3D NULL) { > > // > > // Display Event Log Record Information > > // > > - DisplaySELVarDataFormatType (Log->Type, SHOW_DETAIL); > > + DisplaySELTypes (Log->Type, SHOW_DETAIL); > > DisplaySELLogHeaderLen (Log->Length, SHOW_DETAIL); > > > > Offset +=3D Log->Length; > > // > > // Display Log Header Date/Time Fields @@ -371,10 +367,14 @@ > > DisplaySysEventLogData ( > > Print (L"19"); > > } else if (Log !=3D NULL && Log->Year <=3D 79) { > > Print (L"20"); > > } else { > > ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN > > (STR_SMBIOSVIEW_EVENTLOGINFO_ERROR), gShellDebug1HiiHandle); > > + // > > + // Get a Event Log Record > > + // > > + Log =3D (LOG_RECORD_FORMAT *) (LogData + Offset); > > continue; > > } > > > > ShellPrintHiiEx(-1,-1,NULL, > > STRING_TOKEN > (STR_SMBIOSVIEW_EVENTLOGINFO_TIME_SIX_VARS), > > @@ -389,13 +389,21 @@ DisplaySysEventLogData ( > > > > // > > // Display Variable Data Format > > // > > if (Log->Length <=3D (sizeof (LOG_RECORD_FORMAT) - 1)) { > > + // > > + // Get a Event Log Record > > + // > > + Log =3D (LOG_RECORD_FORMAT *) (LogData + Offset); > > continue; > > } > > > > ElVdfType =3D Log->LogVariableData[0]; > > DisplayElVdfInfo (ElVdfType, Log->LogVariableData); > > + // > > + // Get a Event Log Record > > + // > > + Log =3D (LOG_RECORD_FORMAT *) (LogData + Offset); > > } > > } > > } > > -- > > 2.18.0.windows.1