mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-06-05 06:03:02 +08:00
Fix read() return value for the case of permissions problem
git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@4545 7fd9a85b-ad96-42d3-883c-3090e2eb8679
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user