The output of "dh <handle>" originally is like below:
12C: USBIO DevicePath(x0)/Pci(0x14,0x0)/USB(0x6,0x0))
The device path part is very confusing. Use ".." in front of the
partially displayed device path is better and it also aligns to
the example output in Shell spec.
12C: USBIO DevicePath(..)/Pci(0x14,0x0)/USB(0x6,0x0))
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
CHAR16 *Temp;\r
CHAR16 *Temp2;\r
EFI_STATUS Status;\r
+ UINTN Size;\r
Temp = NULL;\r
\r
Status = gBS->OpenProtocol(TheHandle, &gEfiDevicePathProtocolGuid, (VOID**)&DevPath, gImageHandle, NULL, EFI_OPEN_PROTOCOL_GET_PROTOCOL);\r
}\r
if (!Verbose && Temp != NULL && StrLen(Temp) > 30) {\r
Temp2 = NULL;\r
- Temp2 = StrnCatGrow(&Temp2, NULL, Temp+(StrLen(Temp) - 30), 30);\r
+ Size = 0;\r
+ Temp2 = StrnCatGrow(&Temp2, &Size, L"..", 0);\r
+ Temp2 = StrnCatGrow(&Temp2, &Size, Temp+(StrLen(Temp) - 28), 0);\r
FreePool(Temp);\r
Temp = Temp2;\r
}\r