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:
parent
6dd921ca1c
commit
f5e2277a2e
2
sysctl.c
2
sysctl.c
@ -240,6 +240,8 @@ static int ReadSetting(const char *restrict const name)
|
|||||||
if (PrintName) {
|
if (PrintName) {
|
||||||
fprintf(stdout, "%s = %s",
|
fprintf(stdout, "%s = %s",
|
||||||
outname, inbuf);
|
outname, inbuf);
|
||||||
|
if (inbuf[strlen(inbuf) - 1] != '\n')
|
||||||
|
putchar('\n');
|
||||||
} else {
|
} else {
|
||||||
if (!PrintNewline) {
|
if (!PrintNewline) {
|
||||||
char *nlptr =
|
char *nlptr =
|
||||||
|
Loading…
x
Reference in New Issue
Block a user