Revert "drivers/syslog: Call up_puts in syslog_default_write instad up_putc"
This reverts commit174b240325
. Revert "drivers/syslog: Ensure the buffer zero terminate" This reverts commit1692aa7894
.
This commit is contained in:
parent
ee29175811
commit
ff0cd0baac
|
@ -161,8 +161,14 @@ static ssize_t syslog_default_write(FAR struct syslog_channel_s *channel,
|
|||
FAR const char *buffer, size_t buflen)
|
||||
{
|
||||
#if defined(CONFIG_ARCH_LOWPUTC)
|
||||
size_t nwritten;
|
||||
|
||||
nxsem_wait(&g_syslog_default_sem);
|
||||
up_puts(buffer);
|
||||
for (nwritten = 0; nwritten < buflen; nwritten++)
|
||||
{
|
||||
up_putc(buffer[nwritten]);
|
||||
}
|
||||
|
||||
nxsem_post(&g_syslog_default_sem);
|
||||
#endif
|
||||
|
||||
|
|
|
@ -56,11 +56,6 @@ static int syslogstream_flush(FAR struct lib_syslogstream_s *stream)
|
|||
|
||||
if (iob != NULL && iob->io_len > 0)
|
||||
{
|
||||
/* Ensure the buffer is zero terminated */
|
||||
|
||||
DEBUGASSERT(iob->io_len < CONFIG_IOB_BUFSIZE);
|
||||
iob->io_data[iob->io_len] = '\0';
|
||||
|
||||
/* Yes write the buffered data */
|
||||
|
||||
do
|
||||
|
@ -105,7 +100,7 @@ static void syslogstream_addchar(FAR struct lib_syslogstream_s *stream,
|
|||
|
||||
/* Is the buffer full? */
|
||||
|
||||
if (iob->io_len >= CONFIG_IOB_BUFSIZE - 1)
|
||||
if (iob->io_len >= CONFIG_IOB_BUFSIZE)
|
||||
{
|
||||
/* Yes.. then flush the buffer */
|
||||
|
||||
|
|
Loading…
Reference in New Issue