Eliminat a warning when both Ethernet and 6LoWPAN are enabled; improve some naming.
This commit is contained in:
parent
9aa35b2799
commit
d81d9c419b
@ -528,17 +528,17 @@ o ifconfig [nic_name [<ip-address>|dhcp]] [dr|gw|gateway <dr-address>] [netmask
|
||||
|
||||
nsh> mount -t procfs /proc
|
||||
|
||||
o ifdown <nic-name>
|
||||
o ifdown <interface>
|
||||
|
||||
Take down the interface identified by the name <nic-name>.
|
||||
Take down the interface identified by the name <interface>.
|
||||
|
||||
Example:
|
||||
|
||||
ifdown eth0
|
||||
|
||||
o ifup <nic-name>
|
||||
o ifup <interface>
|
||||
|
||||
Bring up down the interface identified by the name <nic-name>.
|
||||
Bring up down the interface identified by the name <interface>.
|
||||
|
||||
Example:
|
||||
|
||||
|
@ -240,11 +240,11 @@ static const struct cmdmap_s g_cmdmap[] =
|
||||
|
||||
#ifdef CONFIG_NET
|
||||
# ifndef CONFIG_NSH_DISABLE_IFCONFIG
|
||||
{ "ifconfig", cmd_ifconfig, 1, 11, "[nic-name [<ip-address>|dhcp]] [dr|gw|gateway <dr-address>] [netmask <net-mask>] [dns <dns-address>] [hw <hw-mac>]" },
|
||||
{ "ifconfig", cmd_ifconfig, 1, 11, "[interface [<ip-address>|dhcp]] [dr|gw|gateway <dr-address>] [netmask <net-mask>] [dns <dns-address>] [hw <hw-mac>]" },
|
||||
# endif
|
||||
# ifndef CONFIG_NSH_DISABLE_IFUPDOWN
|
||||
{ "ifdown", cmd_ifdown, 2, 2, "<nic-name>" },
|
||||
{ "ifup", cmd_ifup, 2, 2, "<nic-name>" },
|
||||
{ "ifdown", cmd_ifdown, 2, 2, "<interface>" },
|
||||
{ "ifup", cmd_ifup, 2, 2, "<interface>" },
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
/****************************************************************************
|
||||
* apps/nshlib/nsh_netcmds.c
|
||||
*
|
||||
* Copyright (C) 2007-2012, 2014-2015 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2007-2012, 2014-2015, 2017 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -758,10 +758,9 @@ int cmd_ifconfig(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv)
|
||||
bool inet6 = false;
|
||||
#endif
|
||||
bool badarg = false;
|
||||
#ifdef CONFIG_NET_ETHERNET
|
||||
#if defined(CONFIG_NET_ETHERNET)
|
||||
uint8_t mac[IFHWADDRLEN];
|
||||
#endif
|
||||
#ifdef CONFIG_NET_6LOWPAN
|
||||
#elif defined(CONFIG_NET_6LOWPAN)
|
||||
uint8_t eaddr[8];
|
||||
#endif
|
||||
#if defined(CONFIG_NSH_DHCPC)
|
||||
@ -769,11 +768,11 @@ int cmd_ifconfig(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv)
|
||||
#endif
|
||||
int ret;
|
||||
|
||||
/* With one or no arguments, ifconfig simply shows the status of Ethernet
|
||||
* device:
|
||||
/* With one or no arguments, ifconfig simply shows the status of the
|
||||
* network device:
|
||||
*
|
||||
* ifconfig
|
||||
* ifconfig [nic_name]
|
||||
* ifconfig [interface]
|
||||
*/
|
||||
|
||||
if (argc <= 2)
|
||||
|
Loading…
x
Reference in New Issue
Block a user