From nobody Thu Dec 26 01:17:18 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1505716961424105.96766455675277; Sun, 17 Sep 2017 23:42:41 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id A241821CEB0F9; Sun, 17 Sep 2017 23:39:36 -0700 (PDT) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 5F62220945B9D for ; Sun, 17 Sep 2017 23:39:35 -0700 (PDT) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga105.jf.intel.com with ESMTP; 17 Sep 2017 23:42:38 -0700 Received: from ray-dev.ccr.corp.intel.com ([10.239.9.7]) by fmsmga001.fm.intel.com with ESMTP; 17 Sep 2017 23:42:30 -0700 X-Original-To: edk2-devel@lists.01.org X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.42,411,1500966000"; d="scan'208";a="1196145944" From: Ruiyu Ni To: edk2-devel@lists.01.org Date: Mon, 18 Sep 2017 14:42:27 +0800 Message-Id: <20170918064227.295020-1-ruiyu.ni@intel.com> X-Mailer: git-send-email 2.12.2.windows.2 Subject: [edk2] [PATCH] ShellPkg/dmpstore: Show name of known variable vendor GUID X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jaben Carsey , Huajing Li MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" From: Huajing Li Change "dmpstore" to show name of known variable vendor GUID. The name is got from ShellProtocol.GetGuidName(). Cc: Jaben Carsey Reviewed-by: Ruiyu Ni Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Huajing Li Reviewed-by: Jaben Carsey --- ShellPkg/Library/UefiShellDebug1CommandsLib/DmpStore.c | 17 +++++++++++++= ---- .../UefiShellDebug1CommandsLib.uni | 1 + 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/DmpStore.c b/Shell= Pkg/Library/UefiShellDebug1CommandsLib/DmpStore.c index aeffc89b19..062ab5dc3a 100644 --- a/ShellPkg/Library/UefiShellDebug1CommandsLib/DmpStore.c +++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/DmpStore.c @@ -424,6 +424,7 @@ CascadeProcessVariables ( CHAR16 *AttrString; CHAR16 *HexString; EFI_STATUS SetStatus; + CHAR16 *GuidName; =20 if (ShellGetExecutionBreakFlag()) { return (SHELL_ABORTED); @@ -521,10 +522,18 @@ CascadeProcessVariables ( Status =3D EFI_OUT_OF_RESOURCES; } } else { - ShellPrintHiiEx ( - -1, -1, NULL, STRING_TOKEN (STR_DMPSTORE_HEADER_LINE), gShellD= ebug1HiiHandle, - AttrString, &FoundVarGuid, FoundVarName, DataSize - ); + Status =3D gEfiShellProtocol->GetGuidName(&FoundVarGuid, &GuidNa= me); + if (EFI_ERROR (Status)) { + ShellPrintHiiEx ( + -1, -1, NULL, STRING_TOKEN (STR_DMPSTORE_HEADER_LINE), gShel= lDebug1HiiHandle, + AttrString, &FoundVarGuid, FoundVarName, DataSize + ); + } else { + ShellPrintHiiEx ( + -1, -1, NULL, STRING_TOKEN (STR_DMPSTORE_HEADER_LINE2), gShe= llDebug1HiiHandle, + AttrString, GuidName, FoundVarName, DataSize + ); + } DumpHex (2, 0, DataSize, DataBuffer); } SHELL_FREE_NON_NULL (AttrString); diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1Com= mandsLib.uni b/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1C= ommandsLib.uni index f733a67f0b..b6a133a454 100644 --- a/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLi= b.uni +++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLi= b.uni @@ -385,6 +385,7 @@ #string STR_DMPSTORE_LOAD_GEN_FAIL #language en-US "%H%s%N: Failed to = set variable %H%s%N: %r.\r\n" #string STR_DMPSTORE_LOAD_BAD_FILE #language en-US "%H%s%N: Incorrect = file format.\r\n" #string STR_DMPSTORE_HEADER_LINE #language en-US "Variable %H%s%N '%= H%g%N:%H%s%N' DataSize =3D 0x%02x\r\n" +#string STR_DMPSTORE_HEADER_LINE2 #language en-US "Variable %H%s%N '%= H%s%N:%H%s%N' DataSize =3D 0x%02x\r\n" #string STR_DMPSTORE_DELETE_LINE #language en-US "Delete variable '%= H%g%N:%H%s%N': %r\r\n" #string STR_DMPSTORE_NO_VAR_FOUND #language en-US "%H%s%N: No matchin= g variables found.\r\n" #string STR_DMPSTORE_NO_VAR_FOUND_SFO #language en-US "VariableInfo,\"\",= \"\",\"\",\"\",\"\"\r\n" --=20 2.12.2.windows.2 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel