From nobody Fri May 3 02:31:15 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1524636325847838.8359578258962; Tue, 24 Apr 2018 23:05:25 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id A23AA2277AF1A; Tue, 24 Apr 2018 23:05:24 -0700 (PDT) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) (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 4C2BA220E8DEF for ; Tue, 24 Apr 2018 23:05:23 -0700 (PDT) Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 Apr 2018 23:05:22 -0700 Received: from ray-dev.ccr.corp.intel.com ([10.239.9.4]) by fmsmga006.fm.intel.com with ESMTP; 24 Apr 2018 23:05:22 -0700 X-Original-To: edk2-devel@lists.01.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.93; helo=mga11.intel.com; envelope-from=ruiyu.ni@intel.com; receiver=edk2-devel@lists.01.org X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,325,1520924400"; d="scan'208";a="223180780" From: Ruiyu Ni To: edk2-devel@lists.01.org Date: Wed, 25 Apr 2018 14:05:18 +0800 Message-Id: <20180425060518.41236-1-ruiyu.ni@intel.com> X-Mailer: git-send-email 2.16.1.windows.1 Subject: [edk2] [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: , Cc: Liming Gao MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ruiyu Ni Cc: Liming Gao Reviewed-by: 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/L= ibrary/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. =20 (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; =20 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"); --=20 2.16.1.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel