From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 7691F81F37 for ; Thu, 9 Feb 2017 19:31:36 -0800 (PST) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga103.jf.intel.com with ESMTP; 09 Feb 2017 19:31:36 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.35,138,1484035200"; d="scan'208";a="932204907" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by orsmga003.jf.intel.com with ESMTP; 09 Feb 2017 19:31:36 -0800 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.248.2; Thu, 9 Feb 2017 19:31:35 -0800 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.20]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.204]) with mapi id 14.03.0248.002; Fri, 10 Feb 2017 11:31:32 +0800 From: "Wu, Jiaxin" To: "Zhang, Lubo" , "edk2-devel@lists.01.org" CC: "Ye, Ting" , "Fu, Siyuan" Thread-Topic: [edk2] [patch] MdeModulePkg:Generate the correct operational state of the interface. Thread-Index: AQHSg0xF7XkmtOxZiUWTl8zGjneAYKFhlaOg Date: Fri, 10 Feb 2017 03:31:32 +0000 Message-ID: <895558F6EA4E3B41AC93A00D163B72741629A15B@SHSMSX103.ccr.corp.intel.com> References: <1486696652-40608-1-git-send-email-lubo.zhang@intel.com> In-Reply-To: <1486696652-40608-1-git-send-email-lubo.zhang@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMzNmMDAyNDMtNGZjZS00NjQ4LWI1Y2ItODMxMGMxZTRlMzlmIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6Im9pNWJHditQMW9UNUFySHc1cDVcL05wbk1WZGdjekc1aDB1MzQrdmFYcE5BPSJ9 x-ctpclassification: CTP_IC x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [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: , X-List-Received-Date: Fri, 10 Feb 2017 03:31:36 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Wu Jiaxin > -----Original Message----- > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of > Zhang Lubo > Sent: Friday, February 10, 2017 11:18 AM > To: edk2-devel@lists.01.org > Cc: Ye, Ting ; Fu, Siyuan ; Wu, > Jiaxin > Subject: [edk2] [patch] MdeModulePkg:Generate the correct operational > state of the interface. >=20 > 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. >=20 > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Zhang Lubo > Cc: Santhapur Naveen > Cc: Ye Ting > Cc: Fu Siyuan > Cc: Wu Jiaxin > --- > MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Config2Impl.c | 11 ++++++-- > --- > 1 file changed, 6 insertions(+), 5 deletions(-) >=20 > diff --git a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Config2Impl.c > b/MdeModulePkg/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->HwAddressSize); > } > -- > 1.9.5.msysgit.1 >=20 > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel