mirror of
https://github.com/apache/nuttx-apps.git
synced 2025-10-20 04:26:04 +08:00
ifconfig: Support ifconfig interface
and update arg limit
From comment in cmd_ifconfig, it seems that we support `ifconfig [interface]`, but actually not considering the interface param now. After this commit, we only print the information of interface specified in param, just like linux. Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
This commit is contained in:
@@ -595,6 +595,11 @@ int cmd_ifconfig(FAR struct nsh_vtbl_s *vtbl, int argc, FAR char **argv)
|
||||
|
||||
if (argc <= 2)
|
||||
{
|
||||
if (argc == 2)
|
||||
{
|
||||
return ifconfig_callback(vtbl, argv[1]);
|
||||
}
|
||||
|
||||
ret = nsh_foreach_netdev(ifconfig_callback, vtbl, "ifconfig");
|
||||
if (ret < 0)
|
||||
{
|
||||
|
Reference in New Issue
Block a user