diff options
Diffstat (limited to 'sys')
-rw-r--r-- | sys/compat/common/kern_info_09.c | 44 |
1 files changed, 1 insertions, 43 deletions
diff --git a/sys/compat/common/kern_info_09.c b/sys/compat/common/kern_info_09.c index 4686b9fba4d..bde24a60594 100644 --- a/sys/compat/common/kern_info_09.c +++ b/sys/compat/common/kern_info_09.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_info_09.c,v 1.12 2004/06/22 23:52:17 jfb Exp $ */ +/* $OpenBSD: kern_info_09.c,v 1.13 2007/11/28 14:04:44 deraadt Exp $ */ /* $NetBSD: kern_info_09.c,v 1.5 1996/02/21 00:10:59 cgd Exp $ */ /* @@ -90,45 +90,3 @@ compat_09_sys_setdomainname(p, v, retval) return (kern_sysctl(&name, 1, 0, 0, SCARG(uap, domainname), SCARG(uap, len), p)); } - -struct outsname { - char sysname[32]; - char nodename[32]; - char release[32]; - char version[32]; - char machine[32]; -}; - -/* ARGSUSED */ -int -compat_09_sys_uname(p, v, retval) - struct proc *p; - void *v; - register_t *retval; -{ - struct compat_09_sys_uname_args /* { - syscallarg(struct outsname *) name; - } */ *uap = v; - struct outsname outsname; - const char *cp; - char *dp, *ep; - - strlcpy(outsname.sysname, ostype, sizeof(outsname.sysname)); - strlcpy(outsname.nodename, hostname, sizeof(outsname.nodename)); - strlcpy(outsname.release, osrelease, sizeof(outsname.release)); - dp = outsname.version; - ep = &outsname.version[sizeof(outsname.version) - 1]; - for (cp = version; *cp && *cp != '('; cp++) - ; - for (cp++; *cp && *cp != ')' && dp < ep; cp++) - *dp++ = *cp; - for (; *cp && *cp != '#'; cp++) - ; - for (; *cp && *cp != ':' && dp < ep; cp++) - *dp++ = *cp; - *dp = '\0'; - strlcpy(outsname.machine, MACHINE, sizeof(outsname.machine)); - - return (copyout((caddr_t)&outsname, (caddr_t)SCARG(uap, name), - sizeof(struct outsname))); -} |