projects
/
procps-ng
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6dd921c
)
sysctl: print new line explicitely
author
Sami Kerola
<kerolasa@iki.fi>
Fri, 2 Mar 2012 11:41:23 +0000
(12:41 +0100)
committer
Craig Small
<csmall@enc.com.au>
Sat, 3 Mar 2012 07:40:58 +0000
(18:40 +1100)
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>
sysctl.c
patch
|
blob
|
history
diff --git
a/sysctl.c
b/sysctl.c
index c27fe022737eb89d866fc525e79600db565b1c06..b6f6fc027d4ba6a5db44a03945f723da8b5cffc8 100644
(file)
--- 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 =