diff options
author | Jeff Westfahl <jeff.westfahl@ni.com> | 2017-05-05 05:53:02 +0800 |
---|---|---|
committer | Guo Mang <mang.guo@intel.com> | 2017-07-12 11:24:42 +0800 |
commit | 7cc9261a8a930244e9478014348568d5304f4759 (patch) | |
tree | 60498a1d15402c9cd77ffed57923a1d0dcfb3614 /Core/ShellPkg/Library | |
parent | 8eb2661f7a578ee09a77dab29ecd9ede22010d4e (diff) | |
download | edk2-platforms-7cc9261a8a930244e9478014348568d5304f4759.tar.xz |
ShellPkg/HandleParsingLib: Show LoadedImageProtocol file path as text
This patch adds support for displaying a text representation of the file
path associated with a LoadedImageProtocol. This is a behavior that was
present in the old shell but has been lost in the new shell.
For example, using 'dh -v' in the old shell:
FilePath......: FvFile(F3331DE6-4A55-44E4-B767-7453F7A1A021)
FilePath......: \EFI\BOOT\BOOTX64.EFI
vs. the new shell:
FilePath......: 3A539018
FilePath......: 3A728718
This seems like useful information for the shell to display.
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Jaben Carsey <jaben.carsey@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jeff Westfahl <jeff.westfahl@ni.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
(cherry picked from commit c15323ae2e79ee9b0779b030605d5d4c204d624a)
Diffstat (limited to 'Core/ShellPkg/Library')
-rw-r--r-- | Core/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c | 6 | ||||
-rw-r--r-- | Core/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.uni | 2 |
2 files changed, 6 insertions, 2 deletions
diff --git a/Core/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c b/Core/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c index da1d92fd17..2db8a3a2cf 100644 --- a/Core/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c +++ b/Core/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c @@ -169,6 +169,7 @@ LoadedImageProtocolDumpInformation( EFI_STATUS Status;
CHAR16 *RetVal;
CHAR16 *Temp;
+ CHAR16 *FilePath;
CHAR16 *CodeType;
CHAR16 *DataType;
@@ -197,6 +198,8 @@ LoadedImageProtocolDumpInformation( return NULL;
}
+ FilePath = ConvertDevicePathToText(LoadedImage->FilePath, TRUE, TRUE);
+
DataType = ConvertMemoryType(LoadedImage->ImageDataType);
CodeType = ConvertMemoryType(LoadedImage->ImageCodeType);
@@ -207,7 +210,7 @@ LoadedImageProtocolDumpInformation( LoadedImage->ParentHandle,
LoadedImage->SystemTable,
LoadedImage->DeviceHandle,
- LoadedImage->FilePath,
+ FilePath,
LoadedImage->LoadOptionsSize,
LoadedImage->LoadOptions,
LoadedImage->ImageBase,
@@ -219,6 +222,7 @@ LoadedImageProtocolDumpInformation( SHELL_FREE_NON_NULL(Temp);
+ SHELL_FREE_NON_NULL(FilePath);
SHELL_FREE_NON_NULL(CodeType);
SHELL_FREE_NON_NULL(DataType);
diff --git a/Core/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.uni b/Core/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.uni index 273a4201bc..7b3711d741 100644 --- a/Core/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.uni +++ b/Core/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.uni @@ -352,7 +352,7 @@ " ParentHandle..: %%H%x%%N\r\n"
" SystemTable...: %%H%x%%N\r\n"
" DeviceHandle..: %%H%x%%N\r\n"
- " FilePath......: %%H%x%%N\r\n"
+ " FilePath......: %%H%s%%N\r\n"
" OptionsSize...: %%H%x%%N\r\n"
" LoadOptions...: %%H%x%%N\r\n"
" ImageBase.....: %%H%x%%N\r\n"
|