diff --git a/nshlib/README.txt b/nshlib/README.txt index 0bf4a50f7..bb28399b5 100644 --- a/nshlib/README.txt +++ b/nshlib/README.txt @@ -528,17 +528,17 @@ o ifconfig [nic_name [|dhcp]] [dr|gw|gateway ] [netmask nsh> mount -t procfs /proc -o ifdown +o ifdown - Take down the interface identified by the name . + Take down the interface identified by the name . Example: ifdown eth0 -o ifup +o ifup - Bring up down the interface identified by the name . + Bring up down the interface identified by the name . Example: diff --git a/nshlib/nsh_command.c b/nshlib/nsh_command.c index b4e334e0f..cca237151 100644 --- a/nshlib/nsh_command.c +++ b/nshlib/nsh_command.c @@ -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 [|dhcp]] [dr|gw|gateway ] [netmask ] [dns ] [hw ]" }, + { "ifconfig", cmd_ifconfig, 1, 11, "[interface [|dhcp]] [dr|gw|gateway ] [netmask ] [dns ] [hw ]" }, # endif # ifndef CONFIG_NSH_DISABLE_IFUPDOWN - { "ifdown", cmd_ifdown, 2, 2, "" }, - { "ifup", cmd_ifup, 2, 2, "" }, + { "ifdown", cmd_ifdown, 2, 2, "" }, + { "ifup", cmd_ifup, 2, 2, "" }, # endif #endif diff --git a/nshlib/nsh_netcmds.c b/nshlib/nsh_netcmds.c index f57a71a73..982173e1d 100644 --- a/nshlib/nsh_netcmds.c +++ b/nshlib/nsh_netcmds.c @@ -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 * * 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)