Skip to content
Snippets Groups Projects
Commit bd5fd059 authored by patacongo's avatar patacongo
Browse files

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
parent a23edf10
No related branches found
No related tags found
No related merge requests found
......@@ -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);
}
}
......
......@@ -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);
}
}
......
......@@ -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.
*
**************************************************************************/
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment