diff options
author | Zhang Lubo <lubo.zhang@intel.com> | 2017-02-10 11:05:34 +0800 |
---|---|---|
committer | Jiaxin Wu <jiaxin.wu@intel.com> | 2017-02-20 10:09:30 +0800 |
commit | 80e63e846af4ac135da5faccead7450e956d6462 (patch) | |
tree | 4d7d20794fa41b004efc9be9d8e1870d30f507cf | |
parent | 770e463d063ed50309274b88a2660289eb23a2f4 (diff) | |
download | edk2-80e63e846af4ac135da5faccead7450e956d6462.tar.gz edk2-80e63e846af4ac135da5faccead7450e956d6462.tar.bz2 edk2-80e63e846af4ac135da5faccead7450e956d6462.zip |
NetworkPkg:Generate the correct operational state of the interface.
Currently, When there are more than 9 Ethernet ports available,
'ifconfig6 -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 <lubo.zhang@intel.com>
Cc: Santhapur Naveen <naveens@amiindia.co.in>
Cc: Ye Ting <ting.ye@intel.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Cc: Wu Jiaxin <jiaxin.wu@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
Reviewed-by: Wu Jiaxin <jiaxin.wu@intel.com>
-rw-r--r-- | NetworkPkg/Ip6Dxe/Ip6ConfigImpl.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/NetworkPkg/Ip6Dxe/Ip6ConfigImpl.c b/NetworkPkg/Ip6Dxe/Ip6ConfigImpl.c index 4e881fd6df..e309b69d77 100644 --- a/NetworkPkg/Ip6Dxe/Ip6ConfigImpl.c +++ b/NetworkPkg/Ip6Dxe/Ip6ConfigImpl.c @@ -1438,11 +1438,12 @@ Ip6ConfigInitIfInfo ( 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;
|