aboutsummaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorpx4dev <px4@purgatory.org>2012-09-14 21:33:19 -0700
committerpx4dev <px4@purgatory.org>2012-09-14 21:33:19 -0700
commita3f21d914038f249e5e141b31410cc8554d94623 (patch)
tree59e60563503a42fce283149f0ca265c21faa19e2 /apps
parent53fe61a6211a86597834d5d8d7e90187f84717b0 (diff)
parentcfa24e37d6f153dbb5c7e2e0de6484719ea4a9b0 (diff)
downloadpx4-firmware-a3f21d914038f249e5e141b31410cc8554d94623.tar.gz
px4-firmware-a3f21d914038f249e5e141b31410cc8554d94623.tar.bz2
px4-firmware-a3f21d914038f249e5e141b31410cc8554d94623.zip
Merge branch 'NuttX/master'
Diffstat (limited to 'apps')
-rw-r--r--[-rwxr-xr-x]apps/ChangeLog.txt25
-rw-r--r--apps/Make.defs2
-rw-r--r--apps/examples/Kconfig104
-rw-r--r--apps/examples/Make.defs8
-rw-r--r--apps/examples/Makefile14
-rw-r--r--apps/examples/README.txt49
-rw-r--r--apps/examples/buttons/Makefile4
-rw-r--r--apps/examples/buttons/buttons_main.c (renamed from apps/examples/buttons/main.c)2
-rw-r--r--apps/examples/can/can_main.c2
-rw-r--r--apps/examples/hello/Makefile2
-rw-r--r--apps/examples/hello/hello_main.c (renamed from apps/examples/hello/main.c)2
-rw-r--r--apps/examples/helloxx/Makefile4
-rw-r--r--apps/examples/helloxx/helloxx_main.cxx (renamed from apps/examples/helloxx/main.cxx)2
-rw-r--r--apps/examples/lcdrw/Makefile105
-rw-r--r--apps/examples/lcdrw/lcdrw_main.c253
-rw-r--r--apps/examples/mm/Makefile2
-rw-r--r--apps/examples/mm/mm_main.c2
-rw-r--r--apps/examples/mount/Makefile2
-rw-r--r--apps/examples/mount/mount.h2
-rw-r--r--apps/examples/mount/mount_main.c2
-rw-r--r--apps/examples/mount/ramdisk.c2
-rw-r--r--apps/examples/nsh/Kconfig2
-rw-r--r--apps/examples/nsh/Makefile2
-rw-r--r--apps/examples/null/Makefile2
-rw-r--r--apps/examples/null/null_main.c2
-rw-r--r--apps/examples/ostest/Kconfig29
-rw-r--r--apps/examples/ostest/Makefile2
-rw-r--r--apps/examples/ostest/barrier.c2
-rw-r--r--apps/examples/ostest/cancel.c2
-rw-r--r--apps/examples/ostest/cond.c2
-rw-r--r--apps/examples/ostest/dev_null.c2
-rw-r--r--apps/examples/ostest/mutex.c2
-rw-r--r--apps/examples/ostest/ostest_main.c (renamed from apps/examples/ostest/main.c)2
-rw-r--r--apps/examples/ostest/posixtimer.c2
-rw-r--r--apps/examples/ostest/prioinherit.c2
-rw-r--r--apps/examples/ostest/rmutex.c2
-rw-r--r--apps/examples/ostest/roundrobin.c2
-rw-r--r--apps/examples/ostest/sem.c2
-rw-r--r--apps/examples/ostest/sighand.c2
-rw-r--r--apps/examples/ostest/timedmqueue.c2
-rw-r--r--apps/examples/ostest/timedwait.c2
-rw-r--r--apps/examples/pipe/Makefile2
-rw-r--r--apps/examples/pipe/interlock_test.c2
-rw-r--r--apps/examples/pipe/pipe.h2
-rw-r--r--apps/examples/pipe/pipe_main.c2
-rw-r--r--apps/examples/pipe/redirect_test.c2
-rw-r--r--apps/examples/pipe/transfer_test.c2
-rw-r--r--apps/examples/poll/Makefile2
-rw-r--r--apps/examples/poll/Makefile.host2
-rw-r--r--apps/examples/poll/poll_internal.h2
-rw-r--r--apps/examples/poll/poll_listener.c2
-rw-r--r--apps/examples/poll/poll_main.c2
-rw-r--r--apps/examples/poll/select_listener.c2
-rw-r--r--apps/examples/romfs/Makefile2
-rw-r--r--apps/examples/romfs/romfs_main.c2
-rw-r--r--apps/examples/serloop/Makefile4
-rw-r--r--apps/examples/serloop/serloop_main.c (renamed from apps/examples/serloop/main.c)4
-rw-r--r--apps/interpreters/Makefile2
-rw-r--r--apps/interpreters/ficl/Makefile2
-rw-r--r--[-rwxr-xr-x]apps/interpreters/ficl/README.txt0
-rw-r--r--apps/namedapp/Makefile2
-rw-r--r--apps/namedapp/namedapp.c2
-rw-r--r--apps/nshlib/Kconfig11
-rw-r--r--apps/nshlib/nsh_console.h2
-rw-r--r--apps/nshlib/nsh_consolemain.c3
-rw-r--r--apps/nshlib/nsh_mntcmds.c32
-rw-r--r--apps/nshlib/nsh_netinit.c1
-rw-r--r--apps/system/Make.defs16
-rw-r--r--apps/system/free/Makefile2
-rw-r--r--apps/system/free/README.txt2
-rw-r--r--apps/system/free/free.c2
-rw-r--r--[-rwxr-xr-x]apps/system/i2c/README.txt2
-rw-r--r--apps/system/i2c/i2c_bus.c2
-rw-r--r--apps/system/i2c/i2c_common.c2
-rw-r--r--apps/system/i2c/i2c_dev.c2
-rw-r--r--apps/system/i2c/i2c_get.c2
-rw-r--r--apps/system/i2c/i2c_main.c2
-rw-r--r--apps/system/i2c/i2c_set.c2
-rw-r--r--apps/system/i2c/i2c_verf.c2
-rw-r--r--apps/system/i2c/i2ctool.h2
-rw-r--r--[-rwxr-xr-x]apps/system/install/Makefile2
-rw-r--r--[-rwxr-xr-x]apps/system/install/README.txt0
-rw-r--r--[-rwxr-xr-x]apps/system/install/install.c0
-rw-r--r--apps/system/readline/Kconfig17
-rw-r--r--apps/system/readline/readline.c29
85 files changed, 312 insertions, 526 deletions
diff --git a/apps/ChangeLog.txt b/apps/ChangeLog.txt
index 5b75f40ed..7650b0ff4 100755..100644
--- a/apps/ChangeLog.txt
+++ b/apps/ChangeLog.txt
@@ -305,3 +305,28 @@
netutils/webserver/httpd_fsdata.c has been replaced with a dynamically
built configuration located at apps/examples/uip (Contributed by
Max Holtzberg).
+ * apps/netutils/webserver: Several inenhancements from Kate including the
+ ability to elide scripting and SERVER headers and the ability to map
+ files into memory before transferring them.
+ * apps/netutils/webserver: Add ability to map a URL to CGI function.
+ Contributed by Kate.
+ * apps/nshlib/nsh_mntcmds.c: The changes of 6.21 introduced holes in the
+ error handling: Now the number of arguments to mount can be 0 or 4.
+ Additional parameter checking is required to prevent mysterious errors
+ (submiteed by Kate).
+ * apps/netutils/webserver/httpd_mmap.c: Fix errors when the mmap()
+ length is zero (submitted by Kate).
+ * apps/netutils/webserver/httpd_sendfile.c: Add and option,
+ CONFIG_NETUTILS_HTTPD_SENDFILE to transfer files using the NuttX
+ sendfile() interface.
+ * apps/netutils/discover: A UDP network discovery utility contributed
+ by Max Holtzberg.
+ * apps/examples/discover: A test example for the UDP network discovery
+ utility (also contribed by Max Holtzberg).
+ * apps/examples/*/main.c: Too many files called main.c. Each renamed
+ to something unique so that they will not collide in the archive.
+ * apps/netutils/xmlrpc: The Embeddable Lightweight XML-RPC Server
+ discussed at http://www.drdobbs.com/web-development/\
+ an-embeddable-lightweight-xml-rpc-server/184405364. Contributed by
+ Max Holtzberg.
+
diff --git a/apps/Make.defs b/apps/Make.defs
index f37a654c4..53ac7f8be 100644
--- a/apps/Make.defs
+++ b/apps/Make.defs
@@ -3,7 +3,7 @@
# Common make definitions provided to all applications
#
# Copyright (C) 2011 Gregory Nutt. All rights reserved.
-# Author: Gregory Nutt <spudmonkey@racsa.co.cr>
+# Author: Gregory Nutt <gnutt@nuttx.org>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
diff --git a/apps/examples/Kconfig b/apps/examples/Kconfig
index a20f7c2e7..865268add 100644
--- a/apps/examples/Kconfig
+++ b/apps/examples/Kconfig
@@ -3,115 +3,115 @@
# see misc/tools/kconfig-language.txt.
#
-menu "ADC example"
+menu "ADC Example"
source "$APPSDIR/examples/adc/Kconfig"
endmenu
-menu "Buttons example"
+menu "Buttons Example"
source "$APPSDIR/examples/buttons/Kconfig"
endmenu
-menu "CAN example"
+menu "CAN Example"
source "$APPSDIR/examples/can/Kconfig"
endmenu
-menu "USB CDC/ACM class driver example"
+menu "USB CDC/ACM Class Driver Example"
source "$APPSDIR/examples/cdcacm/Kconfig"
endmenu
-menu "USB composite class driver example"
+menu "USB composite Class Driver Example"
source "$APPSDIR/examples/composite/Kconfig"
endmenu
-menu "DHCP server example"
+menu "DHCP Server Example"
source "$APPSDIR/examples/dhcpd/Kconfig"
endmenu
-menu "FTP client example"
+menu "FTP Client Example"
source "$APPSDIR/examples/ftpc/Kconfig"
endmenu
-menu "FTP server example"
+menu "FTP Server Example"
source "$APPSDIR/examples/ftpd/Kconfig"
endmenu
-menu "\"Hello, World!\" example"
+menu "\"Hello, World!\" Example"
source "$APPSDIR/examples/hello/Kconfig"
endmenu
-menu "\"Hello, World!\" C++ example"
+menu "\"Hello, World!\" C++ Example"
source "$APPSDIR/examples/helloxx/Kconfig"
endmenu
-menu "USB HID keyboard example"
+menu "USB HID Keyboard Example"
source "$APPSDIR/examples/hidkbd/Kconfig"
endmenu
-menu "IGMP example"
+menu "IGMP Example"
source "$APPSDIR/examples/igmp/Kconfig"
endmenu
-menu "LCD read/write example"
+menu "LCD Read/Write Example"
source "$APPSDIR/examples/lcdrw/Kconfig"
endmenu
-menu "Memory management example"
+menu "Memory Management Example"
source "$APPSDIR/examples/mm/Kconfig"
endmenu
-menu "File system mount example"
+menu "File System Mount Example"
source "$APPSDIR/examples/mount/Kconfig"
endmenu
-menu "FreeModBus example"
+menu "FreeModBus Example"
source "$APPSDIR/examples/modbus/Kconfig"
endmenu
-menu "Network test example"
+menu "Network Test Example"
source "$APPSDIR/examples/nettest/Kconfig"
endmenu
-menu "NuttShell (NSH) example"
+menu "NuttShell (NSH) Example"
source "$APPSDIR/examples/nsh/Kconfig"
endmenu
-menu "NULL example"
+menu "NULL Example"
source "$APPSDIR/examples/null/Kconfig"
endmenu
-menu "NX graphics example"
+menu "NX Graphics Example"
source "$APPSDIR/examples/nx/Kconfig"
endmenu
-menu "NxConsole example"
+menu "NxConsole Example"
source "$APPSDIR/examples/nxconsole/Kconfig"
endmenu
-menu "NXFFS file system example"
+menu "NXFFS File System Example"
source "$APPSDIR/examples/nxffs/Kconfig"
endmenu
-menu "NXFLAT example"
+menu "NXFLAT Example"
source "$APPSDIR/examples/nxflat/Kconfig"
endmenu
-menu "NX graphics \"Hello, World!\" example"
+menu "NX Graphics \"Hello, World!\" Example"
source "$APPSDIR/examples/nxhello/Kconfig"
endmenu
-menu "NX graphics image example"
+menu "NX Graphics image Example"
source "$APPSDIR/examples/nximage/Kconfig"
endmenu
-menu "NX graphics lines example"
+menu "NX Graphics lines Example"
source "$APPSDIR/examples/nxlines/Kconfig"
endmenu
-menu "NX graphics text example"
+menu "NX Graphics Text Example"
source "$APPSDIR/examples/nxtext/Kconfig"
endmenu
-menu "OS test example"
+menu "OS Test Example"
source "$APPSDIR/examples/ostest/Kconfig"
endmenu
@@ -119,82 +119,90 @@ menu "Pascal \"Hello, World!\"example"
source "$APPSDIR/examples/pashello/Kconfig"
endmenu
-menu "Pipe example"
+menu "Pipe Example"
source "$APPSDIR/examples/pipe/Kconfig"
endmenu
-menu "Poll example"
+menu "Poll Example"
source "$APPSDIR/examples/poll/Kconfig"
endmenu
-menu "Pulse width modulation (PWM) example"
+menu "Pulse Width Modulation (PWM) Example"
source "$APPSDIR/examples/pwm/Kconfig"
endmenu
-menu "Quadrature encoder example"
+menu "Quadrature Encoder Example"
source "$APPSDIR/examples/qencoder/Kconfig"
endmenu
-menu "RGMP example"
+menu "RGMP Example"
source "$APPSDIR/examples/rgmp/Kconfig"
endmenu
-menu "ROMFS example"
+menu "ROMFS Example"
source "$APPSDIR/examples/romfs/Kconfig"
endmenu
-menu "sendmail example"
+menu "sendmail Example"
source "$APPSDIR/examples/sendmail/Kconfig"
endmenu
-menu "Serial loopback example"
+menu "Serial Loopback Example"
source "$APPSDIR/examples/serloop/Kconfig"
endmenu
-menu "Telnet daemon example"
+menu "Telnet Daemon Example"
source "$APPSDIR/examples/telnetd/Kconfig"
endmenu
-menu "THTTPD web server example"
+menu "THTTPD Web Server Example"
source "$APPSDIR/examples/thttpd/Kconfig"
endmenu
-menu "TIFF generation example"
+menu "TIFF Generation Example"
source "$APPSDIR/examples/tiff/Kconfig"
endmenu
-menu "Touchscreen example"
+menu "Touchscreen Example"
source "$APPSDIR/examples/touchscreen/Kconfig"
endmenu
-menu "UDP example"
+menu "UDP Example"
source "$APPSDIR/examples/udp/Kconfig"
endmenu
-menu "uIP web server example"
+menu "UDP Discovery Daemon Example"
+source "$APPSDIR/examples/discover/Kconfig"
+endmenu
+
+menu "uIP Web Server Example"
source "$APPSDIR/examples/uip/Kconfig"
endmenu
-menu "USB serial test example"
+menu "USB Serial Test Example"
source "$APPSDIR/examples/usbserial/Kconfig"
endmenu
-menu "USB mass storage class example"
+menu "USB Mass Storage Class Example"
source "$APPSDIR/examples/usbstorage/Kconfig"
endmenu
-menu "USB serial terminal example"
+menu "USB Serial Terminal Example"
source "$APPSDIR/examples/usbterm/Kconfig"
endmenu
-menu "Watchdog timer example"
+menu "Watchdog timer Example"
source "$APPSDIR/examples/watchdog/Kconfig"
endmenu
-menu "wget example"
+menu "wget Example"
source "$APPSDIR/examples/wget/Kconfig"
endmenu
-menu "WLAN example"
+menu "WLAN Example"
source "$APPSDIR/examples/wlan/Kconfig"
endmenu
+
+menu "XML RPC Example"
+source "$APPSDIR/examples/xmlrpc/Kconfig"
+endmenu
diff --git a/apps/examples/Make.defs b/apps/examples/Make.defs
index aa8d83733..a6e0ae88e 100644
--- a/apps/examples/Make.defs
+++ b/apps/examples/Make.defs
@@ -58,6 +58,10 @@ ifeq ($(CONFIG_EXAMPLES_DHCPD),y)
CONFIGURED_APPS += examples/dhcpd
endif
+ifeq ($(CONFIG_EXAMPLE_DISCOVER),y)
+CONFIGURED_APPS += examples/discover
+endif
+
ifeq ($(CONFIG_EXAMPLES_FTPC),y)
CONFIGURED_APPS += examples/ftpc
endif
@@ -221,3 +225,7 @@ endif
ifeq ($(CONFIG_EXAMPLES_WLAN),y)
CONFIGURED_APPS += examples/wlan
endif
+
+ifeq ($(CONFIG_EXAMPLES_XMLRPC),y)
+CONFIGURED_APPS += examples/xmlrpc
+endif
diff --git a/apps/examples/Makefile b/apps/examples/Makefile
index ad5be6497..453f99ce7 100644
--- a/apps/examples/Makefile
+++ b/apps/examples/Makefile
@@ -37,11 +37,12 @@
# Sub-directories
-SUBDIRS = adc buttons can cdcacm composite dhcpd ftpc ftpd hello helloxx \
- hidkbd igmp lcdrw mm modbus mount nettest nsh null nx nxconsole nxffs \
- nxflat nxhello nximage nxlines nxtext ostest pashello pipe poll pwm \
- qencoder rgmp romfs serloop telnetd thttpd tiff touchscreen udp uip \
- usbserial sendmail usbstorage usbterm watchdog wget wlan
+SUBDIRS = adc buttons can cdcacm composite dhcpd discover ftpc ftpd hello
+SUBDIRS += helloxx hidkbd igmp lcdrw mm modbus mount nettest nsh null nx
+SUBDIRS += nxconsole nxffs nxflat nxhello nximage nxlines nxtext ostest
+SUBDIRS += pashello pipe poll pwm qencoder rgmp romfs serloop telnetd
+SUBDIRS += thttpd tiff touchscreen udp uip usbserial sendmail usbstorage
+SUBDIRS += usbterm watchdog wget wlan
# Sub-directories that might need context setup. Directories may need
# context setup for a variety of reasons, but the most common is because
@@ -56,7 +57,8 @@ SUBDIRS = adc buttons can cdcacm composite dhcpd ftpc ftpd hello helloxx \
CNTXTDIRS = pwm
ifeq ($(CONFIG_NSH_BUILTIN_APPS),y)
-CNTXTDIRS += adc can cdcacm composite ftpd dhcpd modbus nettest qencoder telnetd watchdog
+CNTXTDIRS += adc can cdcacm composite discover ftpd dhcpd modbus nettest
+CNTXTDIRS += qencoder telnetd watchdog
endif
ifeq ($(CONFIG_EXAMPLES_HELLO_BUILTIN),y)
diff --git a/apps/examples/README.txt b/apps/examples/README.txt
index 52d7279da..12d6d3892 100644
--- a/apps/examples/README.txt
+++ b/apps/examples/README.txt
@@ -275,6 +275,28 @@ examples/dhcpd
CONFIGURED_APPS += uiplib
+examples/discover
+^^^^^^^^^^^^^^^^^
+
+ This example exercises netutils/discover utility. This example initializes
+ and starts the UDP discover daemon. This daemon is useful for discovering
+ devices in local networks, especially with DHCP configured devices. It
+ listens for UDP broadcasts which also can include a device class so that
+ groups of devices can be discovered. It is also possible to address all
+ classes with a kind of broadcast discover.
+
+ This example will automatically be built as an NSH built-in if
+ CONFIG_NSH_BUILTIN_APPS is selected. Otherwise, it will be a standalone
+ program with entry point "discover_main".
+
+ NuttX configuration settings:
+
+ CONFIG_EXAMPLE_DISCOVER_DHCPC - DHCP Client
+ CONFIG_EXAMPLE_DISCOVER_NOMAC - Use canned MAC address
+ CONFIG_EXAMPLE_DISCOVER_IPADDR - Target IP address
+ CONFIG_EXAMPLE_DISCOVER_DRIPADDR - Router IP address
+ CONFIG_EXAMPLE_DISCOVER_NETMASK - Network Mask
+
examples/ftpc
^^^^^^^^^^^^^
@@ -1111,7 +1133,7 @@ examples/rgmp
See http://rgmp.sourceforge.net/wiki/index.php/Main_Page for further
- At present, the RGMP example folder contains only an empty main.c file.
+ At present, the RGMP example folder contains only an empty rgmp_main.c file.
examples/romfs
^^^^^^^^^^^^^^
@@ -1646,8 +1668,27 @@ examples/wget
file in the configuration driver with instruction to build applications
like:
- CONFIGURED_APPS += uiplib
- CONFIGURED_APPS += resolv
- CONFIGURED_APPS += webclient
+ CONFIGURED_APPS += uiplib
+ CONFIGURED_APPS += resolv
+ CONFIGURED_APPS += webclient
+examples/xmlrpc
+
+ This example exercises the "Embeddable Lightweight XML-RPC Server" which
+ is discussed at:
+
+ http://www.drdobbs.com/web-development/an-embeddable-lightweight-xml-rpc-server/184405364
+
+ Configuration options:
+ CONFIG_EXAMPLES_XMLRPC_BUFFERSIZE - HTTP buffer size. Default 1024
+ CONFIG_EXAMPLES_XMLRPC_DHCPC - Use DHCP Client. Default n. Ignored
+ if CONFIG_NSH_BUILTIN_APPS is selected.
+ CONFIG_EXAMPLES_XMLRPC_NOMAC - Use Canned MAC Address. Defaul n. Ignored
+ if CONFIG_NSH_BUILTIN_APPS is selected.
+ CONFIG_EXAMPLES_XMLRPC_IPADDR - Target IP address. Default 0x0a000002.
+ Ignored if CONFIG_NSH_BUILTIN_APPS is selected.
+ CONFIG_EXAMPLES_XMLRPC_DRIPADDR - Default Router IP address (Gateway).
+ Default 0x0a000001. Ignored if CONFIG_NSH_BUILTIN_APPS is selected.
+ CONFIG_EXAMPLES_XMLRPC_NETMASK - Network Mask. Default 0xffffff00
+ Ignored if CONFIG_NSH_BUILTIN_APPS is selected.
diff --git a/apps/examples/buttons/Makefile b/apps/examples/buttons/Makefile
index 9c0587199..25d1ef2c2 100644
--- a/apps/examples/buttons/Makefile
+++ b/apps/examples/buttons/Makefile
@@ -2,7 +2,7 @@
# apps/examples/buttons/Makefile
#
# Copyright (C) 2011 Gregory Nutt. All rights reserved.
-# Author: Gregory Nutt <spudmonkey@racsa.co.cr>
+# Author: Gregory Nutt <gnutt@nuttx.org>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
@@ -40,7 +40,7 @@ include $(APPDIR)/Make.defs
# Hello, World! Example
ASRCS =
-CSRCS = main.c
+CSRCS = buttons_main.c
AOBJS = $(ASRCS:.S=$(OBJEXT))
COBJS = $(CSRCS:.c=$(OBJEXT))
diff --git a/apps/examples/buttons/main.c b/apps/examples/buttons/buttons_main.c
index 50124512c..a3f6449d4 100644
--- a/apps/examples/buttons/main.c
+++ b/apps/examples/buttons/buttons_main.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * examples/buttons/main.c
+ * examples/buttons/buttons_main.c
*
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
diff --git a/apps/examples/can/can_main.c b/apps/examples/can/can_main.c
index d3ca24119..482d3f438 100644
--- a/apps/examples/can/can_main.c
+++ b/apps/examples/can/can_main.c
@@ -2,7 +2,7 @@
* examples/can/can_main.c
*
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
+ * Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/apps/examples/hello/Makefile b/apps/examples/hello/Makefile
index 9c3cda894..1d78d723e 100644
--- a/apps/examples/hello/Makefile
+++ b/apps/examples/hello/Makefile
@@ -46,7 +46,7 @@ STACKSIZE = 2048
# Hello, World! Example
ASRCS =
-CSRCS = main.c
+CSRCS = hello_main.c
AOBJS = $(ASRCS:.S=$(OBJEXT))
COBJS = $(CSRCS:.c=$(OBJEXT))
diff --git a/apps/examples/hello/main.c b/apps/examples/hello/hello_main.c
index 7e07cffd1..229027c36 100644
--- a/apps/examples/hello/main.c
+++ b/apps/examples/hello/hello_main.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * examples/hello/main.c
+ * examples/hello/hello_main.c
*
* Copyright (C) 2008, 2011-2012 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
diff --git a/apps/examples/helloxx/Makefile b/apps/examples/helloxx/Makefile
index c34378d24..8e85eab23 100644
--- a/apps/examples/helloxx/Makefile
+++ b/apps/examples/helloxx/Makefile
@@ -2,7 +2,7 @@
# apps/examples/helloxx/Makefile
#
# Copyright (C) 2009-2011 Gregory Nutt. All rights reserved.
-# Author: Gregory Nutt <spudmonkey@racsa.co.cr>
+# Author: Gregory Nutt <gnutt@nuttx.org>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
@@ -41,7 +41,7 @@ include $(APPDIR)/Make.defs
ASRCS =
CSRCS =
-CXXSRCS = main.cxx
+CXXSRCS = helloxx_main.cxx
AOBJS = $(ASRCS:.S=$(OBJEXT))
COBJS = $(CSRCS:.c=$(OBJEXT))
diff --git a/apps/examples/helloxx/main.cxx b/apps/examples/helloxx/helloxx_main.cxx
index fcec7c761..60fd0487b 100644
--- a/apps/examples/helloxx/main.cxx
+++ b/apps/examples/helloxx/helloxx_main.cxx
@@ -1,5 +1,5 @@
//***************************************************************************
-// examples/helloxx/main.cxx
+// examples/helloxx/helloxx_main.cxx
//
// Copyright (C) 2009, 2011-2012 Gregory Nutt. All rights reserved.
// Author: Gregory Nutt <gnutt@nuttx.org>
diff --git a/apps/examples/lcdrw/Makefile b/apps/examples/lcdrw/Makefile
deleted file mode 100644
index 053c62670..000000000
--- a/apps/examples/lcdrw/Makefile
+++ /dev/null
@@ -1,105 +0,0 @@
-############################################################################
-# apps/examples/lcdrw/Makefile
-#
-# Copyright (C) 2011 Gregory Nutt. All rights reserved.
-# Author: Gregory Nutt <spudmonkey@racsa.co.cr>
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in
-# the documentation and/or other materials provided with the
-# distribution.
-# 3. Neither the name NuttX nor the names of its contributors may be
-# used to endorse or promote products derived from this software
-# without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
-# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
-# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-# POSSIBILITY OF SUCH DAMAGE.
-#
-############################################################################
-
--include $(TOPDIR)/.config
--include $(TOPDIR)/Make.defs
-include $(APPDIR)/Make.defs
-
-# LCD Read/Write Test
-
-ASRCS =
-CSRCS = lcdrw_main.c
-
-AOBJS = $(ASRCS:.S=$(OBJEXT))
-COBJS = $(CSRCS:.c=$(OBJEXT))
-
-SRCS = $(ASRCS) $(CSRCS)
-OBJS = $(AOBJS) $(COBJS)
-
-ifeq ($(WINTOOL),y)
- BIN = "${shell cygpath -w $(APPDIR)/libapps$(LIBEXT)}"
-else
- BIN = "$(APPDIR)/libapps$(LIBEXT)"
-endif
-
-ROOTDEPPATH = --dep-path .
-
-# LCD R/W built-in application info
-
-APPNAME = lcdrw
-PRIORITY = SCHED_PRIORITY_DEFAULT
-STACKSIZE = 2048
-
-# Common build
-
-VPATH =
-
-all: .built
-.PHONY: clean depend distclean
-
-$(AOBJS): %$(OBJEXT): %.S
- $(call ASSEMBLE, $<, $@)
-
-$(COBJS): %$(OBJEXT): %.c
- $(call COMPILE, $<, $@)
-
-.built: $(OBJS)
- @( for obj in $(OBJS) ; do \
- $(call ARCHIVE, $(BIN), $${obj}); \
- done ; )
- @touch .built
-
-.context:
-ifeq ($(CONFIG_EXAMPLES_LCDRW_BUILTIN),y)
- $(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main)
- @touch $@
-endif
-
-context: .context
-
-.depend: Makefile $(SRCS)
- @$(MKDEP) $(ROOTDEPPATH) $(CC) -- $(CFLAGS) -- $(SRCS) >Make.dep
- @touch $@
-
-depend: .depend
-
-clean:
- @rm -f *.o *~ .*.swp .built
- $(call CLEAN)
-
-distclean: clean
- @rm -f Make.dep .depend
-
--include Make.dep
diff --git a/apps/examples/lcdrw/lcdrw_main.c b/apps/examples/lcdrw/lcdrw_main.c
deleted file mode 100644
index f39e1849d..000000000
--- a/apps/examples/lcdrw/lcdrw_main.c
+++ /dev/null
@@ -1,253 +0,0 @@
-/****************************************************************************
- * examples/lcdrw/lcdrw_main.c
- *
- * Copyright (C) 2011 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- * 3. Neither the name NuttX nor the names of its contributors may be
- * used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
- * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- *
- ****************************************************************************/
-
-/****************************************************************************
- * Included Files
- ****************************************************************************/
-
-#include <nuttx/config.h>
-
-#include <stdio.h>
-#include <stdlib.h>
-
-#include <nuttx/lcd/lcd.h>
-#include <nuttx/nx/nxglib.h>
-
-/****************************************************************************
- * Definitions
- ****************************************************************************/
-/* Configuration ************************************************************/
-/* Most of the NX configuration settings are probbably *not* needed by this
- * example. But, presumeably you are using NX too and so the checks might
- * be good for you.
- */
-
-#ifndef CONFIG_NX
-# error "CONFIG_NX must be defined to use this test"
-#endif
-
-#ifndef CONFIG_NX_LCDDRIVER
-# error "CONFIG_NX_LCDDRIVER must be defined to use this test"
-#endif
-
-#ifndef CONFIG_EXAMPLES_LCDRW_BPP
-# define CONFIG_EXAMPLES_LCDRW_BPP 16
-#endif
-
-#if CONFIG_EXAMPLES_LCDRW_BPP != 16
-# error "Currently only RGB565 is supported -- feel free to extend"
-#endif
-
-#ifdef CONFIG_NX_DISABLE_16BPP
-# error "CONFIG_NX_DISABLE_16BPP disables 16-bit support"
-#endif
-
-#ifndef CONFIG_EXAMPLES_LDCRW_DEVNO
-# define CONFIG_EXAMPLES_LDCRW_DEVNO 0
-#endif
-
-#ifndef CONFIG_EXAMPLES_LDCRW_XRES
-# define CONFIG_EXAMPLES_LDCRW_XRES 240
-#endif
-
-#ifndef CONFIG_EXAMPLES_LDCRW_YRES
-# define CONFIG_EXAMPLES_LDCRW_YRES 320
-#endif
-
-/****************************************************************************
- * Private Types
- ****************************************************************************/
-
-struct lcdrw_instance_s
-{
- /* LCD device handle and planeinfo */
-
- FAR struct lcd_dev_s *dev;
- struct lcd_planeinfo_s pinfo;
-};
-
-/****************************************************************************
- * Private Data
- ****************************************************************************/
-
-/****************************************************************************
- * Private Functions
- ****************************************************************************/
-/****************************************************************************
- * Name: lcdrw_initialize
- ****************************************************************************/
-
-static inline int lcdrw_initialize(FAR struct lcdrw_instance_s *inst)
-{
- int ret;
-
- /* Initialize the LCD device */
-
- printf("screens_initialize: Initializing LCD\n");
- ret = up_lcdinitialize();
- if (ret < 0)
- {
- fprintf(stderr, "screens_initialize: up_lcdinitialize failed: %d\n", -ret);
- return ret;
- }
-
- /* Get the device instance. */
-
- printf("Get LCD instance\n");
- inst->dev = up_lcdgetdev(CONFIG_EXAMPLES_LDCRW_DEVNO);
- if (!inst->dev)
- {
- fprintf(stderr, "up_lcdgetdev failed, devno=%d\n", CONFIG_EXAMPLES_LDCRW_DEVNO);
- return ret;
- }
-
- /* Turn the LCD on at 75% power. This should not be necessary. */
-
- (void)inst->dev->setpower(inst->dev, ((3*CONFIG_LCD_MAXPOWER + 3)/4));
-
- /* Get the planeinfo structure */
-
- ret = inst->dev->getplaneinfo(inst->dev, 0, &inst->pinfo);
- if (ret < 0)
- {
- fprintf(stderr, "getplaneinfo failed: %d\n", ret);
- }
- return ret;
-}
-
-/****************************************************************************
- * Public Functions
- ****************************************************************************/
-
-/****************************************************************************
- * Name: lcdrw_main
- ****************************************************************************/
-
-int lcdrw_main(int argc, char *argv[])
-{
- struct lcdrw_instance_s inst;
- nxgl_coord_t row;
- nxgl_coord_t col;
- uint16_t value;
- uint32_t offset;
- FAR uint16_t *ptr;
- int ret;
-
- /* Initialize the LCD driver */
-
- ret = lcdrw_initialize(&inst);
- if (ret < 0)
- {
- exit(1);
- }
-
- /* Loop, writing all possible values to the LCD */
-
- value = 0;
- for (row = 0; row < CONFIG_EXAMPLES_LDCRW_YRES; row++)
- {
- /* Create a dummy row. The important thing is to try all
- * bit combinations in a predictable way.
- */
-
- ptr = (FAR uint16_t*)inst.pinfo.buffer;
- for (col = 0; col < CONFIG_EXAMPLES_LDCRW_XRES; col++)
- {
- *ptr++ = value++;
- }
-
- /* Write the row to the LCD */
-
- ret = inst.pinfo.putrun(row, 0, inst.pinfo.buffer,
- CONFIG_EXAMPLES_LDCRW_XRES);
- if (ret < 0)
- {
- fprintf(stderr, "putrun failed: %d\n", ret);
- exit(1);
- }
- }
-
- /* Print a header */
-
- printf(" ");
- for (col = 0; col < 15; col++)
- {
- printf("---%x ", col);
- }
- printf("---f\n");
-
- /* Then read each line back from the LCD. */
-
- offset = 0;
- for (row = 0; row < CONFIG_EXAMPLES_LDCRW_YRES; row++)
- {
- /* Read the row */
-
- ret = inst.pinfo.getrun(row, 0, inst.pinfo.buffer,
- CONFIG_EXAMPLES_LDCRW_XRES);
- if (ret < 0)
- {
- fprintf(stderr, "getrun failed: %d\n", ret);
- exit(1);
- }
-
- /* Then dump the row to the display */
-
- ptr = (FAR uint16_t*)inst.pinfo.buffer;
- for (col = 0; col < CONFIG_EXAMPLES_LDCRW_XRES; col++)
- {
- if ((offset & 15) == 0)
- {
- printf("%06x ", offset);
- }
-
- value = *ptr++;
- offset++;
-
- if ((offset & 15) == 0)
- {
- printf("%04x\n", value);
- }
- else
- {
- printf("%04x ", value);
- }
- }
- }
- fflush(stdout);
-
- return 0;
-}
-
diff --git a/apps/examples/mm/Makefile b/apps/examples/mm/Makefile
index e5d9ffb4c..24ed4926f 100644
--- a/apps/examples/mm/Makefile
+++ b/apps/examples/mm/Makefile
@@ -2,7 +2,7 @@
# apps/examples/mm/Makefile
#
# Copyright (C) 2011 Gregory Nutt. All rights reserved.
-# Author: Gregory Nutt <spudmonkey@racsa.co.cr>
+# Author: Gregory Nutt <gnutt@nuttx.org>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
diff --git a/apps/examples/mm/mm_main.c b/apps/examples/mm/mm_main.c
index 5d45efdc5..149550418 100644
--- a/apps/examples/mm/mm_main.c
+++ b/apps/examples/mm/mm_main.c
@@ -2,7 +2,7 @@
* examples/mm/mm_main.c
*
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
+ * Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/apps/examples/mount/Makefile b/apps/examples/mount/Makefile
index 7e48ea44a..69cf970cf 100644
--- a/apps/examples/mount/Makefile
+++ b/apps/examples/mount/Makefile
@@ -2,7 +2,7 @@
# apps/Makefile
#
# Copyright (C) 2007-2008, 2010-2010 Gregory Nutt. All rights reserved.
-# Author: Gregory Nutt <spudmonkey@racsa.co.cr>
+# Author: Gregory Nutt <gnutt@nuttx.org>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
diff --git a/apps/examples/mount/mount.h b/apps/examples/mount/mount.h
index 68a03674d..c75686086 100644
--- a/apps/examples/mount/mount.h
+++ b/apps/examples/mount/mount.h
@@ -2,7 +2,7 @@
* examples/mount/mount.h
*
* Copyright (C) 2008 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
+ * Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/apps/examples/mount/mount_main.c b/apps/examples/mount/mount_main.c
index 5f881e40c..e0eb8a615 100644
--- a/apps/examples/mount/mount_main.c
+++ b/apps/examples/mount/mount_main.c
@@ -2,7 +2,7 @@
* examples/mount/mount_main.c
*
* Copyright (C) 2007-2009, 2011 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
+ * Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/apps/examples/mount/ramdisk.c b/apps/examples/mount/ramdisk.c
index 9688580c0..83ef74e42 100644
--- a/apps/examples/mount/ramdisk.c
+++ b/apps/examples/mount/ramdisk.c
@@ -2,7 +2,7 @@
* examples/mount/ramdisk.c
*
* Copyright (C) 2008-2009 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
+ * Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/apps/examples/nsh/Kconfig b/apps/examples/nsh/Kconfig
index 289c7e515..309aa925e 100644
--- a/apps/examples/nsh/Kconfig
+++ b/apps/examples/nsh/Kconfig
@@ -6,6 +6,8 @@
config EXAMPLES_NSH
bool "NuttShell (NSH) example"
default n
+ select NSH_LIBRARY
+ select SYSTEM_READLINE
---help---
Enable the NuttShell (NSH) example
diff --git a/apps/examples/nsh/Makefile b/apps/examples/nsh/Makefile
index b5844f9ed..bad40fb2e 100644
--- a/apps/examples/nsh/Makefile
+++ b/apps/examples/nsh/Makefile
@@ -2,7 +2,7 @@
# apps/examples/nsh/Makefile
#
# Copyright (C) 2007-2008, 2010-2011 Gregory Nutt. All rights reserved.
-# Author: Gregory Nutt <spudmonkey@racsa.co.cr>
+# Author: Gregory Nutt <gnutt@nuttx.org>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
diff --git a/apps/examples/null/Makefile b/apps/examples/null/Makefile
index 3938eb171..634120600 100644
--- a/apps/examples/null/Makefile
+++ b/apps/examples/null/Makefile
@@ -2,7 +2,7 @@
# examples/null/Makefile
#
# Copyright (C) 2007-2008, 2010-2011 Gregory Nutt. All rights reserved.
-# Author: Gregory Nutt <spudmonkey@racsa.co.cr>
+# Author: Gregory Nutt <gnutt@nuttx.org>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
diff --git a/apps/examples/null/null_main.c b/apps/examples/null/null_main.c
index 63a14fcac..c4624bd1d 100644
--- a/apps/examples/null/null_main.c
+++ b/apps/examples/null/null_main.c
@@ -2,7 +2,7 @@
* examples/null/null_main.c
*
* Copyright (C) 2007, 2009, 2011 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
+ * Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/apps/examples/ostest/Kconfig b/apps/examples/ostest/Kconfig
index ca8957993..0da7e4ce3 100644
--- a/apps/examples/ostest/Kconfig
+++ b/apps/examples/ostest/Kconfig
@@ -10,4 +10,33 @@ config EXAMPLES_OSTEST
Enable the OS test example
if EXAMPLES_OSTEST
+
+config EXAMPLES_OSTEST_BUILTIN
+ bool "NSH built-in application"
+ default y if NSH_LIBRARY
+ default n if !NSH_LIBRARY
+ ---help---
+ Build the OS test example as an NSH built-in application.
+
+config EXAMPLES_OSTEST_LOOPS
+ int "OS test loop"
+ default 1
+ ---help---
+ Used to control the number of executions of the test. If undefined, the test
+ executes one time. If defined to be zero, the test runs forever.
+
+config EXAMPLES_OSTEST_STACKSIZE
+ int "OS test stack size"
+ default 8192
+ ---help---
+ Size of the stack used to create the ostest task. Default is 8192.
+
+config EXAMPLES_OSTEST_NBARRIER_THREADS
+ int "Number of barrier threads"
+ default 8
+ ---help---
+ Specifies the number of threads to create in the barrier test. The default
+ is 8 but a smaller number may be needed on systems without sufficient memory
+ to start so many threads.
+
endif
diff --git a/apps/examples/ostest/Makefile b/apps/examples/ostest/Makefile
index eab1db8b3..374964b39 100644
--- a/apps/examples/ostest/Makefile
+++ b/apps/examples/ostest/Makefile
@@ -46,7 +46,7 @@ STACKSIZE = 2048
# NuttX OS Test
ASRCS =
-CSRCS = main.c dev_null.c
+CSRCS = ostest_main.c dev_null.c
ifeq ($(CONFIG_ARCH_FPU),y)
CSRCS += fpu.c
diff --git a/apps/examples/ostest/barrier.c b/apps/examples/ostest/barrier.c
index da1301dc3..e66496f7b 100644
--- a/apps/examples/ostest/barrier.c
+++ b/apps/examples/ostest/barrier.c
@@ -2,7 +2,7 @@
* examples/ostest/barrier.c
*
* Copyright (C) 2007-2009, 2011 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
+ * Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/apps/examples/ostest/cancel.c b/apps/examples/ostest/cancel.c
index bf2d03615..11981d819 100644
--- a/apps/examples/ostest/cancel.c
+++ b/apps/examples/ostest/cancel.c
@@ -2,7 +2,7 @@
* examples/ostest/cancel.c
*
* Copyright (C) 2007-2009 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
+ * Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/apps/examples/ostest/cond.c b/apps/examples/ostest/cond.c
index 11191b7d5..96468c3e4 100644
--- a/apps/examples/ostest/cond.c
+++ b/apps/examples/ostest/cond.c
@@ -2,7 +2,7 @@
* cond.c
*
* Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
+ * Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/apps/examples/ostest/dev_null.c b/apps/examples/ostest/dev_null.c
index e8fc6cf3f..34508d05e 100644
--- a/apps/examples/ostest/dev_null.c
+++ b/apps/examples/ostest/dev_null.c
@@ -2,7 +2,7 @@
* examples/ostest/dev_null.c
*
* Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
+ * Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/apps/examples/ostest/mutex.c b/apps/examples/ostest/mutex.c
index 752f833f2..0b7f70daa 100644
--- a/apps/examples/ostest/mutex.c
+++ b/apps/examples/ostest/mutex.c
@@ -2,7 +2,7 @@
* mutex.c
*
* Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
+ * Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/apps/examples/ostest/main.c b/apps/examples/ostest/ostest_main.c
index 61a2af19a..46726d515 100644
--- a/apps/examples/ostest/main.c
+++ b/apps/examples/ostest/ostest_main.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * apps/examples/ostest/main.c
+ * apps/examples/ostest/ostest_main.c
*
* Copyright (C) 2007-2009, 2011-2012 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
diff --git a/apps/examples/ostest/posixtimer.c b/apps/examples/ostest/posixtimer.c
index 3560c712b..ebb1ab79e 100644
--- a/apps/examples/ostest/posixtimer.c
+++ b/apps/examples/ostest/posixtimer.c
@@ -2,7 +2,7 @@
* examples/ostest/posixtimer.c
*
* Copyright (C) 2007-2009, 2011 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
+ * Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/apps/examples/ostest/prioinherit.c b/apps/examples/ostest/prioinherit.c
index eea5a818f..cd04df7e6 100644
--- a/apps/examples/ostest/prioinherit.c
+++ b/apps/examples/ostest/prioinherit.c
@@ -2,7 +2,7 @@
* examples/ostest/prioinherit.c
*
* Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
+ * Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/apps/examples/ostest/rmutex.c b/apps/examples/ostest/rmutex.c
index 44eb4bb3b..ffd99c2df 100644
--- a/apps/examples/ostest/rmutex.c
+++ b/apps/examples/ostest/rmutex.c
@@ -2,7 +2,7 @@
* rmutex.c
*
* Copyright (C) 2008 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
+ * Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/apps/examples/ostest/roundrobin.c b/apps/examples/ostest/roundrobin.c
index 061d51f3d..5167a857e 100644
--- a/apps/examples/ostest/roundrobin.c
+++ b/apps/examples/ostest/roundrobin.c
@@ -2,7 +2,7 @@
* examples/ostest/roundrobin.c
*
* Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
+ * Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/apps/examples/ostest/sem.c b/apps/examples/ostest/sem.c
index 850cf8040..48be57a85 100644
--- a/apps/examples/ostest/sem.c
+++ b/apps/examples/ostest/sem.c
@@ -2,7 +2,7 @@
* sem.c
*
* Copyright (C) 2007-2009 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
+ * Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/apps/examples/ostest/sighand.c b/apps/examples/ostest/sighand.c
index 681531639..eabfe5646 100644
--- a/apps/examples/ostest/sighand.c
+++ b/apps/examples/ostest/sighand.c
@@ -2,7 +2,7 @@
* apps/examples/ostest/sighand.c
*
* Copyright (C) 2007, 2008, 2011 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
+ * Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/apps/examples/ostest/timedmqueue.c b/apps/examples/ostest/timedmqueue.c
index 807d8537b..6c3269e84 100644
--- a/apps/examples/ostest/timedmqueue.c
+++ b/apps/examples/ostest/timedmqueue.c
@@ -2,7 +2,7 @@
* apps/examples/ostest/mqueue.c
*
* Copyright (C) 2007-2009, 2011 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
+ * Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/apps/examples/ostest/timedwait.c b/apps/examples/ostest/timedwait.c
index fc381ddda..7cf875fb6 100644
--- a/apps/examples/ostest/timedwait.c
+++ b/apps/examples/ostest/timedwait.c
@@ -2,7 +2,7 @@
* examples/ostest/timedwait.c
*
* Copyright (C) 2007, 2008, 2011 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
+ * Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/apps/examples/pipe/Makefile b/apps/examples/pipe/Makefile
index 3bcc9b5f7..956c911b3 100644
--- a/apps/examples/pipe/Makefile
+++ b/apps/examples/pipe/Makefile
@@ -2,7 +2,7 @@
# apps/examples/pipe/Makefile
#
# Copyright (C) 2008, 2010-2011 Gregory Nutt. All rights reserved.
-# Author: Gregory Nutt <spudmonkey@racsa.co.cr>
+# Author: Gregory Nutt <gnutt@nuttx.org>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
diff --git a/apps/examples/pipe/interlock_test.c b/apps/examples/pipe/interlock_test.c
index e049a65f6..20d4113eb 100644
--- a/apps/examples/pipe/interlock_test.c
+++ b/apps/examples/pipe/interlock_test.c
@@ -2,7 +2,7 @@
* examples/pipe/interlock_test.c
*
* Copyright (C) 2008 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
+ * Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/apps/examples/pipe/pipe.h b/apps/examples/pipe/pipe.h
index 2c18fd868..38143e492 100644
--- a/apps/examples/pipe/pipe.h
+++ b/apps/examples/pipe/pipe.h
@@ -2,7 +2,7 @@
* examples/pipe/pipe.h
*
* Copyright (C) 2008 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
+ * Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/apps/examples/pipe/pipe_main.c b/apps/examples/pipe/pipe_main.c
index 406832a98..63a4f283f 100644
--- a/apps/examples/pipe/pipe_main.c
+++ b/apps/examples/pipe/pipe_main.c
@@ -2,7 +2,7 @@
* examples/pipe/pipe_main.c
*
* Copyright (C) 2008-2009, 2011 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
+ * Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/apps/examples/pipe/redirect_test.c b/apps/examples/pipe/redirect_test.c
index db7c0b99a..26fe9bcaa 100644
--- a/apps/examples/pipe/redirect_test.c
+++ b/apps/examples/pipe/redirect_test.c
@@ -2,7 +2,7 @@
* examples/pipe/redirect_test.c
*
* Copyright (C) 2008-2009 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
+ * Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/apps/examples/pipe/transfer_test.c b/apps/examples/pipe/transfer_test.c
index cb8cad04a..f7c612881 100644
--- a/apps/examples/pipe/transfer_test.c
+++ b/apps/examples/pipe/transfer_test.c
@@ -2,7 +2,7 @@
* examples/pipe/transfer_test.c
*
* Copyright (C) 2008-2009 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
+ * Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/apps/examples/poll/Makefile b/apps/examples/poll/Makefile
index 1c85d6f36..aef61d199 100644
--- a/apps/examples/poll/Makefile
+++ b/apps/examples/poll/Makefile
@@ -2,7 +2,7 @@
# apps/examples/poll/Makefile
#
# Copyright (C) 2008, 2010-2011 Gregory Nutt. All rights reserved.
-# Author: Gregory Nutt <spudmonkey@racsa.co.cr>
+# Author: Gregory Nutt <gnutt@nuttx.org>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
diff --git a/apps/examples/poll/Makefile.host b/apps/examples/poll/Makefile.host
index 9d9daee27..1e6a72089 100644
--- a/apps/examples/poll/Makefile.host
+++ b/apps/examples/poll/Makefile.host
@@ -2,7 +2,7 @@
# apps/examples/poll/Makefile.host
#
# Copyright (C) 2008, 2009, 2011 Gregory Nutt. All rights reserved.
-# Author: Gregory Nutt <spudmonkey@racsa.co.cr>
+# Author: Gregory Nutt <gnutt@nuttx.org>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
diff --git a/apps/examples/poll/poll_internal.h b/apps/examples/poll/poll_internal.h
index cbf42ac56..b2400932e 100644
--- a/apps/examples/poll/poll_internal.h
+++ b/apps/examples/poll/poll_internal.h
@@ -2,7 +2,7 @@
* examples/poll/poll_internal.h
*
* Copyright (C) 2008, 2009 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
+ * Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/apps/examples/poll/poll_listener.c b/apps/examples/poll/poll_listener.c
index 816647e34..fe1c95089 100644
--- a/apps/examples/poll/poll_listener.c
+++ b/apps/examples/poll/poll_listener.c
@@ -2,7 +2,7 @@
* examples/poll/poll_listener.c
*
* Copyright (C) 2008 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
+ * Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/apps/examples/poll/poll_main.c b/apps/examples/poll/poll_main.c
index 9c3a096cb..0c475fa7a 100644
--- a/apps/examples/poll/poll_main.c
+++ b/apps/examples/poll/poll_main.c
@@ -2,7 +2,7 @@
* examples/poll/poll_main.c
*
* Copyright (C) 2008, 2011 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
+ * Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/apps/examples/poll/select_listener.c b/apps/examples/poll/select_listener.c
index 80039ada3..5cb7e7805 100644
--- a/apps/examples/poll/select_listener.c
+++ b/apps/examples/poll/select_listener.c
@@ -2,7 +2,7 @@
* examples/poll/select_listener.c
*
* Copyright (C) 2008, 2009 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
+ * Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/apps/examples/romfs/Makefile b/apps/examples/romfs/Makefile
index 1db45765a..ba930b77d 100644
--- a/apps/examples/romfs/Makefile
+++ b/apps/examples/romfs/Makefile
@@ -2,7 +2,7 @@
# apps/examples/romfs/Makefile
#
# Copyright (C) 2008, 2010-2011 Gregory Nutt. All rights reserved.
-# Author: Gregory Nutt <spudmonkey@racsa.co.cr>
+# Author: Gregory Nutt <gnutt@nuttx.org>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
diff --git a/apps/examples/romfs/romfs_main.c b/apps/examples/romfs/romfs_main.c
index 4870ff4f8..3437cb8ac 100644
--- a/apps/examples/romfs/romfs_main.c
+++ b/apps/examples/romfs/romfs_main.c
@@ -2,7 +2,7 @@
* examples/romfs/romfs_main.c
*
* Copyright (C) 2008-2009, 2011 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
+ * Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/apps/examples/serloop/Makefile b/apps/examples/serloop/Makefile
index 67c805d46..e1c415cdd 100644
--- a/apps/examples/serloop/Makefile
+++ b/apps/examples/serloop/Makefile
@@ -2,7 +2,7 @@
# apps/examples/serloop/Makefile
#
# Copyright (C) 2008, 2010-2011 Gregory Nutt. All rights reserved.
-# Author: Gregory Nutt <spudmonkey@racsa.co.cr>
+# Author: Gregory Nutt <gnutt@nuttx.org>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
@@ -40,7 +40,7 @@ include $(APPDIR)/Make.defs
# Mindlessly simple console loopack test
ASRCS =
-CSRCS = main.c
+CSRCS = serloop_main.c
AOBJS = $(ASRCS:.S=$(OBJEXT))
COBJS = $(CSRCS:.c=$(OBJEXT))
diff --git a/apps/examples/serloop/main.c b/apps/examples/serloop/serloop_main.c
index f0e3ac238..af171fef3 100644
--- a/apps/examples/serloop/main.c
+++ b/apps/examples/serloop/serloop_main.c
@@ -1,8 +1,8 @@
/****************************************************************************
- * examples/serloop/main.c
+ * examples/serloop/serloop_main.c
*
* Copyright (C) 2008-2009, 2011 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
+ * Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/apps/interpreters/Makefile b/apps/interpreters/Makefile
index 1ef9c7439..5901fc830 100644
--- a/apps/interpreters/Makefile
+++ b/apps/interpreters/Makefile
@@ -2,7 +2,7 @@
# apps/interpreters/Makefile
#
# Copyright (C) 2011 Gregory Nutt. All rights reserved.
-# Author: Gregory Nutt <spudmonkey@racsa.co.cr>
+# Author: Gregory Nutt <gnutt@nuttx.org>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
diff --git a/apps/interpreters/ficl/Makefile b/apps/interpreters/ficl/Makefile
index 183246b67..fb953964e 100644
--- a/apps/interpreters/ficl/Makefile
+++ b/apps/interpreters/ficl/Makefile
@@ -2,7 +2,7 @@
# apps/interpreters/ficl/Makefile
#
# Copyright (C) 2011 Gregory Nutt. All rights reserved.
-# Author: Gregory Nutt <spudmonkey@racsa.co.cr>
+# Author: Gregory Nutt <gnutt@nuttx.org>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
diff --git a/apps/interpreters/ficl/README.txt b/apps/interpreters/ficl/README.txt
index bac9f3148..bac9f3148 100755..100644
--- a/apps/interpreters/ficl/README.txt
+++ b/apps/interpreters/ficl/README.txt
diff --git a/apps/namedapp/Makefile b/apps/namedapp/Makefile
index fba8fb1ff..6b0fd6a05 100644
--- a/apps/namedapp/Makefile
+++ b/apps/namedapp/Makefile
@@ -2,7 +2,7 @@
# apps/nshlib/Makefile
#
# Copyright (C) 2011 Gregory Nutt. All rights reserved.
-# Author: Gregory Nutt <spudmonkey@racsa.co.cr>
+# Author: Gregory Nutt <gnutt@nuttx.org>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
diff --git a/apps/namedapp/namedapp.c b/apps/namedapp/namedapp.c
index a5c2bee0e..d59ce6e3b 100644
--- a/apps/namedapp/namedapp.c
+++ b/apps/namedapp/namedapp.c
@@ -4,7 +4,7 @@
* Copyright (C) 2011 Uros Platise. All rights reserved.
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
* Authors: Uros Platise <uros.platise@isotel.eu>
- * Gregory Nutt <spudmonkey@racsa.co.cr>
+ * Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/apps/nshlib/Kconfig b/apps/nshlib/Kconfig
index ff692f43b..c0f7d6a92 100644
--- a/apps/nshlib/Kconfig
+++ b/apps/nshlib/Kconfig
@@ -6,6 +6,7 @@
config NSH_LIBRARY
bool "NSH Library"
default n
+ select SYSTEM_READLINE
---help---
Build the NSH support library. This is used, for example, by examples/nsh
in order to implement the full NuttShell (NSH).
@@ -201,6 +202,7 @@ config NSH_MMCSDMINOR
config NSH_ROMFSETC
bool "Support ROMFS start-up script"
default n
+ depends on FS_ROMFS
---help---
Mount a ROMFS filesystem at /etc and provide a startup script
at /etc/init.d/rcS. The default startup script will mount
@@ -244,6 +246,7 @@ config NSH_ROMFSSECTSIZE
config NSH_FATDEVNO
int "FAT block device minor number"
default 0
+ depends on FS_FAT
---help---
When the default rcS file used when NSH_ROMFSETC is selected, it
will mount a FAT FS under /tmp. This is the minor number of the FAT
@@ -252,6 +255,7 @@ config NSH_FATDEVNO
config NSH_FATSECTSIZE
int "FAT sector size"
default 512
+ depends on FS_FAT
---help---
When the default rcS file used when NSH_ROMFSETC is selected, it
will mount a FAT FS under /tmp. This is the sector size use with the
@@ -260,6 +264,7 @@ config NSH_FATSECTSIZE
config NSH_FATNSECTORS
int "FAT number of sectors"
default 1024
+ depends on FS_FAT
---help---
When the default rcS file used when NSH_ROMFSETC is selected, it
will mount a FAT FS under /tmp. This is the number of sectors to use
@@ -268,11 +273,13 @@ config NSH_FATNSECTORS
config NSH_FATMOUNTPT
string "FAT mount point"
- default 512
+ default "/tmp"
+ depends on FS_FAT
---help---
When the default rcS file used when NSH_ROMFSETC is selected, it
will mount a FAT FS under /tmp. This is the location where the FAT
- FS will be mounted. Default is /tmp.
+ FS will be mounted. Default is "/tmp".
+
endif
if NSH_LIBRARY
diff --git a/apps/nshlib/nsh_console.h b/apps/nshlib/nsh_console.h
index 8abf9154b..53e8c7897 100644
--- a/apps/nshlib/nsh_console.h
+++ b/apps/nshlib/nsh_console.h
@@ -2,7 +2,7 @@
* apps/nshlib/nsh_console.h
*
* Copyright (C) 2007-2012 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
+ * Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/apps/nshlib/nsh_consolemain.c b/apps/nshlib/nsh_consolemain.c
index baf2e74b4..6b51be470 100644
--- a/apps/nshlib/nsh_consolemain.c
+++ b/apps/nshlib/nsh_consolemain.c
@@ -97,9 +97,10 @@
int nsh_consolemain(int argc, char *argv[])
{
FAR struct console_stdio_s *pstate = nsh_newconsole();
- DEBUGASSERT(pstate);
int ret;
+ DEBUGASSERT(pstate);
+
/* If we are using a USB serial console, then we will have to wait for the
* USB to be connected to the host.
*/
diff --git a/apps/nshlib/nsh_mntcmds.c b/apps/nshlib/nsh_mntcmds.c
index b5935bdea..690d027ca 100644
--- a/apps/nshlib/nsh_mntcmds.c
+++ b/apps/nshlib/nsh_mntcmds.c
@@ -195,10 +195,11 @@ int cmd_df(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv)
defined(CONFIG_FS_READABLE) && !defined(CONFIG_NSH_DISABLE_MOUNT)
int cmd_mount(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv)
{
- char *source;
- char *target;
- char *filesystem = 0;
+ FAR char *source;
+ FAR char *target;
+ FAR char *filesystem = NULL;
bool badarg = false;
+ int option;
int ret;
/* The mount command behaves differently if no parameters are provided */
@@ -208,9 +209,12 @@ int cmd_mount(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv)
return mount_show(vtbl, argv[0]);
}
- /* Get the mount options */
+ /* Get the mount options. NOTE: getopt() is not thread safe nor re-entrant.
+ * To keep its state proper for the next usage, it is necessary to parse to
+ * the end of the line even if an error occurs. If an error occurs, this
+ * logic just sets 'badarg' and continues.
+ */
- int option;
while ((option = getopt(argc, argv, ":t:")) != ERROR)
{
switch (option)
@@ -232,14 +236,18 @@ int cmd_mount(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv)
}
}
- /* If a bad argument was encountered, then return without processing the command */
+ /* If a bad argument was encountered, then return without processing the
+ * command.
+ */
if (badarg)
{
return ERROR;
}
- /* There are two required arguments after the options */
+ /* There are two required arguments after the options: the source and target
+ * paths.
+ */
if (optind + 2 < argc)
{
@@ -252,6 +260,16 @@ int cmd_mount(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv)
return ERROR;
}
+ /* While the above parsing for the -t argument looks nice, the -t argument
+ * not really optional.
+ */
+
+ if (!filesystem)
+ {
+ nsh_output(vtbl, g_fmtargrequired, argv[0]);
+ return ERROR;
+ }
+
/* The source and target paths might be relative to the current
* working directory.
*/
diff --git a/apps/nshlib/nsh_netinit.c b/apps/nshlib/nsh_netinit.c
index 5d74b30d7..bc845c4ed 100644
--- a/apps/nshlib/nsh_netinit.c
+++ b/apps/nshlib/nsh_netinit.c
@@ -164,6 +164,7 @@ int nsh_netinit(void)
dhcpc_close(handle);
}
#endif
+
return OK;
}
diff --git a/apps/system/Make.defs b/apps/system/Make.defs
index e72f56ef5..a4aea2d31 100644
--- a/apps/system/Make.defs
+++ b/apps/system/Make.defs
@@ -34,18 +34,18 @@
#
############################################################################
-ifeq ($(CONFIG_VSN_POWEROFF),y)
-CONFIGURED_APPS += vsn/poweroff
+ifeq ($(CONFIG_SYSTEM_FREE),y)
+CONFIGURED_APPS += system/free
endif
-ifeq ($(CONFIG_VSN_RAMTRON),y)
-CONFIGURED_APPS += vsn/ramtron
+ifeq ($(CONFIG_SYSTEM_I2CTOOL),y)
+CONFIGURED_APPS += system/i2c
endif
-ifeq ($(CONFIG_VSN_SDCARD),y)
-CONFIGURED_APPS += vsn/sdcard
+ifeq ($(CONFIG_SYSTEM_INSTALL),y)
+CONFIGURED_APPS += system/install
endif
-ifeq ($(CONFIG_VSN_SYSINFO),y)
-CONFIGURED_APPS += vsn/sysinfo
+ifeq ($(CONFIG_SYSTEM_READLINE),y)
+CONFIGURED_APPS += system/readline
endif
diff --git a/apps/system/free/Makefile b/apps/system/free/Makefile
index 974c98913..7f911d81c 100644
--- a/apps/system/free/Makefile
+++ b/apps/system/free/Makefile
@@ -3,7 +3,7 @@
#
# Copyright (C) 2011 Uros Platise. All rights reserved.
# Author: Uros Platise <uros.platise@isotel.eu>
-# Gregory Nutt <spudmonkey@racsa.co.cr>
+# Gregory Nutt <gnutt@nuttx.org>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
diff --git a/apps/system/free/README.txt b/apps/system/free/README.txt
index dd92a94ae..1c2d380d4 100644
--- a/apps/system/free/README.txt
+++ b/apps/system/free/README.txt
@@ -2,5 +2,5 @@
This application provides UNIX style memory free information.
Source: NuttX
- Author: Gregory Nutt <spudmonkey@racsa.co.cr>
+ Author: Gregory Nutt <gnutt@nuttx.org>
Date: 17. March 2011
diff --git a/apps/system/free/free.c b/apps/system/free/free.c
index 2f61a1dae..3d9698ecb 100644
--- a/apps/system/free/free.c
+++ b/apps/system/free/free.c
@@ -2,7 +2,7 @@
* apps/system/free/free.c
*
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
+ * Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/apps/system/i2c/README.txt b/apps/system/i2c/README.txt
index 97801bcaa..7b432533b 100755..100644
--- a/apps/system/i2c/README.txt
+++ b/apps/system/i2c/README.txt
@@ -211,7 +211,7 @@ COMMAND SUMMARY
===============
We have already seen the I2C help (or ?) commands above. This section will
-discusse the remaining commands.
+discuss the remaining commands.
List buses: bus [OPTIONS]
--------------------------
diff --git a/apps/system/i2c/i2c_bus.c b/apps/system/i2c/i2c_bus.c
index 07e6d2da3..a684166ff 100644
--- a/apps/system/i2c/i2c_bus.c
+++ b/apps/system/i2c/i2c_bus.c
@@ -2,7 +2,7 @@
* apps/system/i2c/i2c_bus.c
*
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
+ * Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/apps/system/i2c/i2c_common.c b/apps/system/i2c/i2c_common.c
index e7b27693a..4af648c7d 100644
--- a/apps/system/i2c/i2c_common.c
+++ b/apps/system/i2c/i2c_common.c
@@ -2,7 +2,7 @@
* apps/system/i2c/i2c_common.c
*
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
+ * Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/apps/system/i2c/i2c_dev.c b/apps/system/i2c/i2c_dev.c
index f2b5a0e21..3d0480a15 100644
--- a/apps/system/i2c/i2c_dev.c
+++ b/apps/system/i2c/i2c_dev.c
@@ -2,7 +2,7 @@
* apps/system/i2c/i2c_dev.c
*
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
+ * Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/apps/system/i2c/i2c_get.c b/apps/system/i2c/i2c_get.c
index 773f2c963..08510af4b 100644
--- a/apps/system/i2c/i2c_get.c
+++ b/apps/system/i2c/i2c_get.c
@@ -2,7 +2,7 @@
* apps/system/i2c/i2c_get.c
*
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
+ * Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/apps/system/i2c/i2c_main.c b/apps/system/i2c/i2c_main.c
index fbaf677aa..0cf6786cb 100644
--- a/apps/system/i2c/i2c_main.c
+++ b/apps/system/i2c/i2c_main.c
@@ -2,7 +2,7 @@
* apps/system/i2c/i2c_main.c
*
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
+ * Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/apps/system/i2c/i2c_set.c b/apps/system/i2c/i2c_set.c
index 66fd8c85a..5baf7f835 100644
--- a/apps/system/i2c/i2c_set.c
+++ b/apps/system/i2c/i2c_set.c
@@ -2,7 +2,7 @@
* apps/system/i2c/i2c_set.c
*
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
+ * Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/apps/system/i2c/i2c_verf.c b/apps/system/i2c/i2c_verf.c
index 0fa34b96e..109e9c4ce 100644
--- a/apps/system/i2c/i2c_verf.c
+++ b/apps/system/i2c/i2c_verf.c
@@ -2,7 +2,7 @@
* apps/system/i2c/i2c_verf.c
*
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
+ * Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/apps/system/i2c/i2ctool.h b/apps/system/i2c/i2ctool.h
index 9726f0083..4ff26d03e 100644
--- a/apps/system/i2c/i2ctool.h
+++ b/apps/system/i2c/i2ctool.h
@@ -2,7 +2,7 @@
* apps/system/i2c/i2ctool.h
*
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
+ * Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/apps/system/install/Makefile b/apps/system/install/Makefile
index 4528ad44e..71d82f34c 100755..100644
--- a/apps/system/install/Makefile
+++ b/apps/system/install/Makefile
@@ -3,7 +3,7 @@
#
# Copyright (C) 2011 Uros Platise. All rights reserved.
# Author: Uros Platise <uros.platise@isotel.eu>
-# Gregory Nutt <spudmonkey@racsa.co.cr>
+# Gregory Nutt <gnutt@nuttx.org>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
diff --git a/apps/system/install/README.txt b/apps/system/install/README.txt
index 66e9b0939..66e9b0939 100755..100644
--- a/apps/system/install/README.txt
+++ b/apps/system/install/README.txt
diff --git a/apps/system/install/install.c b/apps/system/install/install.c
index 2f11c6434..2f11c6434 100755..100644
--- a/apps/system/install/install.c
+++ b/apps/system/install/install.c
diff --git a/apps/system/readline/Kconfig b/apps/system/readline/Kconfig
index 2ed9cafd6..6482b1204 100644
--- a/apps/system/readline/Kconfig
+++ b/apps/system/readline/Kconfig
@@ -19,21 +19,4 @@ config READLINE_ECHO
already has local echo support or you need to suppress the back-channel
responses for any other reason.
-choice
- prompt "Newline Options"
- default EOL_IS_EITHER_CRLF
-
-config EOL_IS_CR
- bool "EOL is CR"
-
-config EOL_IS_LF
- bool "EOL is LF"
-
-config EOL_IS_BOTH_CRLF
- bool "EOL is CR and LF"
-
-config EOL_IS_EITHER_CRLF
- bool "EOL is CR or LF"
-
-endchoice
endif
diff --git a/apps/system/readline/readline.c b/apps/system/readline/readline.c
index bdd39e67b..ec2dc1c0a 100644
--- a/apps/system/readline/readline.c
+++ b/apps/system/readline/readline.c
@@ -63,13 +63,32 @@
#define CONFIG_READLINE_ECHO 1
/* Some environments may return CR as end-of-line, others LF, and others
- * both. The logic here assumes either but not both.
+ * both. If not specified, the logic here assumes either (but not both) as
+ * the default.
*/
-#undef CONFIG_EOL_IS_CR
-#undef CONFIG_EOL_IS_LF
-#undef CONFIG_EOL_IS_BOTH_CRLF
-#define CONFIG_EOL_IS_EITHER_CRLF 1
+#if defined(CONFIG_EOL_IS_CR)
+# undef CONFIG_EOL_IS_LF
+# undef CONFIG_EOL_IS_BOTH_CRLF
+# undef CONFIG_EOL_IS_EITHER_CRLF
+#elif defined(CONFIG_EOL_IS_LF)
+# undef CONFIG_EOL_IS_CR
+# undef CONFIG_EOL_IS_BOTH_CRLF
+# undef CONFIG_EOL_IS_EITHER_CRLF
+#elif defined(CONFIG_EOL_IS_BOTH_CRLF)
+# undef CONFIG_EOL_IS_CR
+# undef CONFIG_EOL_IS_LF
+# undef CONFIG_EOL_IS_EITHER_CRLF
+#elif defined(CONFIG_EOL_IS_EITHER_CRLF)
+# undef CONFIG_EOL_IS_CR
+# undef CONFIG_EOL_IS_LF
+# undef CONFIG_EOL_IS_BOTH_CRLF
+#else
+# undef CONFIG_EOL_IS_CR
+# undef CONFIG_EOL_IS_LF
+# undef CONFIG_EOL_IS_BOTH_CRLF
+# define CONFIG_EOL_IS_EITHER_CRLF 1
+#endif
/****************************************************************************
* Private Type Declarations