public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [Patch 1/2] BaseTools: Fix bug when converting iSCSI node
@ 2018-03-03  7:35 Yonghong Zhu
  2018-03-03  7:35 ` [Patch 2/2] BaseTools: Fix byte orders when handling 8-byte array Yonghong Zhu
  2018-03-03  7:38 ` [Patch 1/2] BaseTools: Fix bug when converting iSCSI node Gao, Liming
  0 siblings, 2 replies; 4+ messages in thread
From: Yonghong Zhu @ 2018-03-03  7:35 UTC (permalink / raw)
  To: edk2-devel

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 <yonghong.zhu@intel.com>
---
 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



^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-03-03  7:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-03  7:35 [Patch 1/2] BaseTools: Fix bug when converting iSCSI node Yonghong Zhu
2018-03-03  7:35 ` [Patch 2/2] BaseTools: Fix byte orders when handling 8-byte array Yonghong Zhu
2018-03-03  7:47   ` Ni, Ruiyu
2018-03-03  7:38 ` [Patch 1/2] BaseTools: Fix bug when converting iSCSI node Gao, Liming

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox