From nobody Sat Nov 2 14:33:57 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.zoho.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 1486696679243548.3252279123656; Thu, 9 Feb 2017 19:17:59 -0800 (PST) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 1CEAD82083; Thu, 9 Feb 2017 19:17:58 -0800 (PST) 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 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 X-Original-To: edk2-devel@lists.01.org X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.35,138,1484035200"; d="scan'208";a="63351003" From: Zhang Lubo To: edk2-devel@lists.01.org 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: [edk2] [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: , Cc: Ye Ting , Fu Siyuan , 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" 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 Reviewed-by: Wu Jiaxin Reviewed-by: Ye Ting --- NetworkPkg/Ip6Dxe/Ip6ConfigImpl.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/NetworkPkg/Ip6Dxe/Ip6ConfigImpl.c b/NetworkPkg/Ip6Dxe/Ip6Confi= gImpl.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] =3D L'e'; - IfInfo->Name[1] =3D L't'; - IfInfo->Name[2] =3D L'h'; - IfInfo->Name[3] =3D (CHAR16) (L'0' + IpSb->Ip6ConfigInstance.IfIndex); - IfInfo->Name[4] =3D 0; + UnicodeSPrint ( + IfInfo->Name, + sizeof (IfInfo->Name), + L"eth%x", + IpSb->Ip6ConfigInstance.IfIndex + ); =20 IfInfo->IfType =3D IpSb->SnpMode.IfType; IfInfo->HwAddressSize =3D IpSb->SnpMode.HwAddressSize; CopyMem (&IfInfo->HwAddress, &IpSb->SnpMode.CurrentAddress, IfInfo->HwAd= dressSize); } --=20 1.9.5.msysgit.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel