From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.43; helo=mga05.intel.com; envelope-from=siyuan.fu@intel.com; receiver=edk2-devel@lists.01.org Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) (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 4ABB321B02822 for ; Thu, 27 Sep 2018 00:54:46 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 27 Sep 2018 00:54:46 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,309,1534834800"; d="scan'208";a="93675175" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by fmsmga001.fm.intel.com with ESMTP; 27 Sep 2018 00:51:22 -0700 Received: from fmsmsx101.amr.corp.intel.com (10.18.124.199) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 27 Sep 2018 00:51:20 -0700 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by fmsmsx101.amr.corp.intel.com (10.18.124.199) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 27 Sep 2018 00:51:20 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.245]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.37]) with mapi id 14.03.0319.002; Thu, 27 Sep 2018 15:51:16 +0800 From: "Fu, Siyuan" To: "Li, Songpeng" , "edk2-devel@lists.01.org" CC: "Wu, Jiaxin" , "Gao, Liming" Thread-Topic: [PATCH] MdePkg/UefiDevicePathLib: Fix print logic in DevPathToTextiSCSI Thread-Index: AQHUVjUOGqUY222fJU+G/Nz6Zh4UIqUDwJXg Date: Thu, 27 Sep 2018 07:51:16 +0000 Message-ID: References: <20180927073704.15152-1-songpeng.li@intel.com> In-Reply-To: <20180927073704.15152-1-songpeng.li@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMWJmOTc0MzQtN2RjNi00N2ZlLWEwYzEtNDI4MjNkZTNlYWEzIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoic3FYQUszelkwVGpxbFZleE9DVnVmVXgyZVZOQnFsVVQwMXNkbjg0ekx0cXhIRzZJNHVOXC85a3o4elkzV1AySTYifQ== dlp-product: dlpe-windows dlp-version: 11.0.400.15 dlp-reaction: no-action x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [PATCH] MdePkg/UefiDevicePathLib: Fix print logic in DevPathToTextiSCSI X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Sep 2018 07:54:47 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi, Songpeng According to the iSCSI text device note in UEFI spec, the byte 0 of LUN sho= uld come first, seems there is no problem in original code logic. Could you= please double confirm that? "The LUN is an 8 byte array that is displayed in hexadecimal format with b= yte 0 first (i.e., on the left) and byte 7 last (i.e, on the right), and is= required." BestRegards Fu Siyuan > -----Original Message----- > From: Li, Songpeng > Sent: Thursday, September 27, 2018 3:37 PM > To: edk2-devel@lists.01.org > Cc: Fu, Siyuan ; Wu, Jiaxin ; > Gao, Liming > Subject: [PATCH] MdePkg/UefiDevicePathLib: Fix print logic in > DevPathToTextiSCSI >=20 > In DevPathToTextiSCSI(), ISCSIDevPath->Lun is printed in reversed orders. >=20 > Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3D1216 > Cc: Fu Siyuan > Cc: Wu Jiaxin > Cc: Liming Gao > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Songpeng Li > --- > MdePkg/Library/UefiDevicePathLib/DevicePathToText.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/MdePkg/Library/UefiDevicePathLib/DevicePathToText.c > b/MdePkg/Library/UefiDevicePathLib/DevicePathToText.c > index 7d8d304f6f..3f6478e43c 100644 > --- a/MdePkg/Library/UefiDevicePathLib/DevicePathToText.c > +++ b/MdePkg/Library/UefiDevicePathLib/DevicePathToText.c > @@ -1548,7 +1548,7 @@ DevPathToTextiSCSI ( > ISCSIDevPath->TargetName, > ISCSIDevPath->TargetPortalGroupTag > ); > - for (Index =3D 0; Index < sizeof (ISCSIDevPath->Lun) / sizeof (UINT8); > Index++) { > + for (Index =3D sizeof (ISCSIDevPath->Lun) / sizeof (UINT8) - 1; Index = >=3D > 0; Index--) { > UefiDevicePathLibCatPrint (Str, L"%02x", ((UINT8 *)&ISCSIDevPath- > >Lun)[Index]); > } > Options =3D ISCSIDevPath->LoginOption; > -- > 2.18.0.windows.1