diff options
author | Huajing Li <huajing.li@intel.com> | 2017-09-21 13:26:59 +0800 |
---|---|---|
committer | Ruiyu Ni <ruiyu.ni@intel.com> | 2017-09-25 08:32:16 +0800 |
commit | 7f04c460266cdfb45edd20af5db1a7a331d4d3f2 (patch) | |
tree | 74682d68d4ccf354f535d0198a709216a010e00b /ShellPkg | |
parent | 5bfd23eb604969a5303ba60fcbecc9f26c3513eb (diff) | |
download | edk2-7f04c460266cdfb45edd20af5db1a7a331d4d3f2.zip edk2-7f04c460266cdfb45edd20af5db1a7a331d4d3f2.tar.gz edk2-7f04c460266cdfb45edd20af5db1a7a331d4d3f2.tar.bz2 |
ShellPkg/dh: Display the protocol instance pointer value for "-v"
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Jaben Carsey <jaben.carsey@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Huajing Li <huajing.li@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
Diffstat (limited to 'ShellPkg')
-rw-r--r-- | ShellPkg/Library/UefiShellDriver1CommandsLib/Dh.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/ShellPkg/Library/UefiShellDriver1CommandsLib/Dh.c b/ShellPkg/Library/UefiShellDriver1CommandsLib/Dh.c index f37f7e9..7d06163 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) {
|