From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0b-00010702.pphosted.com (mx0a-00010702.pphosted.com [148.163.156.75]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 8B7D221A1349E for ; Thu, 4 May 2017 14:53:19 -0700 (PDT) Received: from pps.filterd (m0098781.ppops.net [127.0.0.1]) by mx0a-00010702.pphosted.com (8.16.0.20/8.16.0.20) with SMTP id v44Lp7Xp030156; Thu, 4 May 2017 16:53:18 -0500 Received: from ni.com (skprod2.natinst.com [130.164.80.23]) by mx0a-00010702.pphosted.com with ESMTP id 2a72m587u4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 04 May 2017 16:53:18 -0500 Received: from us-aus-exhub1.ni.corp.natinst.com (us-aus-exhub1.ni.corp.natinst.com [130.164.68.41]) by us-aus-skprod2.natinst.com (8.16.0.17/8.16.0.17) with ESMTPS id v44LrHer001525 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Thu, 4 May 2017 16:53:17 -0500 Received: from us-aus-exhub1.ni.corp.natinst.com (130.164.68.41) by us-aus-exhub1.ni.corp.natinst.com (130.164.68.41) with Microsoft SMTP Server (TLS) id 15.0.1156.6; Thu, 4 May 2017 16:53:17 -0500 Received: from jmw-lm181.ni.corp.natinst.com (130.164.49.7) by us-aus-exhub1.ni.corp.natinst.com (130.164.68.41) with Microsoft SMTP Server id 15.0.1156.6 via Frontend Transport; Thu, 4 May 2017 16:53:17 -0500 From: Jeff Westfahl To: CC: Jeff Westfahl , Ruiyu Ni , Jaben Carsey Date: Thu, 4 May 2017 16:53:02 -0500 Message-ID: <1493934784-30012-2-git-send-email-jeff.westfahl@ni.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1493934784-30012-1-git-send-email-jeff.westfahl@ni.com> References: <1493934784-30012-1-git-send-email-jeff.westfahl@ni.com> MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2017-05-04_14:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_policy_notspam policy=outbound_policy score=30 priorityscore=1501 malwarescore=0 suspectscore=13 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=30 reason=mlx scancount=1 engine=8.0.1-1703280000 definitions=main-1705040308 Subject: [PATCH 1/3] ShellPkg/HandleParsingLib: Show LoadedImageProtocol file path as text X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 May 2017 21:53:19 -0000 Content-Type: text/plain 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 Cc: Jaben Carsey Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jeff Westfahl --- ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c | 6 +++++- ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.uni | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c b/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c index da1d92f..2db8a3a 100644 --- a/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c +++ b/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/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.uni b/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.uni index 273a420..7b3711d 100644 --- a/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.uni +++ b/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" -- 2.7.4