From: Ruiyu Ni <ruiyu.ni@intel.com>
To: edk2-devel@lists.01.org
Subject: [PATCH 1/2] MdePkg/DevicePathFromText: Fix bug when converting iSCSI node
Date: Fri, 2 Mar 2018 19:52:05 +0800 [thread overview]
Message-ID: <20180302115206.143528-2-ruiyu.ni@intel.com> (raw)
In-Reply-To: <20180302115206.143528-1-ruiyu.ni@intel.com>
If protocol string is not specified, default TCP(0) should be used.
Today's implementation wrongly sets to 1 for this case.
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
---
MdePkg/Library/UefiDevicePathLib/DevicePathFromText.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/MdePkg/Library/UefiDevicePathLib/DevicePathFromText.c b/MdePkg/Library/UefiDevicePathLib/DevicePathFromText.c
index 0459f0ab25..c66b77ba6c 100644
--- a/MdePkg/Library/UefiDevicePathLib/DevicePathFromText.c
+++ b/MdePkg/Library/UefiDevicePathLib/DevicePathFromText.c
@@ -1,7 +1,7 @@
/** @file
DevicePathFromText protocol as defined in the UEFI 2.0 specification.
-Copyright (c) 2013 - 2017, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>
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
@@ -2581,7 +2581,7 @@ DevPathFromTextiSCSI (
ISCSIDevPath->LoginOption = (UINT16) Options;
- if (StrCmp (ProtocolStr, L"TCP") == 0) {
+ if (IS_NULL (*ProtocolStr) || (StrCmp (ProtocolStr, L"TCP") == 0)) {
ISCSIDevPath->NetworkProtocol = 0;
} else {
//
--
2.16.1.windows.1
next prev parent reply other threads:[~2018-03-02 11:45 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-02 11:52 [PATCH 0/2] Bug fix in DevicePathLib regarding converting from text Ruiyu Ni
2018-03-02 11:52 ` Ruiyu Ni [this message]
2018-03-02 13:53 ` [PATCH 1/2] MdePkg/DevicePathFromText: Fix bug when converting iSCSI node Gao, Liming
2018-03-02 11:52 ` [PATCH 2/2] MdePkg/DevicePathFromText: Fix byte orders when handling 8-byte array Ruiyu Ni
2018-03-02 13:53 ` Gao, Liming
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=20180302115206.143528-2-ruiyu.ni@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