mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-29 07:03:33 +08:00
Misc SYSLOG and STM32 serial fixes
git-svn-id: http://svn.code.sf.net/p/nuttx/code/trunk@5576 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
@@ -63,6 +63,7 @@
|
||||
|
||||
static void syslogstream_putc(FAR struct lib_outstream_s *this, int ch)
|
||||
{
|
||||
int errcode;
|
||||
int ret;
|
||||
|
||||
/* Try writing until the write was successful or until an irrecoverable
|
||||
@@ -71,22 +72,23 @@ static void syslogstream_putc(FAR struct lib_outstream_s *this, int ch)
|
||||
|
||||
do
|
||||
{
|
||||
/* Write the character to the supported logging device */
|
||||
/* Write the character to the supported logging device. On failure,
|
||||
* syslog_putc returns EOF with the errno value set;
|
||||
*/
|
||||
|
||||
ret = syslog_putc(ch);
|
||||
if (ret == OK)
|
||||
if (ret != EOF)
|
||||
{
|
||||
this->nput++;
|
||||
return;
|
||||
}
|
||||
|
||||
/* On failure syslog_putc will return a negated errno value. The
|
||||
* errno variable will not be set. The special value -EINTR means that
|
||||
* syslog_putc() was awakened by a signal. This is not a real error and
|
||||
* must be ignored in this context.
|
||||
/* The special errno value -EINTR means that syslog_putc() was
|
||||
* awakened by a signal. This is not a real error and must be
|
||||
* ignored in this context.
|
||||
*/
|
||||
}
|
||||
while (ret == -EINTR);
|
||||
while (errno == -EINTR);
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
|
||||
Reference in New Issue
Block a user