diff options
author | Sami Kerola <kerolasa@iki.fi> | 2012-03-02 12:41:23 +0100 |
---|---|---|
committer | Craig Small <csmall@enc.com.au> | 2012-03-03 18:40:58 +1100 |
commit | f5e2277a2e5f9b9126c96321d15bb3697dff2879 (patch) | |
tree | 66ccfb0f2c5014b6408a46bcfb60123e3c6c19ee /sysctl.c | |
parent | 6dd921ca1cbac4e0e23bf5a2b6116a0f89c373ad (diff) | |
download | procps-ng-f5e2277a2e5f9b9126c96321d15bb3697dff2879.tar.gz |
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>
Diffstat (limited to 'sysctl.c')
-rw-r--r-- | sysctl.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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 = |