From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.43; helo=mga05.intel.com; envelope-from=yonghong.zhu@intel.com; receiver=edk2-devel@lists.01.org Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id F2D1021F6A6FD for ; Fri, 2 Mar 2018 23:29:28 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 02 Mar 2018 23:35:39 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.47,416,1515484800"; d="scan'208";a="34319486" Received: from shwdeopenpsi168.ccr.corp.intel.com ([10.239.158.129]) by fmsmga004.fm.intel.com with ESMTP; 02 Mar 2018 23:35:38 -0800 From: Yonghong Zhu To: edk2-devel@lists.01.org Date: Sat, 3 Mar 2018 15:35:35 +0800 Message-Id: <1520062536-14244-1-git-send-email-yonghong.zhu@intel.com> X-Mailer: git-send-email 2.6.1.windows.1 Subject: [Patch 1/2] BaseTools: Fix bug when converting iSCSI node X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Mar 2018 07:29:29 -0000 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. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yonghong Zhu --- 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 776cf05..06482ae 100644 --- a/BaseTools/Source/C/DevicePath/DevicePathFromText.c +++ b/BaseTools/Source/C/DevicePath/DevicePathFromText.c @@ -2424,11 +2424,11 @@ DevPathFromTextiSCSI ( Options |= 0x1000; } ISCSIDevPath->LoginOption = (UINT16) Options; - if (StrCmp (ProtocolStr, L"TCP") == 0) { + if (IS_NULL (*ProtocolStr) || (StrCmp (ProtocolStr, L"TCP") == 0)) { ISCSIDevPath->NetworkProtocol = 0; } else { // // Undefined and reserved. // -- 2.6.1.windows.1