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.93; helo=mga11.intel.com; envelope-from=songpeng.li@intel.com; receiver=edk2-devel@lists.01.org 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 60B1021155D5B for ; Thu, 27 Sep 2018 00:37:55 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 27 Sep 2018 00:37:51 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,309,1534834800"; d="scan'208";a="267111039" Received: from lisongpe-mobl1.ccr.corp.intel.com ([10.239.192.252]) by fmsmga006.fm.intel.com with ESMTP; 27 Sep 2018 00:37:38 -0700 From: Songpeng Li To: edk2-devel@lists.01.org Cc: Fu Siyuan , Wu Jiaxin , Liming Gao Date: Thu, 27 Sep 2018 15:37:04 +0800 Message-Id: <20180927073704.15152-1-songpeng.li@intel.com> X-Mailer: git-send-email 2.18.0.windows.1 Subject: [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:37:55 -0000 In DevPathToTextiSCSI(), ISCSIDevPath->Lun is printed in reversed orders. Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=1216 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(-) 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 = 0; Index < sizeof (ISCSIDevPath->Lun) / sizeof (UINT8); Index++) { + for (Index = sizeof (ISCSIDevPath->Lun) / sizeof (UINT8) - 1; Index >= 0; Index--) { UefiDevicePathLibCatPrint (Str, L"%02x", ((UINT8 *)&ISCSIDevPath->Lun)[Index]); } Options = ISCSIDevPath->LoginOption; -- 2.18.0.windows.1