Ensure dmesg output on Linux has a terminating newline

This commit is contained in:
sin 2013-08-12 10:19:49 +01:00
parent eaa5285d68
commit 10356a07c1

View File

@ -38,5 +38,8 @@ dmesg_show(int fd, const void *buf, size_t n)
}
last = p[i++];
}
if (last != '\n')
if (write(fd, "\n", 1) != 1)
return -1;
return 0;
}