diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-03-31 15:13:12 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-03-31 15:13:12 +0000 |
commit | 421258dad4dee7bc7fadd7619749b1bda370c773 (patch) | |
tree | 98e0f474d93010b7655ad4b7528df65b3874537f /apps | |
parent | f85bf2b1e0fb595ad588c55ffd23dcb0c0837ce3 (diff) | |
download | nuttx-421258dad4dee7bc7fadd7619749b1bda370c773.tar.gz nuttx-421258dad4dee7bc7fadd7619749b1bda370c773.tar.bz2 nuttx-421258dad4dee7bc7fadd7619749b1bda370c773.zip |
Fix read() return value for the case of permissions problem
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4545 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'apps')
-rw-r--r-- | apps/nshlib/nsh_consolemain.c | 3 | ||||
-rw-r--r-- | apps/nshlib/nsh_telnetd.c | 3 | ||||
-rw-r--r-- | apps/system/readline/readline.c | 2 |
3 files changed, 5 insertions, 3 deletions
diff --git a/apps/nshlib/nsh_consolemain.c b/apps/nshlib/nsh_consolemain.c index 36ffdab8f..a6e28c051 100644 --- a/apps/nshlib/nsh_consolemain.c +++ b/apps/nshlib/nsh_consolemain.c @@ -149,7 +149,8 @@ int nsh_consolemain(int argc, char *argv[]) else { - fprintf(pstate->cn_outstream, g_fmtcmdfailed, "readline", NSH_ERRNO_OF(-ret)); + fprintf(pstate->cn_outstream, g_fmtcmdfailed, "nsh_consolemain", + "readline", NSH_ERRNO_OF(-ret)); nsh_exit(&pstate->cn_vtbl, 1); } } diff --git a/apps/nshlib/nsh_telnetd.c b/apps/nshlib/nsh_telnetd.c index 66923deb2..0117aad04 100644 --- a/apps/nshlib/nsh_telnetd.c +++ b/apps/nshlib/nsh_telnetd.c @@ -121,7 +121,8 @@ int nsh_telnetmain(int argc, char *argv[]) } else { - fprintf(pstate->cn_outstream, g_fmtcmdfailed, "fgets", NSH_ERRNO); + fprintf(pstate->cn_outstream, g_fmtcmdfailed, "nsh_telnetmain", + "fgets", NSH_ERRNO); nsh_exit(&pstate->cn_vtbl, 1); } } diff --git a/apps/system/readline/readline.c b/apps/system/readline/readline.c index b2a87c870..f7fa6a635 100644 --- a/apps/system/readline/readline.c +++ b/apps/system/readline/readline.c @@ -164,7 +164,7 @@ static inline void readline_consolewrite(int outfd, FAR const char *buffer, size * * Returned values: * On success, the (positive) number of bytes transferred is returned. - * A length of zero would indicated an end of file condition. An failure, + * A length of zero would indicate an end of file condition. On failure, * a negated errno value is returned. * **************************************************************************/ |