From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.31; helo=mga06.intel.com; envelope-from=liming.gao@intel.com; receiver=edk2-devel@lists.01.org Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) (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 E2617207DF47F for ; Fri, 27 Apr 2018 22:43:30 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 27 Apr 2018 22:43:30 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,337,1520924400"; d="scan'208";a="224051233" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by fmsmga005.fm.intel.com with ESMTP; 27 Apr 2018 22:43:30 -0700 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.319.2; Fri, 27 Apr 2018 22:43:30 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.240]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.6]) with mapi id 14.03.0319.002; Sat, 28 Apr 2018 13:43:29 +0800 From: "Gao, Liming" To: "Ni, Ruiyu" , "edk2-devel@lists.01.org" Thread-Topic: [PATCH] MdePkg/DevicePathToText: Fix iSCSI.Lun byte order issue Thread-Index: AQHT3FttW3jtaEmsv0O+8z4gf/1Cz6QVru8Q Date: Sat, 28 Apr 2018 05:43:28 +0000 Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A14E221F9F@SHSMSX104.ccr.corp.intel.com> References: <20180425060518.41236-1-ruiyu.ni@intel.com> In-Reply-To: <20180425060518.41236-1-ruiyu.ni@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [PATCH] MdePkg/DevicePathToText: Fix iSCSI.Lun byte order issue X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Apr 2018 05:43:31 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Liming Gao >-----Original Message----- >From: Ni, Ruiyu >Sent: Wednesday, April 25, 2018 2:05 PM >To: edk2-devel@lists.01.org >Cc: Gao, Liming >Subject: [PATCH] MdePkg/DevicePathToText: Fix iSCSI.Lun byte order issue > >Contributed-under: TianoCore Contribution Agreement 1.1 >Signed-off-by: Ruiyu Ni >Cc: Liming Gao >--- > MdePkg/Library/UefiDevicePathLib/DevicePathToText.c | 14 ++++++++------ > 1 file changed, 8 insertions(+), 6 deletions(-) > >diff --git a/MdePkg/Library/UefiDevicePathLib/DevicePathToText.c >b/MdePkg/Library/UefiDevicePathLib/DevicePathToText.c >index 63542dba96..df1f218776 100644 >--- a/MdePkg/Library/UefiDevicePathLib/DevicePathToText.c >+++ b/MdePkg/Library/UefiDevicePathLib/DevicePathToText.c >@@ -2,7 +2,7 @@ > DevicePathToText protocol as defined in the UEFI 2.0 specification. > > (C) Copyright 2015 Hewlett-Packard Development Company, L.P.
>-Copyright (c) 2013 - 2017, Intel Corporation. All rights reserved.
>+Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
> This program and the accompanying materials > are licensed and made available under the terms and conditions of the BSD >License > which accompanies this distribution. The full text of the license may be= found >at >@@ -1539,18 +1539,20 @@ DevPathToTextiSCSI ( > { > ISCSI_DEVICE_PATH_WITH_NAME *ISCSIDevPath; > UINT16 Options; >+ UINTN Index; > > ISCSIDevPath =3D DevPath; > UefiDevicePathLibCatPrint ( > Str, >- L"iSCSI(%a,0x%x,0x%lx,", >+ L"iSCSI(%a,0x%x,0x", > ISCSIDevPath->TargetName, >- ISCSIDevPath->TargetPortalGroupTag, >- ISCSIDevPath->Lun >+ ISCSIDevPath->TargetPortalGroupTag > ); >- >+ for (Index =3D 0; Index < ARRAY_SIZE (ISCSIDevPath->Lun); Index++) { >+ UefiDevicePathLibCatPrint (Str, L"%02x", ISCSIDevPath->Lun[Index]); >+ } > Options =3D ISCSIDevPath->LoginOption; >- UefiDevicePathLibCatPrint (Str, L"%s,", (((Options >> 1) & 0x0001) !=3D= 0) ? >L"CRC32C" : L"None"); >+ UefiDevicePathLibCatPrint (Str, L",%s,", (((Options >> 1) & 0x0001) != =3D 0) ? >L"CRC32C" : L"None"); > UefiDevicePathLibCatPrint (Str, L"%s,", (((Options >> 3) & 0x0001) !=3D= 0) ? >L"CRC32C" : L"None"); > if (((Options >> 11) & 0x0001) !=3D 0) { > UefiDevicePathLibCatPrint (Str, L"%s,", L"None"); >-- >2.16.1.windows.1