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:
@@ -244,9 +244,10 @@ static const struct cmdmap_s g_cmdmap[] =
|
||||
|
||||
#ifdef CONFIG_NET
|
||||
# ifndef CONFIG_NSH_DISABLE_IFCONFIG
|
||||
{ "ifconfig", cmd_ifconfig, 1, 11,
|
||||
"[interface [<ip-address>|dhcp]] [dr|gw|gateway <dr-address>] "
|
||||
"[netmask <net-mask>] [dns <dns-address>] [hw <hw-mac>]" },
|
||||
{ "ifconfig", cmd_ifconfig, 1, 12,
|
||||
"[interface [address_family] [<ip-address>|dhcp]] "
|
||||
"[dr|gw|gateway <dr-address>] [netmask <net-mask>|prefixlen <len>] "
|
||||
"[dns <dns-address>] [hw <hw-mac>]" },
|
||||
# endif
|
||||
# ifndef CONFIG_NSH_DISABLE_IFUPDOWN
|
||||
{ "ifdown", cmd_ifdown, 2, 2, "<interface>" },
|
||||
|
Reference in New Issue
Block a user