From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) (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 CC7AE802BD for ; Wed, 15 Mar 2017 22:33:41 -0700 (PDT) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga105.jf.intel.com with ESMTP; 15 Mar 2017 22:33:41 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.36,170,1486454400"; d="scan'208";a="1142918342" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by fmsmga002.fm.intel.com with ESMTP; 15 Mar 2017 22:33:41 -0700 Received: from fmsmsx117.amr.corp.intel.com (10.18.116.17) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.248.2; Wed, 15 Mar 2017 22:33:40 -0700 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by fmsmsx117.amr.corp.intel.com (10.18.116.17) with Microsoft SMTP Server (TLS) id 14.3.248.2; Wed, 15 Mar 2017 22:33:40 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.59]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.204]) with mapi id 14.03.0248.002; Thu, 16 Mar 2017 13:33:37 +0800 From: "Ni, Ruiyu" To: "Carsey, Jaben" , Jeff Westfahl CC: "edk2-devel@lists.01.org" Thread-Topic: [PATCH v2] ShellPkg/HandleParsingLib: Correct format specifier for LoadedImage Thread-Index: AQHSnQZBh0zr8a0EUESFushoDoAyJqGV1+OAgAAIrQCAABYVAIAA/O3Q Date: Thu, 16 Mar 2017 05:33:36 +0000 Message-ID: <734D49CCEBEEF84792F5B80ED585239D5B8CB003@SHSMSX104.ccr.corp.intel.com> References: In-Reply-To: Accept-Language: en-US, zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [PATCH v2] ShellPkg/HandleParsingLib: Correct format specifier for LoadedImage 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, 16 Mar 2017 05:33:42 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable I will do that. Thanks/Ray > -----Original Message----- > From: Carsey, Jaben > Sent: Thursday, March 16, 2017 6:28 AM > To: Jeff Westfahl > Cc: edk2-devel@lists.01.org; Ni, Ruiyu ; Carsey, Jabe= n > > Subject: RE: [PATCH v2] ShellPkg/HandleParsingLib: Correct format specifi= er > for LoadedImage >=20 > I was unsure if printing the hex address of the load options was useful > (useful enough?). >=20 > I know for some images it was nice to get the load options printed as a s= tring > since they are command line parameters. I guess that might be more focuse= d > on learning about the shell itself and how it was launched than other ima= ges. > Hence my question. >=20 > I am good with this patch. >=20 > Ray can you review and push it if you agree? >=20 > -Jaben >=20 > > -----Original Message----- > > From: Jeff Westfahl [mailto:jeff.westfahl@ni.com] > > Sent: Wednesday, March 15, 2017 2:09 PM > > To: Carsey, Jaben > > Cc: Jeff Westfahl ; edk2-devel@lists.01.org; Ni, > > Ruiyu > > Subject: RE: [PATCH v2] ShellPkg/HandleParsingLib: Correct format > > specifier for LoadedImage > > Importance: High > > > > Jaben, > > > > I think the output looks good with the udpated format. All of the > > output values are aligned, and it prints the hex address of the load > > options, just like it prints the hex address of the image address right= below. > > > > Regards, > > Jeff > > > > On Wed, 15 Mar 2017, Carsey, Jaben wrote: > > > > > Does the print call need to be updated to print this out properly? > > > > > > -Jaben > > > > > >> -----Original Message----- > > >> From: Jeff Westfahl [mailto:jeff.westfahl@ni.com] > > >> Sent: Tuesday, March 14, 2017 2:02 PM > > >> To: edk2-devel@lists.01.org > > >> Cc: Jeff Westfahl ; Ni, Ruiyu > > ; > > >> Carsey, Jaben > > >> Subject: [PATCH v2] ShellPkg/HandleParsingLib: Correct format > > >> specifier > > for > > >> LoadedImage > > >> Importance: High > > >> > > >> The format specifier for the LoadOptions field of the LoadedImage > > protocol > > >> is "%s". However, the data in LoadOptions is often generic binary > > >> data. A format specifier of "%x" is more appropriate for this field. > > >> > > >> Using "dh -v" with format specifier "%s" on BIOS images based on > > >> EDK II source before commit 891d844 can cause a crash. > > >> > > >> Cc: Ruiyu Ni > > >> Cc: Jaben Carsey > > >> Contributed-under: TianoCore Contribution Agreement 1.0 > > >> Signed-off-by: Jeff Westfahl > > >> --- > > >> ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.uni | 2 > > >> +- > > >> 1 file changed, 1 insertion(+), 1 deletion(-) > > >> > > >> diff --git > > a/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.uni > > >> b/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.uni > > >> index 0d51627..273a420 100644 > > >> --- > > >> a/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.uni > > >> +++ b/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.un > > >> +++ i > > >> @@ -354,7 +354,7 @@ > > >> " DeviceHandl= e..: %%H%x%%N\r\n" > > >> " FilePath...= ...: %%H%x%%N\r\n" > > >> " OptionsSize= ...: %%H%x%%N\r\n" > > >> - " LoadOptions= ...: %%H%s%%N\r\n" > > >> + " LoadOptions= ...: %%H%x%%N\r\n" > > >> " ImageBase..= ...: %%H%x%%N\r\n" > > >> " ImageSize..= ...: %%H%Lx%%N\r\n" > > >> " CodeType...= ...: %%H%s%%N\r\n" > > >> -- > > >> 2.7.4 > > > > > >