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>
This commit is contained in:
Huajing Li 2017-09-21 13:26:59 +08:00 committed by Ruiyu Ni
parent 5bfd23eb60
commit 7f04c46026
1 changed files with 13 additions and 0 deletions

View File

@ -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) {