mirror of
https://github.com/apache/nuttx.git
synced 2026-05-27 11:26:12 +08:00
syslog: convert \n to \r\n in syslog framework layer
Signed-off-by: yangsong8 <yangsong8@xiaomi.com>
This commit is contained in:
@@ -877,16 +877,6 @@ int up_putc(int ch)
|
||||
uint8_t imr = 0;
|
||||
|
||||
up_disableuartint(dev, &imr);
|
||||
|
||||
/* Check for LF */
|
||||
|
||||
if (ch == '\n')
|
||||
{
|
||||
/* Add CR */
|
||||
|
||||
sparc_lowputc('\r');
|
||||
}
|
||||
|
||||
sparc_lowputc(ch);
|
||||
up_restoreuartint(dev, imr);
|
||||
#endif
|
||||
@@ -931,15 +921,6 @@ int up_putc(int ch)
|
||||
int up_putc(int ch)
|
||||
{
|
||||
#ifdef HAVE_SERIAL_CONSOLE
|
||||
/* Check for LF */
|
||||
|
||||
if (ch == '\n')
|
||||
{
|
||||
/* Add CR */
|
||||
|
||||
sparc_lowputc('\r');
|
||||
}
|
||||
|
||||
sparc_lowputc(ch);
|
||||
#endif
|
||||
return ch;
|
||||
|
||||
@@ -872,16 +872,6 @@ int up_putc(int ch)
|
||||
uint8_t imr = 0;
|
||||
|
||||
up_disableuartint(dev, &imr);
|
||||
|
||||
/* Check for LF */
|
||||
|
||||
if (ch == '\n')
|
||||
{
|
||||
/* Add CR */
|
||||
|
||||
sparc_lowputc('\r');
|
||||
}
|
||||
|
||||
sparc_lowputc(ch);
|
||||
up_restoreuartint(dev, imr);
|
||||
#endif
|
||||
@@ -926,15 +916,6 @@ int up_putc(int ch)
|
||||
int up_putc(int ch)
|
||||
{
|
||||
#ifdef HAVE_SERIAL_CONSOLE
|
||||
/* Check for LF */
|
||||
|
||||
if (ch == '\n')
|
||||
{
|
||||
/* Add CR */
|
||||
|
||||
sparc_lowputc('\r');
|
||||
}
|
||||
|
||||
sparc_lowputc(ch);
|
||||
#endif
|
||||
return ch;
|
||||
|
||||
@@ -958,16 +958,6 @@ int up_putc(int ch)
|
||||
uint8_t imr = 0;
|
||||
|
||||
up_disableuartint(dev, &imr);
|
||||
|
||||
/* Check for LF */
|
||||
|
||||
if (ch == '\n')
|
||||
{
|
||||
/* Add CR */
|
||||
|
||||
sparc_lowputc('\r');
|
||||
}
|
||||
|
||||
sparc_lowputc(ch);
|
||||
up_restoreuartint(dev, imr);
|
||||
#endif
|
||||
@@ -1012,15 +1002,6 @@ int up_putc(int ch)
|
||||
int up_putc(int ch)
|
||||
{
|
||||
#ifdef HAVE_SERIAL_CONSOLE
|
||||
/* Check for LF */
|
||||
|
||||
if (ch == '\n')
|
||||
{
|
||||
/* Add CR */
|
||||
|
||||
sparc_lowputc('\r');
|
||||
}
|
||||
|
||||
sparc_lowputc(ch);
|
||||
#endif
|
||||
return ch;
|
||||
|
||||
Reference in New Issue
Block a user