anchao opened a new pull request, #1308: URL: https://github.com/apache/incubator-nuttx-apps/pull/1308
## Summary nshlib/netcmd: add sanity check for netdev add sanity check for nsh_foreach_netdev() to avoid unnecessary messages being printed Signed-off-by: chao an <anc...@xiaomi.com> ## Impact ## Testing enable CONFIG_NET_MLD, CONFIG_NET_STATISTICS ``` nsh> ls /proc/net /proc/net: stat mld tcp route/ eth0 ``` Before: (The message of proc node mld is printed out by ifconfig) ``` nsh> ifconfig Joins: 0000 Leaves: 0000 Sent Sched Sent Queries: 0000 0000 Reports: Ver 1: ---- 0000 Ver 2: 0000 0000 Done: 0000 0000 Received: Queries: Gen: 0000 MAS: 0000 MASS: 0000 Ucast: 0000 Bad: 0000 Reports: Ver 1: 0000 Ver 2: 0000 Done: 0000 eth0 Link encap:Ethernet HWaddr 00:00:00:00:00:00 at RUNNING inet addr:10.0.0.2 DRaddr:10.0.0.1 Mask:255.255.255.0 inet6 addr: fe80::200:ff:fe00:0/64 inet6 DRaddr: ::/64 IPv4 IPv6 TCP UDP ICMP ICMPv6 Received 0000 0000 0000 0000 0000 0000 Dropped 0000 0000 0000 0000 0000 0000 IPv4 VHL: 0000 Frg: 0000 IPv6 VHL: 0000 Checksum 0000 ---- 0000 0000 ---- ---- TCP ACK: 0000 SYN: 0000 RST: 0000 0000 Type 0000 0000 ---- ---- 0000 0000 Sent 0000 000b 0000 0000 0000 000b Rexmit ---- ---- 0000 ---- ---- ---- ``` after: ``` nsh> ifconfig eth0 Link encap:Ethernet HWaddr 00:00:00:00:00:00 at RUNNING inet addr:10.0.0.2 DRaddr:10.0.0.1 Mask:255.255.255.0 inet6 addr: fe80::200:ff:fe00:0/64 inet6 DRaddr: ::/64 IPv4 IPv6 TCP UDP ICMP ICMPv6 Received 0000 0000 0000 0000 0000 0000 Dropped 0000 0000 0000 0000 0000 0000 IPv4 VHL: 0000 Frg: 0000 IPv6 VHL: 0000 Checksum 0000 ---- 0000 0000 ---- ---- TCP ACK: 0000 SYN: 0000 RST: 0000 0000 Type 0000 0000 ---- ---- 0000 0000 Sent 0000 000b 0000 0000 0000 000b Rexmit ---- ---- 0000 ---- ---- ---- ``` -- 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-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org