You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by "wengzhe (via GitHub)" <gi...@apache.org> on 2023/01/31 14:21:26 UTC

[GitHub] [nuttx-apps] wengzhe commented on a diff in pull request #1519: ifconfig: Support `ifconfig interface` and update arg limit

wengzhe commented on code in PR #1519:
URL: https://github.com/apache/nuttx-apps/pull/1519#discussion_r1092001099


##########
nshlib/nsh_command.c:
##########
@@ -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,

Review Comment:
   Because previously `[address_family]` is not taken into count (which is needed for IPv6 and optional for IPv4), and we may have the longest command like `ifconfig eth0 inet6 fc00::2 gw fc00::1 prefixlen 64 dns 2001:4860:4860::8888 hw aa:bb:cc:dd:ee:ff`



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org