提交 04296e97 编写于 作者: G guozhanxin

[netdev] Add a non-null judgment to the netstat command.|为 netstat 命令添加非空判断。

上级 6da69f65
......@@ -1159,7 +1159,14 @@ static void netdev_cmd_netstat(void)
}
}
netdev->ops->netstat(netdev);
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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册