From c1d6749b0ed3c58b7dc771e0f857995096107f44 Mon Sep 17 00:00:00 2001 From: Yonghong Zhu Date: Fri, 2 Mar 2018 23:03:34 +0800 Subject: [PATCH] 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 --- BaseTools/Source/C/DevicePath/DevicePathFromText.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 { // -- 2.39.2