From: Sami Kerola Date: Fri, 2 Mar 2012 11:41:23 +0000 (+0100) Subject: sysctl: print new line explicitely X-Git-Tag: v3.3.3~45 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f5e2277a2e5f9b9126c96321d15bb3697dff2879;p=procps-ng 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 --- diff --git a/sysctl.c b/sysctl.c index c27fe022..b6f6fc02 100644 --- a/sysctl.c +++ b/sysctl.c @@ -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 =