sysctl: print new line explicitely

In some cases sysctl does not print new line after the last line.
This commit fixes that behavior.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
This commit is contained in:
Sami Kerola 2012-03-02 12:41:23 +01:00 committed by Craig Small
parent 6dd921ca1c
commit f5e2277a2e

View File

@ -240,6 +240,8 @@ static int ReadSetting(const char *restrict const name)
if (PrintName) {
fprintf(stdout, "%s = %s",
outname, inbuf);
if (inbuf[strlen(inbuf) - 1] != '\n')
putchar('\n');
} else {
if (!PrintNewline) {
char *nlptr =