From nobody Sat Nov 2 14:34:41 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 1486696658949214.7634547867799; Thu, 9 Feb 2017 19:17:38 -0800 (PST) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id D470381F35; Thu, 9 Feb 2017 19:17:37 -0800 (PST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) (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 402E1819E7 for ; Thu, 9 Feb 2017 19:17:36 -0800 (PST) Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga103.jf.intel.com with ESMTP; 09 Feb 2017 19:17:35 -0800 Received: from shwdeopenpsi116.ccr.corp.intel.com ([10.239.9.7]) by fmsmga005.fm.intel.com with ESMTP; 09 Feb 2017 19:17:34 -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="63350938" From: Zhang Lubo To: edk2-devel@lists.01.org Date: Fri, 10 Feb 2017 11:17:32 +0800 Message-Id: <1486696652-40608-1-git-send-email-lubo.zhang@intel.com> X-Mailer: git-send-email 1.9.5.msysgit.1 Subject: [edk2] [patch] MdeModulePkg: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 =20 --- MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Config2Impl.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Config2Impl.c b/MdeMo= dulePkg/Universal/Network/Ip4Dxe/Ip4Config2Impl.c index 131b03f..a6a3da8 100644 --- a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Config2Impl.c +++ b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Config2Impl.c @@ -1490,15 +1490,16 @@ VOID Ip4Config2InitIfInfo ( IN IP4_SERVICE *IpSb, OUT EFI_IP4_CONFIG2_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->Ip4Config2Instance.IfIndex); - IfInfo->Name[4] =3D 0; + UnicodeSPrint ( + IfInfo->Name, + EFI_IP4_CONFIG2_INTERFACE_INFO_NAME_SIZE, + L"eth%x", + IpSb->Ip4Config2Instance.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