uname: -v: strip final whitespace compatibly with uname(3)
This restores POSIX.1 conformance PR: 260938
This commit is contained in:
parent
fd0d53f85c
commit
7e05fa3b44
@ -256,8 +256,12 @@ NATIVE_SYSCTL2_GET(version, CTL_KERN, KERN_VERSION) {
|
||||
p = NATIVE_BUFFER;
|
||||
n = NATIVE_LENGTH;
|
||||
for (; n--; ++p)
|
||||
if (*p == '\n' || *p == '\t')
|
||||
*p = ' ';
|
||||
if (*p == '\n' || *p == '\t') {
|
||||
if (n > 1)
|
||||
*p = ' ';
|
||||
else
|
||||
*p = '\0';
|
||||
}
|
||||
} NATIVE_SET;
|
||||
|
||||
NATIVE_SYSCTL2_GET(platform, CTL_HW, HW_MACHINE) {
|
||||
|
Loading…
Reference in New Issue
Block a user