diff options
author | Ruiyu Ni <ruiyu.ni@intel.com> | 2016-06-16 11:12:53 +0800 |
---|---|---|
committer | Ruiyu Ni <ruiyu.ni@intel.com> | 2016-06-17 15:43:11 +0800 |
commit | 2528e47cb2131974a5274d32b41be34ac8cab19f (patch) | |
tree | 597b6db705ded854f6dce3ce3fa8010f210ed405 /ShellPkg/Library/UefiHandleParsingLib | |
parent | ca9b4d22f437ccd2d7ad9ce262760097788bafcc (diff) | |
download | edk2-2528e47cb2131974a5274d32b41be34ac8cab19f.zip edk2-2528e47cb2131974a5274d32b41be34ac8cab19f.tar.gz edk2-2528e47cb2131974a5274d32b41be34ac8cab19f.tar.bz2 |
ShellPkg: Use ".." to indicate device path is partially displayed
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>
Diffstat (limited to 'ShellPkg/Library/UefiHandleParsingLib')
-rw-r--r-- | ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c b/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c index a81d1f2..4081991 100644 --- a/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c +++ b/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c @@ -753,6 +753,7 @@ DevicePathProtocolDumpInformation( CHAR16 *Temp;
CHAR16 *Temp2;
EFI_STATUS Status;
+ UINTN Size;
Temp = NULL;
Status = gBS->OpenProtocol(TheHandle, &gEfiDevicePathProtocolGuid, (VOID**)&DevPath, gImageHandle, NULL, EFI_OPEN_PROTOCOL_GET_PROTOCOL);
@@ -765,7 +766,9 @@ DevicePathProtocolDumpInformation( }
if (!Verbose && Temp != NULL && StrLen(Temp) > 30) {
Temp2 = NULL;
- Temp2 = StrnCatGrow(&Temp2, NULL, Temp+(StrLen(Temp) - 30), 30);
+ Size = 0;
+ Temp2 = StrnCatGrow(&Temp2, &Size, L"..", 0);
+ Temp2 = StrnCatGrow(&Temp2, &Size, Temp+(StrLen(Temp) - 28), 0);
FreePool(Temp);
Temp = Temp2;
}
|