[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
2005-04-26 22:27:34 -07:00
committed by Greg KH
parent e4ad54a302
commit 90e84c8148
+2 -1
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 )