Merge branch 'NuttX/master' from git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@5027 7fd9a85b-ad96-42d3-883c-3090e2eb8679

This commit is contained in:
px4dev
2012-08-14 09:07:59 -07:00
45 changed files with 626 additions and 249 deletions
+4
View File
@@ -274,3 +274,7 @@
no arguments outputs a short list of commands. With -v lists all
command line details. And command name can be added to just get
help on one command.
* system/readline.c: If character input/output is interrupted by a
signal, then readline() will try the read/write again.
* apps/*/Make.defs: Numerous fixes needed to use the automated
configuration (from Richard Cochran).
+2 -2
View File
@@ -34,10 +34,10 @@
#
############################################################################
if ($(CONFIG_PCODE),y)
ifeq ($(CONFIG_PCODE),y)
CONFIGURED_APPS += interpreters/pcode
endif
if ($(CONFIG_FICL),y)
ifeq ($(CONFIG_FICL),y)
CONFIGURED_APPS += interpreters/ficl
endif
+1 -1
View File
@@ -34,7 +34,7 @@
#
############################################################################
if ($(CONFIG_NAMEDAPP),y)
ifeq ($(CONFIG_NAMEDAPP),y)
CONFIGURED_APPS += namedapp
endif
+1 -1
View File
@@ -34,7 +34,7 @@
#
############################################################################
if ($(CONFIG_NSH_LIBRARY),y)
ifeq ($(CONFIG_NSH_LIBRARY),y)
CONFIGURED_APPS += nshlib
endif
+4 -4
View File
@@ -34,18 +34,18 @@
#
############################################################################
if ($(CONFIG_VSN_POWEROFF),y)
ifeq ($(CONFIG_VSN_POWEROFF),y)
CONFIGURED_APPS += vsn/poweroff
endif
if ($(CONFIG_VSN_RAMTRON),y)
ifeq ($(CONFIG_VSN_RAMTRON),y)
CONFIGURED_APPS += vsn/ramtron
endif
if ($(CONFIG_VSN_SDCARD),y)
ifeq ($(CONFIG_VSN_SDCARD),y)
CONFIGURED_APPS += vsn/sdcard
endif
if ($(CONFIG_VSN_SYSINFO),y)
ifeq ($(CONFIG_VSN_SYSINFO),y)
CONFIGURED_APPS += vsn/sysinfo
endif
+46 -6
View File
@@ -103,13 +103,34 @@ static inline int readline_rawgetc(int infd)
char buffer;
ssize_t nread;
nread = read(infd, &buffer, 1);
if (nread < 1)
{
/* Return EOF if the end of file (0) or error (-1) occurs */
/* Loop until we successfully read a character (or until an unexpected
* error occurs).
*/
return EOF;
do
{
/* Read one character from the incoming stream */
nread = read(infd, &buffer, 1);
/* Return EOF if the end of file (0) or error (-1) occurs. */
if (nread < 1)
{
/* EINTR is not really an error; it simply means that a signal we
* received while watiing for intput.
*/
if (nread == 0 || errno != EINTR)
{
return EOF;
}
}
}
while (nread < 1);
/* On success, returnt he character that was read */
return (int)buffer;
}
@@ -121,7 +142,26 @@ static inline int readline_rawgetc(int infd)
static inline void readline_consoleputc(int ch, int outfd)
{
char buffer = ch;
(void)write(outfd, &buffer, 1);
ssize_t nwritten;
/* Loop until we successfully write a character (or until an unexpected
* error occurs).
*/
do
{
/* Write the character to the outgoing stream */
nwritten = write(outfd, &buffer, 1);
/* Check for irrecoverable write errors. */
if (nwritten < 0 && errno != EINTR)
{
break;
}
}
while (nwritten < 1);
}
#endif