Add old_uname syscall.

This commit is contained in:
njoly 2007-12-24 15:56:20 +00:00
parent cbc63dde2a
commit 1fe07a25dd
3 changed files with 24 additions and 5 deletions

View File

@ -1,4 +1,4 @@
$NetBSD: syscalls.master,v 1.23 2007/12/24 14:25:30 njoly Exp $
$NetBSD: syscalls.master,v 1.24 2007/12/24 15:56:20 njoly Exp $
; NetBSD i386 COMPAT_LINUX32 system call name/number "master" file.
; (See syscalls.conf to see what it is processed into.)
@ -204,7 +204,7 @@
106 UNIMPL stat
107 UNIMPL lstat
108 UNIMPL fstat
109 UNIMPL olduname
109 STD { int linux32_sys_olduname(linux32_oldutsnamep_t up); }
110 UNIMPL iopl
111 UNIMPL vhangup
112 UNIMPL idle

View File

@ -1,4 +1,4 @@
/* $NetBSD: linux32_types.h,v 1.4 2007/04/11 11:45:55 njoly Exp $ */
/* $NetBSD: linux32_types.h,v 1.5 2007/12/24 15:56:21 njoly Exp $ */
/*-
* Copyright (c) 2006 Emmanuel Dreyfus, all rights reserved.
@ -56,6 +56,7 @@ typedef netbsd32_pointer_t linux32_oldold_utsnamep_t;
typedef netbsd32_pointer_t linux32_gidp_t;
typedef netbsd32_pointer_t linux32_oldselectp_t;
typedef netbsd32_pointer_t linux32_sysinfop_t;
typedef netbsd32_pointer_t linux32_oldutsnamep_t;
struct linux32_sysctl {
netbsd32_intp name;

View File

@ -1,4 +1,4 @@
/* $NetBSD: linux32_utsname.c,v 1.7 2007/12/20 23:02:59 dsl Exp $ */
/* $NetBSD: linux32_utsname.c,v 1.8 2007/12/24 15:56:21 njoly Exp $ */
/*-
* Copyright (c) 2006 Emmanuel Dreyfus, all rights reserved.
@ -33,7 +33,7 @@
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: linux32_utsname.c,v 1.7 2007/12/20 23:02:59 dsl Exp $");
__KERNEL_RCSID(0, "$NetBSD: linux32_utsname.c,v 1.8 2007/12/24 15:56:21 njoly Exp $");
#include <sys/types.h>
#include <sys/param.h>
@ -59,6 +59,7 @@ __KERNEL_RCSID(0, "$NetBSD: linux32_utsname.c,v 1.7 2007/12/20 23:02:59 dsl Exp
#include <compat/linux/common/linux_signal.h>
#include <compat/linux/common/linux_machdep.h>
#include <compat/linux/common/linux_misc.h>
#include <compat/linux/common/linux_olduname.h>
#include <compat/linux/common/linux_oldolduname.h>
#include <compat/linux/linux_syscallargs.h>
@ -90,6 +91,23 @@ linux32_sys_uname(struct lwp *l, const struct linux32_sys_uname_args *uap, regis
return copyout(&luts, lp, sizeof(luts));
}
int
linux32_sys_olduname(struct lwp *l, const struct linux32_sys_olduname_args *uap, register_t *retval)
{
/* {
syscallarg(linux32_oldutsnamep_t) up;
} */
struct linux_oldutsname luts;
strlcpy(luts.l_sysname, linux32_sysname, sizeof(luts.l_sysname));
strlcpy(luts.l_nodename, hostname, sizeof(luts.l_nodename));
strlcpy(luts.l_release, linux32_release, sizeof(luts.l_release));
strlcpy(luts.l_version, linux32_version, sizeof(luts.l_version));
strlcpy(luts.l_machine, LINUX_UNAME_ARCH, sizeof(luts.l_machine));
return copyout(&luts, SCARG_P32(uap, up), sizeof(luts));
}
int
linux32_sys_oldolduname(struct lwp *l, const struct linux32_sys_oldolduname_args *uap, register_t *retval)
{