From nobody Sun Feb 8 13:43:01 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+41441+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+41441+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1559010343; cv=none; d=zoho.com; s=zohoarc; b=ZbkoGNyUuBMWrBqHgyxOAHVD8HTSmAeTOOfnOCvgN6ESDizJwQeroLYbS9lR5bQHyhNdIn++dkAtiWhE6cfNNxqFAZWCGNgi/5AbE2MuF0Dks2+qOvZhZ+8+T2NogxXujR9XepddmNsi9qC8i2KdQvWIfA2fDE+O0CjZfxAtW+Q= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1559010343; h=Cc:Date:From:List-Id:List-Unsubscribe:Message-ID:Reply-To:Sender:Subject:To:ARC-Authentication-Results; bh=tBKOEbk3bx05nM9trNE1N78M3w7NK06d19/VGXgNuWU=; b=kzqoja+QBer99C9psl00K9NGhZb8AKYEKZ8qQBKgvKdQi9Up7a6Z6qFh9YU5rG3PaybQJ2tok/z5hvW2qxhP41dCz9JntN/j5aiS1IxhfCP9aPjDgVG8jE4s7zBtpPdJusVUK1CvF8ohLH6N24aexlWaCDyXUbsc7dfyIeB72t8= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+41441+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1559010343867364.9624936620728; Mon, 27 May 2019 19:25:43 -0700 (PDT) Return-Path: X-Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by groups.io with SMTP; Mon, 27 May 2019 19:25:43 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 27 May 2019 19:25:42 -0700 X-ExtLoop1: 1 X-Received: from shwdeopenpsi114.ccr.corp.intel.com ([10.239.157.147]) by orsmga006.jf.intel.com with ESMTP; 27 May 2019 19:25:40 -0700 From: "Dandan Bi" To: devel@edk2.groups.io, oleksiyy@ami.com Cc: Jaben Carsey , Ray Ni , Zhichao Gao Subject: [edk2-devel] [patch] ShellPkg/Debug1CommandsLib: Fix bugs in func DisplaySysEventLogData Date: Tue, 28 May 2019 10:25:09 +0800 Message-Id: <20190528022509.15152-1-dandan.bi@intel.com> Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,dandan.bi@intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1559010343; bh=8UVvrHUT+buxJWzAlNGWztt+bVk0PIo2nymnBNNRe68=; h=Cc:Date:From:Reply-To:Subject:To; b=LhZBYsRmqUi+ww59TMeZcdUrKiQOzN0ogHOmY3FUulxfXIfdFiYiH15IJOLSomQeiyu 7PC1C33ckvJ1clqcFAY1nWIigvtDSFpw2m/1YG8Jdzf4PjW0vzCJn8TeucKBakKKZ1g9c /V6aLZK7LNO1MruTapfbSsyYPJL+hDj81Ds= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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 Reviewed-by: Zhichao Gao --- .../SmbiosView/EventLogInfo.c | 20 +++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/EventLo= gInfo.c b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/EventLogIn= fo.c index b8adf438d3..984c178890 100644 --- a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/EventLogInfo.c +++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/EventLogInfo.c @@ -1,9 +1,9 @@ /** @file Module for clarifying the content of the smbios structure element info. =20 - 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 =20 **/ =20 #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 < LogAreaLen= gth) { - // - // Get a Event Log Record - // - Log =3D (LOG_RECORD_FORMAT *) (LogData + Offset); =20 if (Log !=3D NULL) { // // Display Event Log Record Information // - DisplaySELVarDataFormatType (Log->Type, SHOW_DETAIL); + DisplaySELTypes (Log->Type, SHOW_DETAIL); DisplaySELLogHeaderLen (Log->Length, SHOW_DETAIL); =20 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_EVENTLOGIN= FO_ERROR), gShellDebug1HiiHandle); + // + // Get a Event Log Record + // + Log =3D (LOG_RECORD_FORMAT *) (LogData + Offset); continue; } =20 ShellPrintHiiEx(-1,-1,NULL, STRING_TOKEN (STR_SMBIOSVIEW_EVENTLOGINFO_TIME_SIX_VARS), @@ -389,13 +389,21 @@ DisplaySysEventLogData ( =20 // // 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; } =20 ElVdfType =3D Log->LogVariableData[0]; DisplayElVdfInfo (ElVdfType, Log->LogVariableData); + // + // Get a Event Log Record + // + Log =3D (LOG_RECORD_FORMAT *) (LogData + Offset); } } } --=20 2.18.0.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#41441): https://edk2.groups.io/g/devel/message/41441 Mute This Topic: https://groups.io/mt/31816865/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-