1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2024-10-30 06:25:25 +03:00

[PATCH] let klibc add the trailing newline to syslog conditionally

We get an empty line after every debug print from libsysfs,
so don't add a second if we already have one.
This commit is contained in:
kay.sievers@vrfy.org 2004-11-19 03:41:38 +01:00 committed by Greg KH
parent e4ad54a302
commit 90e84c8148

View File

@ -60,7 +60,8 @@ void vsyslog(int prio, const char *format, va_list ap)
len += vsnprintf(buf+len, BUFLEN-len, format, ap);
if ( len > BUFLEN-1 ) len = BUFLEN-1;
buf[len++] = '\n';
if (buf[len-1] != '\n')
buf[len++] = '\n';
fd = __syslog_fd;
if ( fd == -1 )