From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) (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 38FA22095E4E2 for ; Thu, 21 Sep 2017 22:47:13 -0700 (PDT) Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga104.jf.intel.com with ESMTP; 21 Sep 2017 22:50:20 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.42,427,1500966000"; d="scan'208";a="154738596" Received: from ray-dev.ccr.corp.intel.com ([10.239.9.7]) by fmsmga006.fm.intel.com with ESMTP; 21 Sep 2017 22:50:20 -0700 From: Ruiyu Ni To: edk2-devel@lists.01.org Cc: Huajing Li , Jaben Carsey Date: Fri, 22 Sep 2017 13:50:04 +0800 Message-Id: <20170922055014.27288-5-ruiyu.ni@intel.com> X-Mailer: git-send-email 2.12.2.windows.2 In-Reply-To: <20170922055014.27288-1-ruiyu.ni@intel.com> References: <20170922055014.27288-1-ruiyu.ni@intel.com> Subject: [PATCH 04/14] ShellPkg/dh: Display the protocol instance pointer value for "-v" 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: , X-List-Received-Date: Fri, 22 Sep 2017 05:47:13 -0000 From: Huajing Li Reviewed-by: Ruiyu Ni Cc: Jaben Carsey Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Huajing Li --- ShellPkg/Library/UefiShellDriver1CommandsLib/Dh.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/ShellPkg/Library/UefiShellDriver1CommandsLib/Dh.c b/ShellPkg/Library/UefiShellDriver1CommandsLib/Dh.c index f37f7e9a9e..7d06163a7b 100644 --- a/ShellPkg/Library/UefiShellDriver1CommandsLib/Dh.c +++ b/ShellPkg/Library/UefiShellDriver1CommandsLib/Dh.c @@ -286,6 +286,8 @@ GetProtocolInfoString( UINTN Size; CHAR16 *Temp; CHAR16 GuidStr[40]; + VOID *instance; + CHAR16 InstanceStr[17]; ProtocolGuidArray = NULL; RetVal = NULL; @@ -312,6 +314,17 @@ GetProtocolInfoString( FreePool(Temp); } StrnCatGrow(&RetVal, &Size, L"%N", 0); + + if(Verbose) { + Status = gBS->HandleProtocol (TheHandle, ProtocolGuidArray[ProtocolIndex], &instance); + if (!EFI_ERROR (Status)) { + StrnCatGrow (&RetVal, &Size, L"(%H", 0); + UnicodeSPrint (InstanceStr, sizeof (InstanceStr), L"%x", instance); + StrnCatGrow (&RetVal, &Size, InstanceStr, 0); + StrnCatGrow (&RetVal, &Size, L"%N)", 0); + } + } + if (ExtraInfo) { Temp = GetProtocolInformationDump(TheHandle, ProtocolGuidArray[ProtocolIndex], Verbose); if (Temp != NULL) { -- 2.12.2.windows.2