Merge pull request #2829 from Guozhanxin/netdev_fix
[netdev] Add a non-null judgment to the netstat command.
This commit is contained in:
commit
add4037764
|
@ -1159,7 +1159,14 @@ static void netdev_cmd_netstat(void)
|
|||
}
|
||||
}
|
||||
|
||||
if (netdev->ops->netstat != RT_NULL)
|
||||
{
|
||||
netdev->ops->netstat(netdev);
|
||||
}
|
||||
else
|
||||
{
|
||||
rt_kprintf("netstat: this command is not supported!\n");
|
||||
}
|
||||
}
|
||||
|
||||
int netdev_netstat(int argc, char **argv)
|
||||
|
|
Loading…
Reference in New Issue