Print a newline if the logline don't have one. William Lallemand --- ./sysklogd/logread.c.orig 2012-07-16 13:15:49.164418526 +0200 +++ ./sysklogd/logread.c 2012-07-16 13:16:57.396419806 +0200 @@ -113,6 +113,7 @@ i = follow ? buf->tail : buf->head; do { + int messagesize; #ifdef CONFIG_FEATURE_LOGREAD_REDUCED_LOCKING char *buf_data; int log_len,j; @@ -150,7 +151,11 @@ #else while ( i != buf->tail) { - printf("%s", buf->data+i); + messagesize = printf("%s", buf->data+i); + // print \n if there isn't + if (*(buf->data+i+messagesize-1) != '\n') { + printf("\n"); + } i+= strlen(buf->data+i) + 1; if (i >= buf->size ) i=0; @@ -161,7 +166,11 @@ #ifdef CONFIG_FEATURE_LOGREAD_REDUCED_LOCKING for (j=0; j < log_len; j+=strlen(buf_data+j)+1) { - printf("%s", buf_data+j); + messagesize = printf("%s", buf_data+j); + // print \n if there isn't + if (*(buf_data+j+messagesize-1) != '\n') { + printf("\n"); + } if (follow) fflush(stdout); }