diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-09-12 21:42:36 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-09-12 21:42:36 +0000 |
commit | 10b060ab7da0989ec6f4fe79d31a0a3a390dfd80 (patch) | |
tree | 00d05ed1e5e55ee705dc48e8d79b27c80b42faf8 | |
parent | 6649286b2f4917b87ecdd790eba138aefcf2b210 (diff) | |
download | nuttx-10b060ab7da0989ec6f4fe79d31a0a3a390dfd80.tar.gz nuttx-10b060ab7da0989ec6f4fe79d31a0a3a390dfd80.tar.bz2 nuttx-10b060ab7da0989ec6f4fe79d31a0a3a390dfd80.zip |
Suppress network configuration in discover example if it is an NSH built-in functin
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5139 42af7a65-404d-4744-a932-0658087f49c3
-rw-r--r-- | apps/examples/discover/Kconfig | 14 | ||||
-rw-r--r-- | apps/examples/discover/main.c | 9 | ||||
-rw-r--r-- | nuttx/COPYING | 7 | ||||
-rwxr-xr-x | nuttx/tools/discover.py | 2 |
4 files changed, 22 insertions, 10 deletions
diff --git a/apps/examples/discover/Kconfig b/apps/examples/discover/Kconfig index c867b56f3..0a756d91d 100644 --- a/apps/examples/discover/Kconfig +++ b/apps/examples/discover/Kconfig @@ -17,29 +17,29 @@ config EXAMPLE_DISCOVER It is also possible to address all classes with a kind of broadcast discover. -if EXAMPLE_DISCOVER - config EXAMPLE_DISCOVER_DHCPC bool "DHCP Client" default n + depends on EXAMPLE_DISCOVER && !NSH_BUILTIN_APPS select NETUTILS_DHCPC select NETUTILS_RESOLV config EXAMPLE_DISCOVER_NOMAC - bool "Use canned MAC address" + bool "Use Canned MAC Address" default n + depends on EXAMPLE_DISCOVER && !NSH_BUILTIN_APPS config EXAMPLE_DISCOVER_IPADDR hex "Target IP address" default 0x0a000002 - depends on !EXAMPLE_DISCOVER_DHCPC + depends on EXAMPLE_DISCOVER && !NSH_BUILTIN_APPS && !EXAMPLE_DISCOVER_DHCPC config EXAMPLE_DISCOVER_DRIPADDR - hex "Router IP address" + hex "Default Router IP address (Gateway)" default 0x0a000001 + depends on EXAMPLE_DISCOVER && !NSH_BUILTIN_APPS config EXAMPLE_DISCOVER_NETMASK hex "Network Mask" default 0xffffff00 - -endif + depends on EXAMPLE_DISCOVER && !NSH_BUILTIN_APPS diff --git a/apps/examples/discover/main.c b/apps/examples/discover/main.c index 619995186..d076deb11 100644 --- a/apps/examples/discover/main.c +++ b/apps/examples/discover/main.c @@ -87,6 +87,11 @@ int discover_main(int argc, char *argv[]) { + /* If this task is excecutated as an NSH built-in function, then the + * network has already been configured by NSH's start-up logic. + */ + +#ifndef CONFIG_NSH_BUILTIN_APPS struct in_addr addr; #if defined(CONFIG_EXAMPLE_DISCOVER_DHCPC) || defined(CONFIG_EXAMPLE_DISCOVER_NOMAC) uint8_t mac[IFHWADDRLEN]; @@ -168,7 +173,9 @@ int discover_main(int argc, char *argv[]) dhcpc_close(handle); printf("IP: %s\n", inet_ntoa(ds.ipaddr)); } -#endif + +#endif /* CONFIG_EXAMPLE_DISCOVER_DHCPC */ +#endif /* CONFIG_NSH_BUILTIN_APPS */ if (discover_start() < 0) { diff --git a/nuttx/COPYING b/nuttx/COPYING index 82d3a8a58..863b81a2f 100644 --- a/nuttx/COPYING +++ b/nuttx/COPYING @@ -71,7 +71,12 @@ FAT Long File Names FAT implementations that include support for long filenames, and that removable solid state media and consumer devices only using short names would be unaffected. ..." - + + This Wikipedia entry has been updated with recent legal decisions in favor + of Microsoft. Refer to: + + http://en.wikipedia.org/wiki/File_Allocation_Table#Legal_issues + So you have been forewarned: Use the long filename at your own risk! uIP diff --git a/nuttx/tools/discover.py b/nuttx/tools/discover.py index 3279fe871..cc82a0cad 100755 --- a/nuttx/tools/discover.py +++ b/nuttx/tools/discover.py @@ -1,6 +1,6 @@ #!/usr/bin/env python ############################################################################ -# tools/indent.sh +# tools/discover.py # # Copyright (C) 2012 Max Holtzberg. All rights reserved. # Author: Max Holtzberg <mh@uvc.de> |