Add basic support for linux32 personality(2) syscall.
This commit is contained in:
parent
ca1ed55e40
commit
b22c955a54
|
@ -1,4 +1,4 @@
|
|||
$NetBSD: syscalls.master,v 1.48 2009/01/17 22:28:53 njoly Exp $
|
||||
$NetBSD: syscalls.master,v 1.49 2009/01/20 12:00:58 njoly Exp $
|
||||
|
||||
; NetBSD i386 COMPAT_LINUX32 system call name/number "master" file.
|
||||
; (See syscalls.conf to see what it is processed into.)
|
||||
|
@ -237,7 +237,7 @@
|
|||
133 NOARGS { int|netbsd32||fchdir(int fd); }
|
||||
134 UNIMPL bdflush
|
||||
135 UNIMPL sysfs
|
||||
136 UNIMPL personality
|
||||
136 STD { int|linux32_sys||personality(int per); }
|
||||
137 UNIMPL afs_syscall
|
||||
138 NOARGS setfsuid16 { int|linux32_sys||setfsuid(uid_t uid); }
|
||||
139 NOARGS setfsgid16 { int|linux32_sys||setfsgid(gid_t gid); }
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: linux32_misc.c,v 1.15 2008/11/19 18:36:04 ad Exp $ */
|
||||
/* $NetBSD: linux32_misc.c,v 1.16 2009/01/20 12:00:59 njoly Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1995, 1998, 1999 The NetBSD Foundation, Inc.
|
||||
|
@ -32,7 +32,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: linux32_misc.c,v 1.15 2008/11/19 18:36:04 ad Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: linux32_misc.c,v 1.16 2009/01/20 12:00:59 njoly Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/proc.h>
|
||||
|
@ -147,3 +147,23 @@ linux32_sys_ptrace(struct lwp *l, const struct linux32_sys_ptrace_args *uap, reg
|
|||
|
||||
return EIO;
|
||||
}
|
||||
|
||||
int
|
||||
linux32_sys_personality(struct lwp *l, const struct linux32_sys_personality_args *uap, register_t *retval)
|
||||
{
|
||||
/* {
|
||||
syscallarg(int) per;
|
||||
} */
|
||||
|
||||
switch (SCARG(uap, per)) {
|
||||
case LINUX_PER_LINUX:
|
||||
case LINUX_PER_LINUX32:
|
||||
case LINUX_PER_QUERY:
|
||||
break;
|
||||
default:
|
||||
return EINVAL;
|
||||
}
|
||||
|
||||
retval[0] = LINUX_PER_LINUX;
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue