From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) (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 0DBE5819E7 for ; Thu, 9 Feb 2017 19:17:57 -0800 (PST) Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga104.jf.intel.com with ESMTP; 09 Feb 2017 19:17:56 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.35,138,1484035200"; d="scan'208";a="63351003" Received: from shwdeopenpsi116.ccr.corp.intel.com ([10.239.9.7]) by fmsmga005.fm.intel.com with ESMTP; 09 Feb 2017 19:17:55 -0800 From: Zhang Lubo To: edk2-devel@lists.01.org Cc: Santhapur Naveen , Ye Ting , Fu Siyuan , Wu Jiaxin Date: Fri, 10 Feb 2017 11:17:54 +0800 Message-Id: <1486696674-41256-1-git-send-email-lubo.zhang@intel.com> X-Mailer: git-send-email 1.9.5.msysgit.1 Subject: [patch] NetworkPkg:Generate the correct operational state of the interface. X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Feb 2017 03:17:57 -0000 Currently, When there are more than 9 Ethernet ports available, 'ifconfig -l' is not listing all the ports, only show the ports 0 to 9. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Zhang Lubo Cc: Santhapur Naveen Cc: Ye Ting Cc: Fu Siyuan Cc: Wu Jiaxin --- NetworkPkg/Ip6Dxe/Ip6ConfigImpl.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/NetworkPkg/Ip6Dxe/Ip6ConfigImpl.c b/NetworkPkg/Ip6Dxe/Ip6ConfigImpl.c index 4e881fd..e309b69 100644 --- a/NetworkPkg/Ip6Dxe/Ip6ConfigImpl.c +++ b/NetworkPkg/Ip6Dxe/Ip6ConfigImpl.c @@ -1436,15 +1436,16 @@ VOID Ip6ConfigInitIfInfo ( IN IP6_SERVICE *IpSb, OUT EFI_IP6_CONFIG_INTERFACE_INFO *IfInfo ) { - IfInfo->Name[0] = L'e'; - IfInfo->Name[1] = L't'; - IfInfo->Name[2] = L'h'; - IfInfo->Name[3] = (CHAR16) (L'0' + IpSb->Ip6ConfigInstance.IfIndex); - IfInfo->Name[4] = 0; + UnicodeSPrint ( + IfInfo->Name, + sizeof (IfInfo->Name), + L"eth%x", + IpSb->Ip6ConfigInstance.IfIndex + ); IfInfo->IfType = IpSb->SnpMode.IfType; IfInfo->HwAddressSize = IpSb->SnpMode.HwAddressSize; CopyMem (&IfInfo->HwAddress, &IpSb->SnpMode.CurrentAddress, IfInfo->HwAddressSize); } -- 1.9.5.msysgit.1