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:
parent
e4ad54a302
commit
90e84c8148
@ -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 )
|
||||
|
Loading…
Reference in New Issue
Block a user