Ensure dmesg output on Linux has a terminating newline
This commit is contained in:
parent
eaa5285d68
commit
10356a07c1
@ -38,5 +38,8 @@ dmesg_show(int fd, const void *buf, size_t n)
|
|||||||
}
|
}
|
||||||
last = p[i++];
|
last = p[i++];
|
||||||
}
|
}
|
||||||
|
if (last != '\n')
|
||||||
|
if (write(fd, "\n", 1) != 1)
|
||||||
|
return -1;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user