Skip to content

Commit 962acc3

Browse files
committed
1、修改宏定义的拼写错误,修改打印IMEI号时的打印错误
1 parent aac5e9d commit 962acc3

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

components/net/netdev/src/netdev.c

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -856,7 +856,7 @@ void netdev_low_level_set_dhcp_status(struct netdev *netdev, rt_bool_t is_enable
856856
static void netdev_list_if(void)
857857
{
858858
#define NETDEV_IFCONFIG_MAC_MAX_LEN 6
859-
#define NETDEV_IFCONFIG_IEMI_MAX_LEN 8
859+
#define NETDEV_IFCONFIG_IMEI_MAX_LEN 8
860860

861861
rt_ubase_t index;
862862
rt_slist_t *node = RT_NULL;
@@ -894,9 +894,15 @@ static void netdev_list_if(void)
894894
{
895895
/* two numbers are displayed at one time*/
896896
if (netdev->hwaddr[index] < 10 && index != netdev->hwaddr_len - 1)
897-
rt_kprintf("0");
898-
899-
rt_kprintf("%d", netdev->hwaddr[index]);
897+
{
898+
rt_kprintf("%02d", netdev->hwaddr[index]);
899+
}
900+
else
901+
{
902+
rt_kprintf("%d", netdev->hwaddr[index]);
903+
}
904+
905+
900906
}
901907
}
902908

0 commit comments

Comments
 (0)