Signed-off-by: MORITA Kazutaka <morita.kazut...@lab.ntt.co.jp> --- lib/logger.c | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/lib/logger.c b/lib/logger.c index a7aab54..1b0fb15 100644 --- a/lib/logger.c +++ b/lib/logger.c @@ -328,6 +328,10 @@ static notrace void dolog(int prio, const char *func, int line, gettimeofday(&tv, NULL); len = vsnprintf(str, MAX_MSG_SIZE, fmt, ap); + if (len + 1 < MAX_MSG_SIZE && str[len - 1] != '\n') { + str[len++] = '\n'; + str[len] = '\0'; + } if (la) { struct sembuf ops; -- 1.8.1.3.566.gaa39828 -- sheepdog mailing list sheepdog@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/sheepdog