From: Yonghong Zhu Date: Fri, 2 Mar 2018 15:03:34 +0000 (+0800) Subject: BaseTools: Fix bug when converting iSCSI node X-Git-Tag: edk2-stable201903~2277 X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=commitdiff_plain;h=c1d6749b0ed3c58b7dc771e0f857995096107f44 BaseTools: 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. Copy the fix solution from MdePkg Hash version e6c80aea. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yonghong Zhu Reviewed-by: Liming Gao --- diff --git a/BaseTools/Source/C/DevicePath/DevicePathFromText.c b/BaseTools/Source/C/DevicePath/DevicePathFromText.c index 776cf051b0..fd310c7d0f 100644 --- a/BaseTools/Source/C/DevicePath/DevicePathFromText.c +++ b/BaseTools/Source/C/DevicePath/DevicePathFromText.c @@ -2426,7 +2426,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 { //