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: jaben.carsey@intel.com) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by groups.io with SMTP; Wed, 12 Jun 2019 09:25:13 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Jun 2019 09:25:12 -0700 X-ExtLoop1: 1 Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by fmsmga001.fm.intel.com with ESMTP; 12 Jun 2019 09:25:12 -0700 Received: from fmsmsx112.amr.corp.intel.com (10.18.116.6) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.408.0; Wed, 12 Jun 2019 09:25:12 -0700 Received: from fmsmsx103.amr.corp.intel.com ([169.254.2.74]) by FMSMSX112.amr.corp.intel.com ([169.254.5.219]) with mapi id 14.03.0415.000; Wed, 12 Jun 2019 09:25:12 -0700 From: "Carsey, Jaben" To: "Bi, Dandan" , "devel@edk2.groups.io" , "oleksiyy@ami.com" , "Ni, Ray" 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: AQHVFbXqMjuasjjVDUidaIrkO1/LuqaWKY2AgAIhzOA= Date: Wed, 12 Jun 2019 16:25:10 +0000 Message-ID: References: <20190528022509.15152-1-dandan.bi@intel.com> <3CE959C139B4C44DBEA1810E3AA6F9000B7D5896@SHSMSX101.ccr.corp.intel.com> <3C0D5C461C9E904E8F62152F6274C0BB40BECF3B@SHSMSX104.ccr.corp.intel.com> In-Reply-To: <3C0D5C461C9E904E8F62152F6274C0BB40BECF3B@SHSMSX104.ccr.corp.intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYzliMDliZTktYTYwOS00NjBjLWE0MjUtZTUwODdhOGQzNmExIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiK0hJVGFUdjhWVEFBajI4MUYwS3FCMVV0SVJtRXFJTnR2a1U3UE1pZDFJYzA2MVM2UnRHZG1jUFpQZXFZTW9NYiJ9 x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.600.7 dlp-reaction: no-action x-originating-ip: [10.1.200.108] MIME-Version: 1.0 Return-Path: jaben.carsey@intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Pushed. > -----Original Message----- > From: Bi, Dandan > Sent: Monday, June 10, 2019 5:52 PM > 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 > Importance: High >=20 > Hi Ray and Jaben, >=20 > Do you have any comments for this patch? > If no, could you give the R-B and then help push the patch? >=20 >=20 > Thanks, > Dandan >=20 > > -----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 > > > > Reviewed-by: Zhichao Gao > > > > > -----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 = info. > > > > > > - 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