From: "Fu, Siyuan" <siyuan.fu@intel.com>
To: "Li, Songpeng" <songpeng.li@intel.com>,
"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Cc: "Wu, Jiaxin" <jiaxin.wu@intel.com>, "Gao, Liming" <liming.gao@intel.com>
Subject: Re: [PATCH] MdePkg/UefiDevicePathLib: Fix print logic in DevPathToTextiSCSI
Date: Thu, 27 Sep 2018 07:51:16 +0000 [thread overview]
Message-ID: <B1FF2E9001CE9041BD10B825821D5BC58B616FDF@SHSMSX103.ccr.corp.intel.com> (raw)
In-Reply-To: <20180927073704.15152-1-songpeng.li@intel.com>
Hi, Songpeng
According to the iSCSI text device note in UEFI spec, the byte 0 of LUN should 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 byte 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 <siyuan.fu@intel.com>; Wu, Jiaxin <jiaxin.wu@intel.com>;
> Gao, Liming <liming.gao@intel.com>
> Subject: [PATCH] MdePkg/UefiDevicePathLib: Fix print logic in
> DevPathToTextiSCSI
>
> In DevPathToTextiSCSI(), ISCSIDevPath->Lun is printed in reversed orders.
>
> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=1216
> Cc: Fu Siyuan <siyuan.fu@intel.com>
> Cc: Wu Jiaxin <jiaxin.wu@intel.com>
> Cc: Liming Gao <liming.gao@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Songpeng Li <songpeng.li@intel.com>
> ---
> 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
next prev parent reply other threads:[~2018-09-27 7:54 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-27 7:37 [PATCH] MdePkg/UefiDevicePathLib: Fix print logic in DevPathToTextiSCSI Songpeng Li
2018-09-27 7:51 ` Fu, Siyuan [this message]
2018-09-27 8:09 ` Li, Songpeng
2018-09-27 15:03 ` Kinney, Michael D
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=B1FF2E9001CE9041BD10B825821D5BC58B616FDF@SHSMSX103.ccr.corp.intel.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox