MdePkg/DevicePathFromText: Fix bug when converting iSCSI node

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>
Reviewed-by: Liming Gao <liming.gao@intel.com>
This commit is contained in:
Ruiyu Ni 2018-03-02 19:45:15 +08:00
parent 5b29e438eb
commit e6c80aea71
1 changed files with 2 additions and 2 deletions

View File

@ -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 {
//