From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) (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 5046180370 for ; Wed, 15 Mar 2017 15:28:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=intel.com; i=@intel.com; q=dns/txt; s=intel; t=1489616882; x=1521152882; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=jMk3yOl+5qaNA2Si4iDaKjnEUehvlvLDTn/IRk3bRd8=; b=uR560s8oL+A3zIFz/yvESV0hYu1AZ639Wt/vIG3/HXb9VdJEDOHo0ZR2 D5Fz5v4KG4schT4Xzfeil9Uxgwq/sw==; Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 15 Mar 2017 15:28:02 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.36,170,1486454400"; d="scan'208";a="67777680" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by orsmga004.jf.intel.com with ESMTP; 15 Mar 2017 15:28:01 -0700 Received: from fmsmsx114.amr.corp.intel.com (10.18.116.8) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.248.2; Wed, 15 Mar 2017 15:28:01 -0700 Received: from fmsmsx103.amr.corp.intel.com ([169.254.2.47]) by FMSMSX114.amr.corp.intel.com ([10.18.116.8]) with mapi id 14.03.0248.002; Wed, 15 Mar 2017 15:28:01 -0700 From: "Carsey, Jaben" To: Jeff Westfahl CC: "edk2-devel@lists.01.org" , "Ni, Ruiyu" , "Carsey, Jaben" Thread-Topic: [PATCH v2] ShellPkg/HandleParsingLib: Correct format specifier for LoadedImage Thread-Index: AQHSnQY/FiOiHG37vkWU4VbNXkMYRqGWXdzAgAB+KQD//6BDkA== Date: Wed, 15 Mar 2017 22:28:00 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNmZiNzI4NmMtNzE5Yi00Nzc5LTkxZGQtN2MyYjU4NGE3MGU0IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6Imd5U05WTHZZVWszWUVMQTV5SFh0akJnQkk1VzNqYVhtRkVJSldxNkZaWE09In0= x-ctpclassification: CTP_IC x-originating-ip: [10.1.200.108] 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: Wed, 15 Mar 2017 22:28:02 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable I was unsure if printing the hex address of the load options was useful (us= eful enough?). I know for some images it was nice to get the load options printed as a str= ing since they are command line parameters. I guess that might be more focu= sed on learning about the shell itself and how it was launched than other i= mages. Hence my question. I am good with this patch. Ray can you review and push it if you agree? -Jaben > -----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, Ru= iyu > > Subject: RE: [PATCH v2] ShellPkg/HandleParsingLib: Correct format specifi= er > for LoadedImage > Importance: High >=20 > Jaben, >=20 > 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. >=20 > Regards, > Jeff >=20 > On Wed, 15 Mar 2017, Carsey, Jaben wrote: >=20 > > 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 specifie= r > 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 I= I > >> 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.uni > >> @@ -354,7 +354,7 @@ > >> " DeviceHandle.= .: %%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 > > > >