From nobody Fri May 3 13:24:33 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1505359066426408.9566136472997; Wed, 13 Sep 2017 20:17:46 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id ECDD721E11D12; Wed, 13 Sep 2017 20:14:46 -0700 (PDT) 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 7321220958BD7 for ; Wed, 13 Sep 2017 20:14:45 -0700 (PDT) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga105.fm.intel.com with ESMTP; 13 Sep 2017 20:17:43 -0700 Received: from sfu5-mobl.ccr.corp.intel.com ([10.239.193.42]) by FMSMGA003.fm.intel.com with ESMTP; 13 Sep 2017 20:17:42 -0700 X-Original-To: edk2-devel@lists.01.org X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.42,390,1500966000"; d="scan'208";a="900079235" From: Fu Siyuan To: edk2-devel@lists.01.org Date: Thu, 14 Sep 2017 11:17:40 +0800 Message-Id: <20170914031740.7440-1-siyuan.fu@intel.com> X-Mailer: git-send-email 2.13.0.windows.1 Subject: [edk2] [Patch] NetworkPkg: Remove the redundant '/' in the end of returned ISCSIMacAddr keyword. X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ye Ting , Wu Jiaxin MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Fu Siyuan Cc: Ye Ting Cc: Wu Jiaxin Reviewed-by: Wu Jiaxin --- NetworkPkg/IScsiDxe/IScsiConfig.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/NetworkPkg/IScsiDxe/IScsiConfig.c b/NetworkPkg/IScsiDxe/IScsiC= onfig.c index 498221a339..c0dd305ecf 100644 --- a/NetworkPkg/IScsiDxe/IScsiConfig.c +++ b/NetworkPkg/IScsiDxe/IScsiConfig.c @@ -749,14 +749,15 @@ IScsiConvertAttemptConfigDataToIfrNvDataByKeyword ( } CopyMem(IfrNvData->ISCSIDisplayAttemptList, AttemptNameList, ATTEMPT_N= AME_LIST_SIZE); =20 + ZeroMem (IfrNvData->ISCSIMacAddr, sizeof (IfrNvData->ISCSIMacAddr)); NET_LIST_FOR_EACH (Entry, &mPrivate->NicInfoList) { NicInfo =3D NET_LIST_USER_STRUCT (Entry, ISCSI_NIC_INFO, Link); IScsiMacAddrToStr ( - &NicInfo->PermanentAddress, - NicInfo->HwAddressSize, - NicInfo->VlanId, - MacString - ); + &NicInfo->PermanentAddress, + NicInfo->HwAddressSize, + NicInfo->VlanId, + MacString + ); CopyMem ( IfrNvData->ISCSIMacAddr + StrLen (IfrNvData->ISCSIMacAddr), MacString, @@ -764,7 +765,10 @@ IScsiConvertAttemptConfigDataToIfrNvDataByKeyword ( ); =20 *(IfrNvData->ISCSIMacAddr + StrLen (IfrNvData->ISCSIMacAddr)) =3D L'= /'; - }=20 + } + if (StrLen (IfrNvData->ISCSIMacAddr) !=3D 0) { + *(IfrNvData->ISCSIMacAddr + StrLen (IfrNvData->ISCSIMacAddr) - 1) = =3D L'\0'; + } } } =20 --=20 2.13.0.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel