summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1999-06-30 20:47:15 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1999-06-30 20:47:15 +0000
commitc4eabceb0696d78ec54614806e84da0a8a70cb14 (patch)
treee1ac8669a11263ffdbb5e3d45e1a8a30d3f637eb /sys
parent327ffdf6c1ccb72c296e7bd90f3e8658d35bf6c7 (diff)
put non-space names in systeminfo(SI_PLATFORM); hal_snyder@sdsi.com
Diffstat (limited to 'sys')
-rw-r--r--sys/compat/svr4/svr4_stat.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/sys/compat/svr4/svr4_stat.c b/sys/compat/svr4/svr4_stat.c
index 39ba7613b27..22eef5a7bc6 100644
--- a/sys/compat/svr4/svr4_stat.c
+++ b/sys/compat/svr4/svr4_stat.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: svr4_stat.c,v 1.12 1999/06/06 15:38:51 deraadt Exp $ */
+/* $OpenBSD: svr4_stat.c,v 1.13 1999/06/30 20:47:14 deraadt Exp $ */
/* $NetBSD: svr4_stat.c,v 1.21 1996/04/22 01:16:07 christos Exp $ */
/*
@@ -443,7 +443,7 @@ svr4_sys_systeminfo(p, v, retval)
int error;
long len;
extern char ostype[], hostname[], osrelease[],
- version[], machine[], domainname[], cpu_model[];
+ version[], machine[], domainname[];
u_int rlen = SCARG(uap, len);
@@ -485,7 +485,7 @@ svr4_sys_systeminfo(p, v, retval)
break;
case SVR4_SI_PLATFORM:
- str = cpu_model;
+ str = machine;
break;
case SVR4_SI_KERB_REALM:
@@ -516,6 +516,9 @@ svr4_sys_systeminfo(p, v, retval)
if (len > rlen)
len = rlen;
+ /* on success, sysinfo() returns byte count including \0 */
+ *retval = len;
+
return copyout(str, SCARG(uap, buf), len);
}