summaryrefslogtreecommitdiff
path: root/sys/compat
diff options
context:
space:
mode:
Diffstat (limited to 'sys/compat')
-rw-r--r--sys/compat/common/kern_ipc_10.c235
-rw-r--r--sys/compat/common/vfs_syscalls_25.c221
-rw-r--r--sys/compat/freebsd/Makefile10
-rw-r--r--sys/compat/freebsd/files.freebsd17
-rw-r--r--sys/compat/freebsd/freebsd_exec.c195
-rw-r--r--sys/compat/freebsd/freebsd_exec.h102
-rw-r--r--sys/compat/freebsd/freebsd_file.c826
-rw-r--r--sys/compat/freebsd/freebsd_ioctl.c109
-rw-r--r--sys/compat/freebsd/freebsd_ioctl.h46
-rw-r--r--sys/compat/freebsd/freebsd_misc.c224
-rw-r--r--sys/compat/freebsd/freebsd_ptrace.c152
-rw-r--r--sys/compat/freebsd/freebsd_ptrace.h63
-rw-r--r--sys/compat/freebsd/freebsd_rtprio.h64
-rw-r--r--sys/compat/freebsd/freebsd_signal.c239
-rw-r--r--sys/compat/freebsd/freebsd_signal.h86
-rw-r--r--sys/compat/freebsd/freebsd_syscall.h630
-rw-r--r--sys/compat/freebsd/freebsd_syscallargs.h513
-rw-r--r--sys/compat/freebsd/freebsd_syscalls.c508
-rw-r--r--sys/compat/freebsd/freebsd_sysent.c981
-rw-r--r--sys/compat/freebsd/freebsd_util.h54
-rw-r--r--sys/compat/freebsd/syscalls.conf13
-rw-r--r--sys/compat/freebsd/syscalls.master662
-rw-r--r--sys/compat/ossaudio/files.ossaudio6
23 files changed, 3 insertions, 5953 deletions
diff --git a/sys/compat/common/kern_ipc_10.c b/sys/compat/common/kern_ipc_10.c
deleted file mode 100644
index 9da0154ec64..00000000000
--- a/sys/compat/common/kern_ipc_10.c
+++ /dev/null
@@ -1,235 +0,0 @@
-/* $OpenBSD: kern_ipc_10.c,v 1.8 2004/05/05 05:18:17 mickey Exp $ */
-/* $NetBSD: kern_ipc_10.c,v 1.4 1995/10/07 06:26:25 mycroft Exp $ */
-
-/*
- * Copyright (c) 1994 Adam Glass and Charles Hannum. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Adam Glass and Charles
- * Hannum.
- * 4. The names of the authors may not be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/kernel.h>
-#include <sys/proc.h>
-#include <sys/sem.h>
-#include <sys/malloc.h>
-
-#include <sys/mount.h>
-#include <sys/syscallargs.h>
-
-#include <uvm/uvm_extern.h>
-
-/*
- * Note that while we no longer have a COMPAT_10 kernel option,
- * there are other COMPAT_* options that need these old functions.
- */
-
-#if defined(SYSVSEM) && !defined(__LP64__)
-int
-compat_10_sys_semsys(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct compat_10_sys_semsys_args /* {
- syscallarg(int) which;
- syscallarg(int) a2;
- syscallarg(int) a3;
- syscallarg(int) a4;
- syscallarg(int) a5;
- } */ *uap = v;
- struct sys___semctl_args /* {
- syscallarg(int) semid;
- syscallarg(int) semnum;
- syscallarg(int) cmd;
- syscallarg(union semun *) arg;
- } */ __semctl_args;
- struct sys_semget_args /* {
- syscallarg(key_t) key;
- syscallarg(int) nsems;
- syscallarg(int) semflg;
- } */ semget_args;
- struct sys_semop_args /* {
- syscallarg(int) semid;
- syscallarg(struct sembuf *) sops;
- syscallarg(u_int) nsops;
- } */ semop_args;
-
- switch (SCARG(uap, which)) {
- case 0: /* __semctl() */
- SCARG(&__semctl_args, semid) = SCARG(uap, a2);
- SCARG(&__semctl_args, semnum) = SCARG(uap, a3);
- SCARG(&__semctl_args, cmd) = SCARG(uap, a4);
- SCARG(&__semctl_args, arg) = (union semun *)SCARG(uap, a5);
- return (sys___semctl(p, &__semctl_args, retval));
-
- case 1: /* semget() */
- SCARG(&semget_args, key) = SCARG(uap, a2);
- SCARG(&semget_args, nsems) = SCARG(uap, a3);
- SCARG(&semget_args, semflg) = SCARG(uap, a4);
- return (sys_semget(p, &semget_args, retval));
-
- case 2: /* semop() */
- SCARG(&semop_args, semid) = SCARG(uap, a2);
- SCARG(&semop_args, sops) = (struct sembuf *)SCARG(uap, a3);
- SCARG(&semop_args, nsops) = SCARG(uap, a4);
- return (sys_semop(p, &semop_args, retval));
-
- default:
- return (EINVAL);
- }
-}
-
-int
-compat_10_sys_shmsys(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct compat_10_sys_shmsys_args /* {
- syscallarg(int) which;
- syscallarg(int) a2;
- syscallarg(int) a3;
- syscallarg(int) a4;
- } */ *uap = v;
- struct sys_shmat_args /* {
- syscallarg(int) shmid;
- syscallarg(void *) shmaddr;
- syscallarg(int) shmflg;
- } */ shmat_args;
- struct sys_shmctl_args /* {
- syscallarg(int) shmid;
- syscallarg(int) cmd;
- syscallarg(struct shmid_ds *) buf;
- } */ shmctl_args;
- struct sys_shmdt_args /* {
- syscallarg(void *) shmaddr;
- } */ shmdt_args;
- struct sys_shmget_args /* {
- syscallarg(key_t) key;
- syscallarg(int) size;
- syscallarg(int) shmflg;
- } */ shmget_args;
-
- switch (SCARG(uap, which)) {
- case 0: /* shmat() */
- SCARG(&shmat_args, shmid) = SCARG(uap, a2);
- SCARG(&shmat_args, shmaddr) = (void *)SCARG(uap, a3);
- SCARG(&shmat_args, shmflg) = SCARG(uap, a4);
- return (sys_shmat(p, &shmat_args, retval));
-
- case 1: /* shmctl() */
- SCARG(&shmctl_args, shmid) = SCARG(uap, a2);
- SCARG(&shmctl_args, cmd) = SCARG(uap, a3);
- SCARG(&shmctl_args, buf) = (struct shmid_ds *)SCARG(uap, a4);
- return (sys_shmctl(p, &shmctl_args, retval));
-
- case 2: /* shmdt() */
- SCARG(&shmdt_args, shmaddr) = (void *)SCARG(uap, a2);
- return (sys_shmdt(p, &shmdt_args, retval));
-
- case 3: /* shmget() */
- SCARG(&shmget_args, key) = SCARG(uap, a2);
- SCARG(&shmget_args, size) = SCARG(uap, a3);
- SCARG(&shmget_args, shmflg) = SCARG(uap, a4);
- return (sys_shmget(p, &shmget_args, retval));
-
- default:
- return (EINVAL);
- }
-}
-
-int
-compat_10_sys_msgsys(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct compat_10_sys_msgsys_args /* {
- syscallarg(int) which;
- syscallarg(int) a2;
- syscallarg(int) a3;
- syscallarg(int) a4;
- syscallarg(int) a5;
- syscallarg(int) a6;
- } */ *uap = v;
- struct sys_msgctl_args /* {
- syscallarg(int) msqid;
- syscallarg(int) cmd;
- syscallarg(struct msqid_ds *) buf;
- } */ msgctl_args;
- struct sys_msgget_args /* {
- syscallarg(key_t) key;
- syscallarg(int) msgflg;
- } */ msgget_args;
- struct sys_msgsnd_args /* {
- syscallarg(int) msqid;
- syscallarg(void *) msgp;
- syscallarg(size_t) msgsz;
- syscallarg(int) msgflg;
- } */ msgsnd_args;
- struct sys_msgrcv_args /* {
- syscallarg(int) msqid;
- syscallarg(void *) msgp;
- syscallarg(size_t) msgsz;
- syscallarg(long) msgtyp;
- syscallarg(int) msgflg;
- } */ msgrcv_args;
-
- switch (SCARG(uap, which)) {
- case 0: /* msgctl()*/
- SCARG(&msgctl_args, msqid) = SCARG(uap, a2);
- SCARG(&msgctl_args, cmd) = SCARG(uap, a3);
- SCARG(&msgctl_args, buf) =
- (struct msqid_ds *)SCARG(uap, a4);
- return (sys_msgctl(p, &msgctl_args, retval));
-
- case 1: /* msgget() */
- SCARG(&msgget_args, key) = SCARG(uap, a2);
- SCARG(&msgget_args, msgflg) = SCARG(uap, a3);
- return (sys_msgget(p, &msgget_args, retval));
-
- case 2: /* msgsnd() */
- SCARG(&msgsnd_args, msqid) = SCARG(uap, a2);
- SCARG(&msgsnd_args, msgp) = (void *)SCARG(uap, a3);
- SCARG(&msgsnd_args, msgsz) = SCARG(uap, a4);
- SCARG(&msgsnd_args, msgflg) = SCARG(uap, a5);
- return (sys_msgsnd(p, &msgsnd_args, retval));
-
- case 3: /* msgrcv() */
- SCARG(&msgrcv_args, msqid) = SCARG(uap, a2);
- SCARG(&msgrcv_args, msgp) = (void *)SCARG(uap, a3);
- SCARG(&msgrcv_args, msgsz) = SCARG(uap, a4);
- SCARG(&msgrcv_args, msgtyp) = SCARG(uap, a5);
- SCARG(&msgrcv_args, msgflg) = SCARG(uap, a6);
- return (sys_msgrcv(p, &msgrcv_args, retval));
-
- default:
- return (EINVAL);
- }
-}
-#endif
diff --git a/sys/compat/common/vfs_syscalls_25.c b/sys/compat/common/vfs_syscalls_25.c
deleted file mode 100644
index 7ba3eeca7a4..00000000000
--- a/sys/compat/common/vfs_syscalls_25.c
+++ /dev/null
@@ -1,221 +0,0 @@
-/* $OpenBSD: vfs_syscalls_25.c,v 1.12 2006/06/25 15:01:53 sturm Exp $ */
-
-/*
- * Copyright (c) 1989, 1993
- * The Regents of the University of California. All rights reserved.
- * (c) UNIX System Laboratories, Inc.
- * All or some portions of this file are derived from material licensed
- * to the University of California by American Telephone and Telegraph
- * Co. or Unix System Laboratories, Inc. and are reproduced herein with
- * the permission of UNIX System Laboratories, Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)vfs_syscalls.c 8.28 (Berkeley) 12/10/94
- */
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/namei.h>
-#include <sys/filedesc.h>
-#include <sys/kernel.h>
-#include <sys/file.h>
-#include <sys/vnode.h>
-#include <sys/mount.h>
-#include <sys/proc.h>
-#include <sys/uio.h>
-#include <sys/dirent.h>
-
-#include <sys/syscallargs.h>
-
-void statfs_to_ostatfs(struct proc *, struct mount *, struct statfs *, struct ostatfs *);
-
-/*
- * Convert struct statfs -> struct ostatfs
- */
-void
-statfs_to_ostatfs(p, mp, sp, osp)
- struct proc *p;
- struct mount *mp;
- struct statfs *sp;
- struct ostatfs *osp;
-{
-#ifdef COMPAT_43
- osp->f_type = mp->mnt_vfc->vfc_typenum;
-#else
- osp->f_type = 0;
-#endif
- osp->f_flags = mp->mnt_flag & 0xffff;
- osp->f_bsize = sp->f_bsize;
- osp->f_iosize = sp->f_iosize;
- osp->f_blocks = sp->f_blocks;
- osp->f_bfree = sp->f_bfree;
- osp->f_bavail = sp->f_bavail;
- osp->f_files = sp->f_files;
- osp->f_ffree = sp->f_ffree;
- /* Don't let non-root see filesystem id (for NFS security) */
- if (suser(p, 0))
- osp->f_fsid.val[0] = osp->f_fsid.val[1] = 0;
- else
- bcopy(&sp->f_fsid, &osp->f_fsid, sizeof(osp->f_fsid));
- osp->f_owner = sp->f_owner;
- osp->f_syncwrites = sp->f_syncwrites;
- osp->f_asyncwrites = sp->f_asyncwrites;
- bcopy(sp->f_fstypename, osp->f_fstypename, MFSNAMELEN);
- bcopy(sp->f_mntonname, osp->f_mntonname, MNAMELEN);
- bcopy(sp->f_mntfromname, osp->f_mntfromname, MNAMELEN);
-}
-
-/*
- * Get filesystem statistics.
- */
-/* ARGSUSED */
-int
-compat_25_sys_statfs(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- register struct compat_25_sys_statfs_args /* {
- syscallarg(char *) path;
- syscallarg(struct ostatfs *) buf;
- } */ *uap = v;
- register struct mount *mp;
- register struct statfs *sp;
- struct ostatfs osb;
- int error;
- struct nameidata nd;
-
- NDINIT(&nd, LOOKUP, FOLLOW, UIO_USERSPACE, SCARG(uap, path), p);
- if ((error = namei(&nd)) != 0)
- return (error);
- mp = nd.ni_vp->v_mount;
- sp = &mp->mnt_stat;
- vrele(nd.ni_vp);
- if ((error = VFS_STATFS(mp, sp, p)) != 0)
- return (error);
-
- statfs_to_ostatfs(p, mp, sp, &osb);
- return (copyout((caddr_t)&osb, (caddr_t)SCARG(uap, buf), sizeof(osb)));
-}
-
-/*
- * Get filesystem statistics.
- */
-/* ARGSUSED */
-int
-compat_25_sys_fstatfs(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct compat_25_sys_fstatfs_args /* {
- syscallarg(int) fd;
- syscallarg(struct ostatfs *) buf;
- } */ *uap = v;
- struct file *fp;
- struct mount *mp;
- struct statfs *sp;
- struct ostatfs osb;
- int error;
-
- if ((error = getvnode(p->p_fd, SCARG(uap, fd), &fp)) != 0)
- return (error);
- mp = ((struct vnode *)fp->f_data)->v_mount;
- sp = &mp->mnt_stat;
- error = VFS_STATFS(mp, sp, p);
- FRELE(fp);
- if (error)
- return (error);
-
- statfs_to_ostatfs(p, mp, sp, &osb);
- return (copyout((caddr_t)&osb, (caddr_t)SCARG(uap, buf), sizeof(osb)));
-}
-
-/*
- * Get statistics on all filesystems.
- */
-int
-compat_25_sys_getfsstat(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- register struct compat_25_sys_getfsstat_args /* {
- syscallarg(struct ostatfs *) buf;
- syscallarg(long) bufsize;
- syscallarg(int) flags;
- } */ *uap = v;
- register struct mount *mp, *nmp;
- register struct statfs *sp;
- struct ostatfs osb;
- caddr_t sfsp;
- long count, maxcount;
- int error, flags = SCARG(uap, flags);
-
- maxcount = SCARG(uap, bufsize) / sizeof(struct ostatfs);
- sfsp = (caddr_t)SCARG(uap, buf);
- count = 0;
-
- for (mp = CIRCLEQ_FIRST(&mountlist); mp != CIRCLEQ_END(&mountlist);
- mp = nmp) {
- if (vfs_busy(mp, VB_READ|VB_NOWAIT)) {
- nmp = CIRCLEQ_NEXT(mp, mnt_list);
- continue;
- }
- if (sfsp && count < maxcount) {
- sp = &mp->mnt_stat;
-
- /* Refresh stats unless MNT_NOWAIT is specified */
- if (flags != MNT_NOWAIT &&
- flags != MNT_LAZY &&
- (flags == MNT_WAIT ||
- flags == 0) &&
- (error = VFS_STATFS(mp, sp, p))) {
- nmp = CIRCLEQ_NEXT(mp, mnt_list);
- vfs_unbusy(mp);
- continue;
- }
-
- statfs_to_ostatfs(p, mp, sp, &osb);
- error = copyout((caddr_t)&osb, sfsp, sizeof(osb));
- if (error) {
- vfs_unbusy(mp);
- return (error);
- }
- sfsp += sizeof(osb);
- }
- count++;
- nmp = CIRCLEQ_NEXT(mp, mnt_list);
- vfs_unbusy(mp);
- }
-
- if (sfsp && count > maxcount)
- *retval = maxcount;
- else
- *retval = count;
-
- return (0);
-}
diff --git a/sys/compat/freebsd/Makefile b/sys/compat/freebsd/Makefile
deleted file mode 100644
index 3be1d2fdbd2..00000000000
--- a/sys/compat/freebsd/Makefile
+++ /dev/null
@@ -1,10 +0,0 @@
-# $OpenBSD: Makefile,v 1.3 2001/08/26 03:23:44 deraadt Exp $
-# $NetBSD: Makefile,v 1.1 1995/10/10 01:19:24 mycroft Exp $
-
-SYS= ../..
-DEP= syscalls.conf syscalls.master ${SYS}/kern/makesyscalls.sh
-OBJS= freebsd_sysent.c freebsd_syscalls.c \
- freebsd_syscall.h freebsd_syscallargs.h
-
-${OBJS}: ${DEP}
- sh ${SYS}/kern/makesyscalls.sh syscalls.conf syscalls.master
diff --git a/sys/compat/freebsd/files.freebsd b/sys/compat/freebsd/files.freebsd
deleted file mode 100644
index 74f4a56a627..00000000000
--- a/sys/compat/freebsd/files.freebsd
+++ /dev/null
@@ -1,17 +0,0 @@
-# $OpenBSD: files.freebsd,v 1.5 2002/03/14 00:42:25 miod Exp $
-# $NetBSD: files.freebsd,v 1.1 1995/10/10 01:19:26 mycroft Exp $
-#
-# Config.new file description for machine-independent FreeBSD compat code.
-# Included by ports that need it.
-
-# ports should define any machine-specific files they need in their
-# own file lists.
-
-file compat/freebsd/freebsd_exec.c compat_freebsd
-file compat/freebsd/freebsd_file.c compat_freebsd
-file compat/freebsd/freebsd_ioctl.c compat_freebsd
-file compat/freebsd/freebsd_misc.c compat_freebsd
-file compat/freebsd/freebsd_ptrace.c compat_freebsd & ptrace
-file compat/freebsd/freebsd_signal.c compat_freebsd
-file compat/freebsd/freebsd_sysent.c compat_freebsd
-file compat/freebsd/freebsd_syscalls.c compat_freebsd & syscall_debug
diff --git a/sys/compat/freebsd/freebsd_exec.c b/sys/compat/freebsd/freebsd_exec.c
deleted file mode 100644
index 91beeeb0239..00000000000
--- a/sys/compat/freebsd/freebsd_exec.c
+++ /dev/null
@@ -1,195 +0,0 @@
-/* $OpenBSD: freebsd_exec.c,v 1.19 2009/03/05 19:52:23 kettenis Exp $ */
-/* $NetBSD: freebsd_exec.c,v 1.2 1996/05/18 16:02:08 christos Exp $ */
-
-/*
- * Copyright (c) 1993, 1994 Christopher G. Demetriou
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Christopher G. Demetriou.
- * 4. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/proc.h>
-#include <sys/malloc.h>
-#include <sys/vnode.h>
-#include <sys/core.h>
-#include <sys/exec.h>
-#include <sys/resourcevar.h>
-#include <uvm/uvm_extern.h>
-#include <sys/exec_elf.h>
-#include <sys/exec_olf.h>
-
-#include <machine/freebsd_machdep.h>
-
-#include <compat/freebsd/freebsd_syscall.h>
-#include <compat/freebsd/freebsd_exec.h>
-#include <compat/freebsd/freebsd_util.h>
-
-extern struct sysent freebsd_sysent[];
-#ifdef SYSCALL_DEBUG
-extern char *freebsd_syscallnames[];
-#endif
-
-extern const char freebsd_emul_path[];
-
-struct emul emul_freebsd_aout = {
- "freebsd",
- NULL,
- freebsd_sendsig,
- FREEBSD_SYS_syscall,
- FREEBSD_SYS_MAXSYSCALL,
- freebsd_sysent,
-#ifdef SYSCALL_DEBUG
- freebsd_syscallnames,
-#else
- NULL,
-#endif
- 0,
- copyargs,
- setregs,
- NULL,
- coredump_trad,
- freebsd_sigcode,
- freebsd_esigcode,
-};
-
-struct emul emul_freebsd_elf = {
- "freebsd",
- NULL,
- freebsd_sendsig,
- FREEBSD_SYS_syscall,
- FREEBSD_SYS_MAXSYSCALL,
- freebsd_sysent,
-#ifdef SYSCALL_DEBUG
- freebsd_syscallnames,
-#else
- NULL,
-#endif
- FREEBSD_ELF_AUX_ARGSIZ,
- elf32_copyargs,
- setregs,
- exec_elf32_fixup,
- coredump_trad,
- freebsd_sigcode,
- freebsd_esigcode,
-};
-
-/*
- * exec_aout_makecmds(): Check if it's an a.out-format executable.
- *
- * Given a proc pointer and an exec package pointer, see if the referent
- * of the epp is in a.out format. First check 'standard' magic numbers for
- * this architecture. If that fails, try a cpu-dependent hook.
- *
- * This function, in the former case, or the hook, in the latter, is
- * responsible for creating a set of vmcmds which can be used to build
- * the process's vm space and inserting them into the exec package.
- */
-
-int
-exec_freebsd_aout_makecmds(p, epp)
- struct proc *p;
- struct exec_package *epp;
-{
- u_long midmag;
- int error = ENOEXEC;
- struct exec *execp = epp->ep_hdr;
-
- if (epp->ep_hdrvalid < sizeof(struct exec))
- return ENOEXEC;
-
- midmag = FREEBSD_N_GETMID(*execp) << 16 | FREEBSD_N_GETMAGIC(*execp);
-
- /* assume FreeBSD's MID_MACHINE and [ZQNO]MAGIC is same as NetBSD's */
- switch (midmag) {
- case (MID_MACHINE << 16) | ZMAGIC:
- error = exec_aout_prep_oldzmagic(p, epp);
- break;
- case (MID_MACHINE << 16) | QMAGIC:
- error = exec_aout_prep_zmagic(p, epp);
- break;
- case (MID_MACHINE << 16) | NMAGIC:
- error = exec_aout_prep_nmagic(p, epp);
- break;
- case (MID_MACHINE << 16) | OMAGIC:
- error = exec_aout_prep_omagic(p, epp);
- break;
- }
- if (error == 0)
- epp->ep_emul = &emul_freebsd_aout;
- else
- kill_vmcmds(&epp->ep_vmcmds);
-
- return error;
-}
-
-int
-exec_freebsd_elf32_makecmds(struct proc *p, struct exec_package *epp)
-{
- if (!(emul_freebsd_elf.e_flags & EMUL_ENABLED))
- return (ENOEXEC);
- return exec_elf32_makecmds(p, epp);
-
-}
-
-int
-freebsd_elf_probe(p, epp, itp, pos, os)
- struct proc *p;
- struct exec_package *epp;
- char *itp;
- u_long *pos;
- u_int8_t *os;
-{
- Elf32_Ehdr *eh = epp->ep_hdr;
- char *bp, *brand;
- int error;
- size_t len;
-
- if (!(emul_freebsd_elf.e_flags & EMUL_ENABLED))
- return (ENOEXEC);
-
- /*
- * Older FreeBSD ELF binaries use a brand; newer ones use EI_OSABI
- */
- if (eh->e_ident[EI_OSABI] != ELFOSABI_FREEBSD) {
- brand = elf32_check_brand(eh);
- if (brand == NULL || strcmp(brand, "FreeBSD") != 0)
- return (EINVAL);
- }
- if (itp) {
- if ((error = emul_find(p, NULL, freebsd_emul_path, itp, &bp, 0)))
- return (error);
- if ((error = copystr(bp, itp, MAXPATHLEN, &len)))
- return (error);
- free(bp, M_TEMP);
- }
- epp->ep_emul = &emul_freebsd_elf;
- *pos = ELF32_NO_ADDR;
- if (*os == OOS_NULL)
- *os = OOS_FREEBSD;
- return (0);
-}
diff --git a/sys/compat/freebsd/freebsd_exec.h b/sys/compat/freebsd/freebsd_exec.h
deleted file mode 100644
index c708541f92b..00000000000
--- a/sys/compat/freebsd/freebsd_exec.h
+++ /dev/null
@@ -1,102 +0,0 @@
-/* $OpenBSD: freebsd_exec.h,v 1.7 2004/04/15 00:22:42 tedu Exp $ */
-
-/*-
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * from: @(#)exec.h 8.1 (Berkeley) 6/11/93
- * from: imgact_aout.h,v 1.2 1994/12/30 08:06:19 bde Exp
- */
-
-#ifndef _FREEBSD_EXEC_H
-#define _FREEBSD_EXEC_H
-
-#define FREEBSD_N_GETMAGIC(ex) \
- ( (ex).a_midmag & 0xffff )
-#define FREEBSD_N_GETMID(ex) \
- ( ((ex).a_midmag >> 16) & 0x03ff )
-#define FREEBSD_N_GETFLAG(ex) \
- ( ((ex).a_midmag >> 26) & 0x3f )
-#define FREEBSD_N_SETMAGIC(ex,mag,mid,flag) \
- ( (ex).a_midmag = (((flag) & 0x3f) <<26) | (((mid) & 0x03ff) << 16) | \
- ((mag) & 0xffff) )
-
-#define FREEBSD_N_ALIGN(ex,x) \
- (FREEBSD_N_GETMAGIC(ex) == ZMAGIC || \
- FREEBSD_N_GETMAGIC(ex) == QMAGIC ? \
- ((x) + FREEBSD___LDPGSZ - 1) & \
- ~(unsigned long)(FREEBSD___LDPGSZ - 1) : (x))
-
-/* Valid magic number check. */
-#define FREEBSD_N_BADMAG(ex) \
- (FREEBSD_N_GETMAGIC(ex) != OMAGIC && \
- FREEBSD_N_GETMAGIC(ex) != NMAGIC && \
- FREEBSD_N_GETMAGIC(ex) != ZMAGIC && \
- FREEBSD_N_GETMAGIC(ex) != QMAGIC)
-
-/* Address of the bottom of the text segment. */
-#define FREEBSD_N_TXTADDR(ex) \
- ((FREEBSD_N_GETMAGIC(ex) == OMAGIC || \
- FREEBSD_N_GETMAGIC(ex) == NMAGIC || \
- FREEBSD_N_GETMAGIC(ex) == ZMAGIC) ? 0 : __LDPGSZ)
-
-/* Address of the bottom of the data segment. */
-#define FREEBSD_N_DATADDR(ex) \
- FREEBSD_N_ALIGN(ex, FREEBSD_N_TXTADDR(ex) + (ex).a_text)
-
-/* Text segment offset. */
-#define FREEBSD_N_TXTOFF(ex) \
- (FREEBSD_N_GETMAGIC(ex) == ZMAGIC ? __LDPGSZ : \
- FREEBSD_N_GETMAGIC(ex) == QMAGIC ? 0 : sizeof(struct exec))
-
-/* Data segment offset. */
-#define FREEBSD_N_DATOFF(ex) \
- FREEBSD_N_ALIGN(ex, FREEBSD_N_TXTOFF(ex) + (ex).a_text)
-
-/* Relocation table offset. */
-#define FREEBSD_N_RELOFF(ex) \
- FREEBSD_N_ALIGN(ex, FREEBSD_N_DATOFF(ex) + (ex).a_data)
-
-/* Symbol table offset. */
-#define FREEBSD_N_SYMOFF(ex) \
- (FREEBSD_N_RELOFF(ex) + (ex).a_trsize + (ex).a_drsize)
-
-/* String table offset. */
-#define FREEBSD_N_STROFF(ex) (FREEBSD_N_SYMOFF(ex) + (ex).a_syms)
-
-#define FREEBSD_ELF_AUX_ARGSIZ (sizeof(AuxInfo) * 15 / sizeof(char *))
-
-#define FREEBSD_AOUT_HDR_SIZE sizeof(struct exec)
-
-int exec_freebsd_aout_makecmds(struct proc *, struct exec_package *);
-int exec_freebsd_elf32_makecmds(struct proc *, struct exec_package *);
-int freebsd_elf_probe(struct proc *, struct exec_package *, char *,
- u_long *, u_int8_t *);
-
-extern char freebsd_sigcode[], freebsd_esigcode[];
-
-#endif /* !_FREEBSD_EXEC_H */
diff --git a/sys/compat/freebsd/freebsd_file.c b/sys/compat/freebsd/freebsd_file.c
deleted file mode 100644
index 15168a89e54..00000000000
--- a/sys/compat/freebsd/freebsd_file.c
+++ /dev/null
@@ -1,826 +0,0 @@
-/* $OpenBSD: freebsd_file.c,v 1.26 2009/12/15 20:26:21 jasper Exp $ */
-/* $NetBSD: freebsd_file.c,v 1.3 1996/05/03 17:03:09 christos Exp $ */
-
-/*
- * Copyright (c) 1995 Frank van der Linden
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed for the NetBSD Project
- * by Frank van der Linden
- * 4. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * from: linux_file.c,v 1.3 1995/04/04 04:21:30 mycroft Exp
- */
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/namei.h>
-#include <sys/proc.h>
-#include <sys/file.h>
-#include <sys/stat.h>
-#include <sys/filedesc.h>
-#include <sys/ioctl.h>
-#include <sys/kernel.h>
-#include <sys/vnode.h>
-#include <sys/mount.h>
-#include <sys/malloc.h>
-
-#include <sys/syscallargs.h>
-
-#include <compat/freebsd/freebsd_signal.h>
-#include <compat/freebsd/freebsd_syscallargs.h>
-#include <compat/freebsd/freebsd_util.h>
-
-const char freebsd_emul_path[] = "/emul/freebsd";
-
-static char * convert_from_freebsd_mount_type(int);
-void statfs_to_freebsd_statfs(struct proc *, struct mount *, struct statfs *, struct freebsd_statfs *);
-
-struct freebsd_statfs {
- long f_spare2; /* placeholder */
- long f_bsize; /* fundamental file system block size */
- long f_iosize; /* optimal transfer block size */
- long f_blocks; /* total data blocks in file system */
- long f_bfree; /* free blocks in fs */
- long f_bavail; /* free blocks avail to non-superuser */
- long f_files; /* total file nodes in file system */
- long f_ffree; /* free file nodes in fs */
- fsid_t f_fsid; /* file system id */
- uid_t f_owner; /* user that mounted the filesystem */
- int f_type; /* type of filesystem */
- int f_flags; /* copy of mount exported flags */
- long f_syncwrites; /* count of sync writes since mount */
- long f_asyncwrites; /* count of async writes since mount */
- char f_fstypename[MFSNAMELEN]; /* fs type name */
- char f_mntonname[MNAMELEN]; /* directory on which mounted */
- char f_mntfromname[MNAMELEN];/* mounted filesystem */
-};
-
-static char *
-convert_from_freebsd_mount_type(type)
- int type;
-{
- static char *freebsd_mount_type[] = {
- NULL, /* 0 = MOUNT_NONE */
- "ffs", /* 1 = "Fast" Filesystem */
- "nfs", /* 2 = Network Filesystem */
- "mfs", /* 3 = Memory Filesystem */
- "msdos", /* 4 = MSDOS Filesystem */
- "lfs", /* 5 = Log-based Filesystem */
- "lofs", /* 6 = Loopback filesystem */
- "fdesc", /* 7 = File Descriptor Filesystem */
- "portal", /* 8 = Portal Filesystem */
- "null", /* 9 = Minimal Filesystem Layer */
- "umap", /* 10 = User/Group Identifier Remapping Filesystem */
- "kernfs", /* 11 = Kernel Information Filesystem */
- "procfs", /* 12 = /proc Filesystem */
- "afs", /* 13 = Andrew Filesystem */
- "cd9660", /* 14 = ISO9660 (aka CDROM) Filesystem */
- "union", /* 15 = Union (translucent) Filesystem */
- NULL, /* 16 = "devfs" - existing device Filesystem */
-#if 0 /* These filesystems don't exist in FreeBSD */
- "adosfs", /* ?? = AmigaDOS Filesystem */
-#endif
- };
-
- if (type < 0 || type >= nitems(freebsd_mount_type))
- return (NULL);
- return (freebsd_mount_type[type]);
-}
-
-int
-freebsd_sys_mount(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct freebsd_sys_mount_args /* {
- syscallarg(int) type;
- syscallarg(char *) path;
- syscallarg(int) flags;
- syscallarg(caddr_t) data;
- } */ *uap = v;
- int error;
- char *type, *s;
- caddr_t sg = stackgap_init(p->p_emul);
- struct sys_mount_args bma;
-
- if ((type = convert_from_freebsd_mount_type(SCARG(uap, type))) == NULL)
- return ENODEV;
- s = stackgap_alloc(&sg, MFSNAMELEN + 1);
- if ((error = copyout(type, s, strlen(type) + 1)) != 0)
- return error;
- SCARG(&bma, type) = s;
- FREEBSD_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
- SCARG(&bma, path) = SCARG(uap, path);
- SCARG(&bma, flags) = SCARG(uap, flags);
- SCARG(&bma, data) = SCARG(uap, data);
- return sys_mount(p, &bma, retval);
-}
-
-/*
- * The following syscalls are only here because of the alternate path check.
- */
-
-/* XXX - UNIX domain: int freebsd_sys_bind(int s, caddr_t name, int namelen); */
-/* XXX - UNIX domain: int freebsd_sys_connect(int s, caddr_t name, int namelen); */
-
-
-int
-freebsd_sys_open(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct freebsd_sys_open_args /* {
- syscallarg(char *) path;
- syscallarg(int) flags;
- syscallarg(int) mode;
- } */ *uap = v;
- caddr_t sg = stackgap_init(p->p_emul);
-
- if (SCARG(uap, flags) & O_CREAT)
- FREEBSD_CHECK_ALT_CREAT(p, &sg, SCARG(uap, path));
- else
- FREEBSD_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
- return sys_open(p, uap, retval);
-}
-
-int
-compat_43_freebsd_sys_creat(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct compat_43_freebsd_sys_creat_args /* {
- syscallarg(char *) path;
- syscallarg(int) mode;
- } */ *uap = v;
- caddr_t sg = stackgap_init(p->p_emul);
-
- FREEBSD_CHECK_ALT_CREAT(p, &sg, SCARG(uap, path));
- return compat_43_sys_creat(p, uap, retval);
-}
-
-int
-freebsd_sys_link(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct freebsd_sys_link_args /* {
- syscallarg(char *) path;
- syscallarg(char *) link;
- } */ *uap = v;
- caddr_t sg = stackgap_init(p->p_emul);
-
- FREEBSD_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
- FREEBSD_CHECK_ALT_CREAT(p, &sg, SCARG(uap, link));
- return sys_link(p, uap, retval);
-}
-
-int
-freebsd_sys_unlink(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct freebsd_sys_unlink_args /* {
- syscallarg(char *) path;
- } */ *uap = v;
- caddr_t sg = stackgap_init(p->p_emul);
-
- FREEBSD_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
- return sys_unlink(p, uap, retval);
-}
-
-int
-freebsd_sys_chdir(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct freebsd_sys_chdir_args /* {
- syscallarg(char *) path;
- } */ *uap = v;
- caddr_t sg = stackgap_init(p->p_emul);
-
- FREEBSD_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
- return sys_chdir(p, uap, retval);
-}
-
-int
-freebsd_sys_mknod(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct freebsd_sys_mknod_args /* {
- syscallarg(char *) path;
- syscallarg(int) mode;
- syscallarg(int) dev;
- } */ *uap = v;
- caddr_t sg = stackgap_init(p->p_emul);
-
- FREEBSD_CHECK_ALT_CREAT(p, &sg, SCARG(uap, path));
- return sys_mknod(p, uap, retval);
-}
-
-int
-freebsd_sys_chmod(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct freebsd_sys_chmod_args /* {
- syscallarg(char *) path;
- syscallarg(int) mode;
- } */ *uap = v;
- caddr_t sg = stackgap_init(p->p_emul);
-
- FREEBSD_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
- return sys_chmod(p, uap, retval);
-}
-
-int
-freebsd_sys_chown(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct freebsd_sys_chown_args /* {
- syscallarg(char *) path;
- syscallarg(int) uid;
- syscallarg(int) gid;
- } */ *uap = v;
- caddr_t sg = stackgap_init(p->p_emul);
-
- FREEBSD_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
- return sys_chown(p, uap, retval);
-}
-
-int
-freebsd_sys_unmount(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct freebsd_sys_unmount_args /* {
- syscallarg(char *) path;
- syscallarg(int) flags;
- } */ *uap = v;
- caddr_t sg = stackgap_init(p->p_emul);
-
- FREEBSD_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
- return sys_unmount(p, uap, retval);
-}
-
-int
-freebsd_sys_access(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct freebsd_sys_access_args /* {
- syscallarg(char *) path;
- syscallarg(int) flags;
- } */ *uap = v;
- caddr_t sg = stackgap_init(p->p_emul);
-
- FREEBSD_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
- return sys_access(p, uap, retval);
-}
-
-int
-freebsd_sys_chflags(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct freebsd_sys_chflags_args /* {
- syscallarg(char *) path;
- syscallarg(int) flags;
- } */ *uap = v;
- caddr_t sg = stackgap_init(p->p_emul);
-
- FREEBSD_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
- return sys_chflags(p, uap, retval);
-}
-
-int
-compat_43_freebsd_sys_stat(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct compat_43_freebsd_sys_stat_args /* {
- syscallarg(char *) path;
- syscallarg(struct stat43 *) ub;
- } */ *uap = v;
- caddr_t sg = stackgap_init(p->p_emul);
-
- FREEBSD_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
- return compat_43_sys_stat(p, uap, retval);
-}
-
-int
-compat_43_freebsd_sys_lstat(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct compat_43_freebsd_sys_lstat_args /* {
- syscallarg(char *) path;
- syscallarg(struct stat43 *) ub;
- } */ *uap = v;
- caddr_t sg = stackgap_init(p->p_emul);
-
- FREEBSD_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
- return compat_43_sys_lstat(p, uap, retval);
-}
-
-int
-freebsd_sys_revoke(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct freebsd_sys_revoke_args /* {
- syscallarg(char *) path;
- } */ *uap = v;
- caddr_t sg = stackgap_init(p->p_emul);
-
- FREEBSD_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
- return sys_revoke(p, uap, retval);
-}
-
-int
-freebsd_sys_symlink(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct freebsd_sys_symlink_args /* {
- syscallarg(char *) path;
- syscallarg(char *) link;
- } */ *uap = v;
- caddr_t sg = stackgap_init(p->p_emul);
-
- FREEBSD_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
- FREEBSD_CHECK_ALT_CREAT(p, &sg, SCARG(uap, link));
- return sys_symlink(p, uap, retval);
-}
-
-int
-freebsd_sys_readlink(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct freebsd_sys_readlink_args /* {
- syscallarg(char *) path;
- syscallarg(char *) buf;
- syscallarg(int) count;
- } */ *uap = v;
- caddr_t sg = stackgap_init(p->p_emul);
-
- FREEBSD_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
- return sys_readlink(p, uap, retval);
-}
-
-int
-freebsd_sys_execve(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct freebsd_sys_execve_args /* {
- syscallarg(char *) path;
- syscallarg(char **) argp;
- syscallarg(char **) envp;
- } */ *uap = v;
- struct sys_execve_args ap;
- caddr_t sg;
-
- sg = stackgap_init(p->p_emul);
- FREEBSD_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
-
- SCARG(&ap, path) = SCARG(uap, path);
- SCARG(&ap, argp) = SCARG(uap, argp);
- SCARG(&ap, envp) = SCARG(uap, envp);
-
- return sys_execve(p, &ap, retval);
-}
-
-int
-freebsd_sys_chroot(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct freebsd_sys_chroot_args /* {
- syscallarg(char *) path;
- } */ *uap = v;
- caddr_t sg = stackgap_init(p->p_emul);
-
- FREEBSD_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
- return sys_chroot(p, uap, retval);
-}
-
-int
-freebsd_sys_rename(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct freebsd_sys_rename_args /* {
- syscallarg(char *) from;
- syscallarg(char *) to;
- } */ *uap = v;
- caddr_t sg = stackgap_init(p->p_emul);
-
- FREEBSD_CHECK_ALT_EXIST(p, &sg, SCARG(uap, from));
- FREEBSD_CHECK_ALT_CREAT(p, &sg, SCARG(uap, to));
- return sys_rename(p, uap, retval);
-}
-
-int
-compat_43_freebsd_sys_truncate(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct compat_43_freebsd_sys_truncate_args /* {
- syscallarg(char *) path;
- syscallarg(long) length;
- } */ *uap = v;
- caddr_t sg = stackgap_init(p->p_emul);
-
- FREEBSD_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
- return compat_43_sys_truncate(p, uap, retval);
-}
-
-int
-freebsd_sys_mkfifo(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct freebsd_sys_mkfifo_args /* {
- syscallarg(char *) path;
- syscallarg(int) mode;
- } */ *uap = v;
- caddr_t sg = stackgap_init(p->p_emul);
-
- FREEBSD_CHECK_ALT_CREAT(p, &sg, SCARG(uap, path));
- return sys_mkfifo(p, uap, retval);
-}
-
-int
-freebsd_sys_mkdir(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct freebsd_sys_mkdir_args /* {
- syscallarg(char *) path;
- syscallarg(int) mode;
- } */ *uap = v;
- caddr_t sg = stackgap_init(p->p_emul);
-
- FREEBSD_CHECK_ALT_CREAT(p, &sg, SCARG(uap, path));
- return sys_mkdir(p, uap, retval);
-}
-
-int
-freebsd_sys_rmdir(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct freebsd_sys_rmdir_args /* {
- syscallarg(char *) path;
- } */ *uap = v;
- caddr_t sg = stackgap_init(p->p_emul);
-
- FREEBSD_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
- return sys_rmdir(p, uap, retval);
-}
-
-/*
- * Convert struct statfs -> struct freebsd_statfs
- */
-void
-statfs_to_freebsd_statfs(p, mp, sp, fsp)
- struct proc *p;
- struct mount *mp;
- struct statfs *sp;
- struct freebsd_statfs *fsp;
-{
- fsp->f_bsize = sp->f_bsize;
- fsp->f_iosize = sp->f_iosize;
- fsp->f_blocks = sp->f_blocks;
- fsp->f_bfree = sp->f_bfree;
- fsp->f_bavail = sp->f_bavail;
- fsp->f_files = sp->f_files;
- fsp->f_ffree = sp->f_ffree;
- /* Don't let non-root see filesystem id (for NFS security) */
- if (suser(p, 0))
- fsp->f_fsid.val[0] = fsp->f_fsid.val[1] = 0;
- else
- bcopy(&sp->f_fsid, &fsp->f_fsid, sizeof(fsp->f_fsid));
- fsp->f_owner = sp->f_owner;
- fsp->f_type = mp->mnt_vfc->vfc_typenum;
- fsp->f_flags = sp->f_flags;
- fsp->f_syncwrites = sp->f_syncwrites;
- fsp->f_asyncwrites = sp->f_asyncwrites;
- bcopy(sp->f_fstypename, fsp->f_fstypename, MFSNAMELEN);
- bcopy(sp->f_mntonname, fsp->f_mntonname, MNAMELEN);
- bcopy(sp->f_mntfromname, fsp->f_mntfromname, MNAMELEN);
-}
-
-/*
- * Get filesystem statistics.
- */
-/* ARGSUSED */
-int
-freebsd_sys_statfs(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- register struct freebsd_sys_statfs_args /* {
- syscallarg(char *) path;
- syscallarg(struct freebsd_statfs *) buf;
- } */ *uap = v;
- register struct mount *mp;
- register struct statfs *sp;
- struct freebsd_statfs fsb;
- int error;
- struct nameidata nd;
- caddr_t sg = stackgap_init(p->p_emul);
-
- FREEBSD_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
- NDINIT(&nd, LOOKUP, FOLLOW, UIO_USERSPACE, SCARG(uap, path), p);
- if ((error = namei(&nd)) != 0)
- return (error);
- mp = nd.ni_vp->v_mount;
- sp = &mp->mnt_stat;
- vrele(nd.ni_vp);
- if ((error = VFS_STATFS(mp, sp, p)) != 0)
- return (error);
- sp->f_flags = mp->mnt_flag & MNT_VISFLAGMASK;
-
- statfs_to_freebsd_statfs(p, mp, sp, &fsb);
- return (copyout((caddr_t)&fsb, (caddr_t)SCARG(uap, buf), sizeof(fsb)));
-}
-
-/*
- * Get filesystem statistics.
- */
-/* ARGSUSED */
-int
-freebsd_sys_fstatfs(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- register struct freebsd_sys_fstatfs_args /* {
- syscallarg(int) fd;
- syscallarg(struct freebsd_statfs *) buf;
- } */ *uap = v;
- struct file *fp;
- struct mount *mp;
- register struct statfs *sp;
- struct freebsd_statfs fsb;
- int error;
-
- if ((error = getvnode(p->p_fd, SCARG(uap, fd), &fp)) != 0)
- return (error);
- mp = ((struct vnode *)fp->f_data)->v_mount;
- sp = &mp->mnt_stat;
- error = VFS_STATFS(mp, sp, p);
- FRELE(fp);
- if (error)
- return (error);
- sp->f_flags = mp->mnt_flag & MNT_VISFLAGMASK;
-
- statfs_to_freebsd_statfs(p, mp, sp, &fsb);
- return (copyout((caddr_t)&fsb, (caddr_t)SCARG(uap, buf), sizeof(fsb)));
-}
-
-/*
- * Get statistics on all filesystems.
- */
-int
-freebsd_sys_getfsstat(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- register struct freebsd_sys_getfsstat_args /* {
- syscallarg(struct freebsd_statfs *) buf;
- syscallarg(long) bufsize;
- syscallarg(int) flags;
- } */ *uap = v;
- register struct mount *mp, *nmp;
- register struct statfs *sp;
- struct freebsd_statfs fsb;
- caddr_t sfsp;
- long count, maxcount;
- int error, flags = SCARG(uap, flags);
-
- maxcount = SCARG(uap, bufsize) / sizeof(struct freebsd_statfs);
- sfsp = (caddr_t)SCARG(uap, buf);
- count = 0;
-
- for (mp = CIRCLEQ_FIRST(&mountlist); mp != CIRCLEQ_END(&mountlist);
- mp = nmp) {
- if (vfs_busy(mp, VB_READ|VB_NOWAIT)) {
- nmp = CIRCLEQ_NEXT(mp, mnt_list);
- continue;
- }
- if (sfsp && count < maxcount) {
- sp = &mp->mnt_stat;
-
- /* Refresh stats unless MNT_NOWAIT is specified */
- if (flags != MNT_NOWAIT &&
- flags != MNT_LAZY &&
- (flags == MNT_WAIT ||
- flags == 0) &&
- (error = VFS_STATFS(mp, sp, p))) {
- nmp = CIRCLEQ_NEXT(mp, mnt_list);
- vfs_unbusy(mp);
- continue;
- }
- sp->f_flags = mp->mnt_flag & MNT_VISFLAGMASK;
-
- statfs_to_freebsd_statfs(p, mp, sp, &fsb);
- error = copyout((caddr_t)&fsb, sfsp, sizeof(fsb));
- if (error) {
- vfs_unbusy(mp);
- return (error);
- }
- sfsp += sizeof(fsb);
- }
- count++;
- nmp = CIRCLEQ_NEXT(mp, mnt_list);
- vfs_unbusy(mp);
- }
-
- if (sfsp && count > maxcount)
- *retval = maxcount;
- else
- *retval = count;
-
- return (0);
-}
-
-#ifdef NFSCLIENT
-int
-freebsd_sys_getfh(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct freebsd_sys_getfh_args /* {
- syscallarg(char *) fname;
- syscallarg(fhandle_t *) fhp;
- } */ *uap = v;
- caddr_t sg = stackgap_init(p->p_emul);
-
- FREEBSD_CHECK_ALT_EXIST(p, &sg, SCARG(uap, fname));
- return sys_getfh(p, uap, retval);
-}
-#endif /* NFSCLIENT */
-
-int
-freebsd_sys_stat(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct freebsd_sys_stat_args /* {
- syscallarg(char *) path;
- syscallarg(struct stat35 *) ub;
- } */ *uap = v;
- caddr_t sg = stackgap_init(p->p_emul);
-
- FREEBSD_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
- return compat_35_sys_stat(p, uap, retval);
-}
-
-int
-freebsd_sys_lstat(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct freebsd_sys_lstat_args /* {
- syscallarg(char *) path;
- syscallarg(struct stat35 *) ub;
- } */ *uap = v;
- caddr_t sg = stackgap_init(p->p_emul);
-
- FREEBSD_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
- return compat_35_sys_lstat(p, uap, retval);
-}
-
-int
-freebsd_sys_pathconf(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct freebsd_sys_pathconf_args /* {
- syscallarg(char *) path;
- syscallarg(int) name;
- } */ *uap = v;
- caddr_t sg = stackgap_init(p->p_emul);
-
- FREEBSD_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
- return sys_pathconf(p, uap, retval);
-}
-
-int
-freebsd_sys_truncate(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct freebsd_sys_truncate_args /* {
- syscallarg(char *) path;
- syscallarg(int) pad;
- syscallarg(off_t) length;
- } */ *uap = v;
- caddr_t sg = stackgap_init(p->p_emul);
-
- FREEBSD_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
- return sys_truncate(p, uap, retval);
-}
-
-/*
- * Just pass on everything to our fcntl, except for F_[GS]ETOWN on pipes,
- * where we translate to SIOC[GS]PGRP.
- */
-int
-freebsd_sys_fcntl(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct freebsd_sys_fcntl_args /* {
- syscallarg(int) fd;
- syscallarg(int) cmd;
- syscallarg(void *) arg;
- } */ *uap = v;
- int fd, cmd, error;
- struct filedesc *fdp;
- struct file *fp;
-
- fd = SCARG(uap, fd);
- cmd = SCARG(uap, cmd);
-
- switch (cmd) {
- case F_GETOWN:
- case F_SETOWN:
- /* Our pipes does not understand F_[GS]ETOWN. */
- fdp = p->p_fd;
- if ((fp = fd_getfile(fdp, fd)) == NULL)
- return (EBADF);
- if (fp->f_type == DTYPE_PIPE) {
- FREF(fp);
- error = (*fp->f_ops->fo_ioctl)(fp,
- cmd == F_GETOWN ? SIOCGPGRP : SIOCSPGRP,
- (caddr_t)&SCARG(uap, arg), p);
- FRELE(fp);
- return (error);
- }
- break;
- }
-
- return (sys_fcntl(p, uap, retval));
-}
-
diff --git a/sys/compat/freebsd/freebsd_ioctl.c b/sys/compat/freebsd/freebsd_ioctl.c
deleted file mode 100644
index 7536a0c92d4..00000000000
--- a/sys/compat/freebsd/freebsd_ioctl.c
+++ /dev/null
@@ -1,109 +0,0 @@
-/* $OpenBSD: freebsd_ioctl.c,v 1.4 2001/02/03 02:45:31 mickey Exp $ */
-/* $NetBSD: freebsd_ioctl.c,v 1.1 1995/10/10 01:19:31 mycroft Exp $ */
-
-/*
- * Copyright (c) 1995 Frank van der Linden
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed for the NetBSD Project
- * by Frank van der Linden
- * 4. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/proc.h>
-#include <sys/mount.h>
-
-#include <sys/syscallargs.h>
-
-#include <compat/freebsd/freebsd_signal.h>
-#include <compat/freebsd/freebsd_syscallargs.h>
-#include <compat/freebsd/freebsd_util.h>
-#include <compat/freebsd/freebsd_ioctl.h>
-
-#include <compat/ossaudio/ossaudio.h>
-#include <compat/ossaudio/ossaudiovar.h>
-
-/* The FreeBSD and OSS(Linux) encodings of ioctl R/W differ. */
-static void freebsd_to_oss(struct freebsd_sys_ioctl_args *,
- struct oss_sys_ioctl_args *);
-
-static void
-freebsd_to_oss(uap, rap)
-struct freebsd_sys_ioctl_args *uap;
-struct oss_sys_ioctl_args *rap;
-{
- u_long ocmd, ncmd;
-
- ocmd = SCARG(uap, com);
- ncmd = ocmd &~ FREEBSD_IOC_DIRMASK;
- switch(ocmd & FREEBSD_IOC_DIRMASK) {
- case FREEBSD_IOC_VOID: ncmd |= OSS_IOC_VOID; break;
- case FREEBSD_IOC_OUT: ncmd |= OSS_IOC_OUT; break;
- case FREEBSD_IOC_IN: ncmd |= OSS_IOC_IN; break;
- case FREEBSD_IOC_INOUT: ncmd |= OSS_IOC_INOUT; break;
- }
- SCARG(rap, fd) = SCARG(uap, fd);
- SCARG(rap, com) = ncmd;
- SCARG(rap, data) = SCARG(uap, data);
-}
-
-int
-freebsd_sys_ioctl(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct freebsd_sys_ioctl_args /* {
- syscallarg(int) fd;
- syscallarg(u_long) com;
- syscallarg(caddr_t) data;
- } */ *uap = v;
- struct oss_sys_ioctl_args ap;
-
- /*
- * XXX - <sys/cdio.h>'s incompatibility
- * _IO('c', 25..27, *): incompatible
- * _IO('c', 28... , *): not exist
- */
- /* XXX - <sys/mtio.h> */
- /* XXX - <sys/scsiio.h> */
- /* XXX - should convert machine dependent ioctl()s */
-
- switch (FREEBSD_IOCGROUP(SCARG(uap, com))) {
- case 'M':
- freebsd_to_oss(uap, &ap);
- return oss_ioctl_mixer(p, &ap, retval);
- case 'Q':
- freebsd_to_oss(uap, &ap);
- return oss_ioctl_sequencer(p, &ap, retval);
- case 'P':
- freebsd_to_oss(uap, &ap);
- return oss_ioctl_audio(p, &ap, retval);
- default:
- return sys_ioctl(p, uap, retval);
- }
-}
diff --git a/sys/compat/freebsd/freebsd_ioctl.h b/sys/compat/freebsd/freebsd_ioctl.h
deleted file mode 100644
index 43c1332c5b6..00000000000
--- a/sys/compat/freebsd/freebsd_ioctl.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/* $OpenBSD: freebsd_ioctl.h,v 1.3 1998/04/26 21:22:30 provos Exp $ */
-/* $NetBSD: freebsd_ioctl.h,v 1.1 1995/10/10 01:19:32 mycroft Exp $ */
-
-/*
- * Copyright (c) 1995 Frank van der Linden
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed for the NetBSD Project
- * by Frank van der Linden
- * 4. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef _FREEBSD_IOCTL_H
-#define _FREEBSD_IOCTL_H
-
-#define FREEBSD_IOCGROUP(x) (((x) >> 8) & 0xff)
-
-#define FREEBSD_IOC_DIRMASK 0xe0000000
-#define FREEBSD_IOC_VOID 0x20000000
-#define FREEBSD_IOC_OUT 0x40000000
-#define FREEBSD_IOC_IN 0x80000000
-#define FREEBSD_IOC_INOUT (FREEBSD_IOC_IN|FREEBSD_IOC_OUT)
-
-#endif /* !_FREEBSD_IOCTL_H */
diff --git a/sys/compat/freebsd/freebsd_misc.c b/sys/compat/freebsd/freebsd_misc.c
deleted file mode 100644
index 1ee602a4fa0..00000000000
--- a/sys/compat/freebsd/freebsd_misc.c
+++ /dev/null
@@ -1,224 +0,0 @@
-/* $OpenBSD: freebsd_misc.c,v 1.11 2007/11/28 13:47:02 deraadt Exp $ */
-/* $NetBSD: freebsd_misc.c,v 1.2 1996/05/03 17:03:10 christos Exp $ */
-
-/*
- * Copyright (c) 1995 Frank van der Linden
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed for the NetBSD Project
- * by Frank van der Linden
- * 4. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/*
- * FreeBSD compatibility module. Try to deal with various FreeBSD system calls.
- */
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/proc.h>
-#include <sys/mount.h>
-#include <sys/kernel.h>
-#include <sys/file.h>
-#include <sys/dirent.h>
-#include <sys/filedesc.h>
-#include <sys/mman.h>
-#include <sys/vnode.h>
-
-#include <sys/syscallargs.h>
-
-#include <compat/freebsd/freebsd_signal.h>
-#include <compat/freebsd/freebsd_syscallargs.h>
-#include <compat/freebsd/freebsd_util.h>
-#include <compat/freebsd/freebsd_rtprio.h>
-
-#include <compat/common/compat_dir.h>
-
-/* just a place holder */
-
-int
-freebsd_sys_rtprio(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
-#ifdef notyet
- struct freebsd_sys_rtprio_args /* {
- syscallarg(int) function;
- syscallarg(pid_t) pid;
- syscallarg(struct freebsd_rtprio *) rtp;
- } */ *uap = v;
-#endif
-
- return ENOSYS; /* XXX */
-}
-
-/*
- * Argh.
- * The syscalls.master mechanism cannot handle a system call that is in
- * two spots in the table.
- */
-int
-freebsd_sys_poll2(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- return (sys_poll(p, v, retval));
-}
-
-/*
- * Our madvise is currently dead (always returns EOPNOTSUPP).
- */
-int
-freebsd_sys_madvise(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- return (0);
-}
-
-
-int freebsd_readdir_callback(void *, struct dirent *, off_t);
-
-struct freebsd_readdir_callback_args {
- caddr_t outp;
- int resid;
-};
-
-int
-freebsd_readdir_callback(void *arg, struct dirent *bdp, off_t cookie)
-{
- struct freebsd_readdir_callback_args *cb = arg;
- struct dirent idb;
- int error;
-
- if (cb->resid < bdp->d_reclen)
- return (ENOMEM);
- idb.d_fileno = bdp->d_fileno;
- idb.d_reclen = bdp->d_reclen;
- idb.d_type = bdp->d_type;
- idb.d_namlen = bdp->d_namlen;
- strlcpy(idb.d_name, bdp->d_name, sizeof(idb.d_name));
-
- if ((error = copyout((caddr_t)&idb, cb->outp, bdp->d_reclen)))
- return (error);
- cb->outp += bdp->d_reclen;
- cb->resid -= bdp->d_reclen;
-
- return (0);
-}
-
-int
-freebsd_sys_getdents(struct proc *p, void *v, register_t *retval)
-{
- struct freebsd_sys_getdents_args /* {
- syscallarg(int) fd;
- syscallarg(void *) dirent;
- syscallarg(unsigned) count;
- } */ *uap = v;
- struct vnode *vp;
- struct file *fp;
- int error;
- struct freebsd_readdir_callback_args args;
-
- if ((error = getvnode(p->p_fd, SCARG(uap, fd), &fp)) != 0)
- return (error);
-
- vp = (struct vnode *)fp->f_data;
-
- args.resid = SCARG(uap, count);
- args.outp = (caddr_t)SCARG(uap, dirent);
-
- error = readdir_with_callback(fp, &fp->f_offset, args.resid,
- freebsd_readdir_callback, &args);
-
- FRELE(fp);
- if (error)
- return (error);
-
- *retval = SCARG(uap, count) - args.resid;
- return (0);
-}
-
-#define FBSD_MAP_NOCORE 0x20000
-int
-freebsd_sys_mmap(struct proc *p, void *v, register_t *retval)
-{
- struct freebsd_sys_mmap_args /* {
- syscallarg(caddr_t) addr;
- syscallarg(size_t) len;
- syscallarg(int) prot;
- syscallarg(int) flags;
- syscallarg(int) fd;
- syscallarg(long) pad;
- syscallarg(off_t) pos;
- } */ *uap = v;
- SCARG(uap, flags) &= ~FBSD_MAP_NOCORE;
- return (sys_mmap(p, uap, retval));
-}
-
-struct outsname {
- char sysname[32];
- char nodename[32];
- char release[32];
- char version[32];
- char machine[32];
-};
-
-/* ARGSUSED */
-int
-compat_freebsd_sys_uname(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct compat_freebsd_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)));
-}
diff --git a/sys/compat/freebsd/freebsd_ptrace.c b/sys/compat/freebsd/freebsd_ptrace.c
deleted file mode 100644
index 68d504fea4c..00000000000
--- a/sys/compat/freebsd/freebsd_ptrace.c
+++ /dev/null
@@ -1,152 +0,0 @@
-/* $OpenBSD: freebsd_ptrace.c,v 1.7 2010/06/26 23:24:44 guenther Exp $ */
-/* $NetBSD: freebsd_ptrace.c,v 1.2 1996/05/03 17:03:12 christos Exp $ */
-
-/*-
- * Copyright (c) 1994 Christopher G. Demetriou. All rights reserved.
- * Copyright (c) 1982, 1986, 1989, 1993
- * The Regents of the University of California. All rights reserved.
- * (c) UNIX System Laboratories, Inc.
- * All or some portions of this file are derived from material licensed
- * to the University of California by American Telephone and Telegraph
- * Co. or Unix System Laboratories, Inc. and are reproduced herein with
- * the permission of UNIX System Laboratories, Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * from: @(#)sys_process.c 8.1 (Berkeley) 6/10/93
- */
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/proc.h>
-#include <sys/errno.h>
-#include <sys/ptrace.h>
-#include <sys/uio.h>
-#include <sys/mount.h>
-#include <sys/syscallargs.h>
-
-#include <machine/reg.h>
-#include <machine/freebsd_machdep.h>
-
-#include <compat/freebsd/freebsd_signal.h>
-#include <compat/freebsd/freebsd_syscallargs.h>
-#include <compat/freebsd/freebsd_util.h>
-#include <compat/freebsd/freebsd_ptrace.h>
-
-/*
- * Process debugging system call.
- */
-int
-freebsd_sys_ptrace(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct freebsd_sys_ptrace_args /* {
- syscallarg(int) req;
- syscallarg(pid_t) pid;
- syscallarg(caddr_t) addr;
- syscallarg(int) data;
- } */ *uap = v;
- int error;
- caddr_t sg;
- struct {
- struct reg regs;
- struct fpreg fpregs;
- } *nrp;
- struct sys_ptrace_args npa;
- struct freebsd_ptrace_reg fr;
-
- switch (SCARG(uap, req)) {
-#ifdef PT_STEP
- case FREEBSD_PT_STEP:
- SCARG(&npa, req) = PT_STEP;
- SCARG(&npa, pid) = SCARG(uap, pid);
- SCARG(&npa, addr) = SCARG(uap, addr);
- SCARG(&npa, data) = SCARG(uap, data);
- return sys_ptrace(p, &npa, retval);
-#endif
- case FREEBSD_PT_TRACE_ME:
- case FREEBSD_PT_READ_I:
- case FREEBSD_PT_READ_D:
- case FREEBSD_PT_WRITE_I:
- case FREEBSD_PT_WRITE_D:
- case FREEBSD_PT_CONTINUE:
- case FREEBSD_PT_KILL:
- /* These requests are compatible with NetBSD */
- return sys_ptrace(p, uap, retval);
-
- case FREEBSD_PT_READ_U:
- case FREEBSD_PT_WRITE_U:
- sg = stackgap_init(p->p_emul);
- nrp = stackgap_alloc(&sg, sizeof(*nrp));
- SCARG(&npa, req) = PT_GETREGS;
- SCARG(&npa, pid) = SCARG(uap, pid);
- SCARG(&npa, addr) = (caddr_t)&nrp->regs;
- if ((error = sys_ptrace(p, &npa, retval)) != 0)
- return error;
-#ifdef PT_GETFPREGS
- SCARG(&npa, req) = PT_GETFPREGS;
- SCARG(&npa, pid) = SCARG(uap, pid);
- SCARG(&npa, addr) = (caddr_t)&nrp->fpregs;
- if ((error = sys_ptrace(p, &npa, retval)) != 0)
- return error;
-#endif
- netbsd_to_freebsd_ptrace_regs(&nrp->regs, &nrp->fpregs, &fr);
- switch (SCARG(uap, req)) {
- case FREEBSD_PT_READ_U:
- return freebsd_ptrace_getregs(&fr, SCARG(uap, addr),
- retval);
-
- case FREEBSD_PT_WRITE_U:
- error = freebsd_ptrace_setregs(&fr,
- SCARG(uap, addr), SCARG(uap, data));
- if (error)
- return error;
- freebsd_to_netbsd_ptrace_regs(&fr,
- &nrp->regs, &nrp->fpregs);
- SCARG(&npa, req) = PT_SETREGS;
- SCARG(&npa, pid) = SCARG(uap, pid);
- SCARG(&npa, addr) = (caddr_t)&nrp->regs;
- if ((error = sys_ptrace(p, &npa, retval)) != 0)
- return error;
-#ifdef PT_SETFPREGS
- SCARG(&npa, req) = PT_SETFPREGS;
- SCARG(&npa, pid) = SCARG(uap, pid);
- SCARG(&npa, addr) = (caddr_t)&nrp->fpregs;
- if ((error = sys_ptrace(p, &npa, retval)) != 0)
- return error;
-#endif
- return 0;
- }
-
- default: /* It was not a legal request. */
- return (EINVAL);
- }
-
-#ifdef DIAGNOSTIC
- panic("freebsd_ptrace: impossible");
-#endif
-}
diff --git a/sys/compat/freebsd/freebsd_ptrace.h b/sys/compat/freebsd/freebsd_ptrace.h
deleted file mode 100644
index 72cb431a1c7..00000000000
--- a/sys/compat/freebsd/freebsd_ptrace.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/* * $OpenBSD: freebsd_ptrace.h,v 1.4 2003/06/02 23:28:00 millert Exp $*/
-/*-
- * Copyright (c) 1984, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)ptrace.h 8.2 (Berkeley) 1/4/94
- */
-
-#ifndef _FREEBSD_PTRACE_H_
-#define _FREEBSD_PTRACE_H_
-
-#define FREEBSD_PT_TRACE_ME 0 /* child declares it's being traced */
-#define FREEBSD_PT_READ_I 1 /* read word in child's I space */
-#define FREEBSD_PT_READ_D 2 /* read word in child's D space */
-#define FREEBSD_PT_READ_U 3 /* read word in child's user structure */
-#define FREEBSD_PT_WRITE_I 4 /* write word in child's I space */
-#define FREEBSD_PT_WRITE_D 5 /* write word in child's D space */
-#define FREEBSD_PT_WRITE_U 6 /* write word in child's user structure */
-#define FREEBSD_PT_CONTINUE 7 /* continue the child */
-#define FREEBSD_PT_KILL 8 /* kill the child process */
-#define FREEBSD_PT_STEP 9 /* single step the child */
-
-#ifdef notdef
-#define FREEBSD_PT_ATTACH 10 /* trace some running process */
-#define FREEBSD_PT_DETACH 11 /* stop tracing a process */
-#endif
-
-#define FREEBSD_PT_FIRSTMACH 32 /* for machine-specific requests */
-
-void netbsd_to_freebsd_ptrace_regs(struct reg *, struct fpreg *,
- struct freebsd_ptrace_reg *);
-void freebsd_to_netbsd_ptrace_regs(struct freebsd_ptrace_reg *,
- struct reg *, struct fpreg *);
-int freebsd_ptrace_getregs(struct freebsd_ptrace_reg *, caddr_t,
- register_t *);
-int freebsd_ptrace_setregs(struct freebsd_ptrace_reg *, caddr_t,
- int);
-
-#endif /* !_FREEBSD_PTRACE_H_ */
diff --git a/sys/compat/freebsd/freebsd_rtprio.h b/sys/compat/freebsd/freebsd_rtprio.h
deleted file mode 100644
index aebfccd9637..00000000000
--- a/sys/compat/freebsd/freebsd_rtprio.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/* $OpenBSD: freebsd_rtprio.h,v 1.3 1996/08/02 20:34:47 niklas Exp $ */
-
-/*
- * Copyright (c) 1994, Henrik Vestergaard Draboel
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by (name).
- * 4. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * from: rtprio.h,v 1.2 1994/10/02 04:45:59 davidg Exp
- */
-
-#ifndef _FREEBSD_RTPRIO_H
-#define _FREEBSD_RTPRIO_H
-
-/*
- * Process realtime-priority specifications to rtprio.
- */
-
-/* priority types */
-#define FREEBSD_RTP_PRIO_REALTIME 0
-#define FREEBSD_RTP_PRIO_NORMAL 1
-#define FREEBSD_RTP_PRIO_IDLE 2
-
-/* priority range */
-#define FREEBSD_RTP_PRIO_MIN 0 /* Highest priority */
-#define FREEBSD_RTP_PRIO_MAX 31 /* Lowest priority */
-
-/*
- * rtprio() syscall functions
- */
-#define FREEBSD_RTP_LOOKUP 0
-#define FREEBSD_RTP_SET 1
-
-#ifndef _LOCORE
-struct freebsd_rtprio {
- u_short type;
- u_short prio;
-};
-#endif
-#endif /* !_FREEBSD_RTPRIO_H */
diff --git a/sys/compat/freebsd/freebsd_signal.c b/sys/compat/freebsd/freebsd_signal.c
deleted file mode 100644
index 41b68581e1b..00000000000
--- a/sys/compat/freebsd/freebsd_signal.c
+++ /dev/null
@@ -1,239 +0,0 @@
-/* $OpenBSD: freebsd_signal.c,v 1.4 2008/05/01 11:53:25 miod Exp $ */
-/* $NetBSD: kern_sig.c,v 1.54 1996/04/22 01:38:32 christos Exp $ */
-
-/*
- * Copyright (c) 1997 Theo de Raadt. All rights reserved.
- * Copyright (c) 1982, 1986, 1989, 1991, 1993
- * The Regents of the University of California. All rights reserved.
- * (c) UNIX System Laboratories, Inc.
- * All or some portions of this file are derived from material licensed
- * to the University of California by American Telephone and Telegraph
- * Co. or Unix System Laboratories, Inc. and are reproduced herein with
- * the permission of UNIX System Laboratories, Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)kern_sig.c 8.7 (Berkeley) 4/18/94
- */
-
-#include <sys/param.h>
-#include <sys/proc.h>
-#include <sys/signalvar.h>
-#include <sys/signal.h>
-#include <sys/systm.h>
-#include <sys/mount.h>
-
-#include <compat/freebsd/freebsd_signal.h>
-#include <compat/freebsd/freebsd_syscallargs.h>
-
-static void freebsd_to_openbsd_sigaction(struct freebsd_sigaction *,
- struct sigaction *);
-
-static void openbsd_to_freebsd_sigaction(struct sigaction *,
- struct freebsd_sigaction *);
-
-static void
-openbsd_to_freebsd_sigaction(obsa, fbsa)
- struct sigaction *obsa;
- struct freebsd_sigaction *fbsa;
-{
- bzero(fbsa, sizeof(struct freebsd_sigaction));
- fbsa->freebsd_sa_handler = obsa->sa_handler;
- bcopy(&obsa->sa_mask, &fbsa->freebsd_sa_mask.__bits[0],
- sizeof(sigset_t));
- fbsa->freebsd_sa_flags = obsa->sa_flags;
-}
-
-static void
-freebsd_to_openbsd_sigaction(fbsa, obsa)
- struct freebsd_sigaction *fbsa;
- struct sigaction *obsa;
-{
- obsa->sa_handler = fbsa->freebsd_sa_handler;
- bcopy(&fbsa->freebsd_sa_mask.__bits[0], &obsa->sa_mask,
- sizeof(sigset_t));
- obsa->sa_flags = fbsa->freebsd_sa_flags;
-}
-
-/* ARGSUSED */
-int
-freebsd_sys_sigaction40(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- register struct freebsd_sys_sigaction40_args /* {
- syscallarg(int) sig;
- syscallarg(struct freebsd_sigaction *) act;
- syscallarg(struct freebsd_sigaction *) oact;
- } */ *uap = v;
- struct sigaction vec;
- register struct sigaction *sa;
- struct freebsd_sigaction fbsa;
- register struct sigacts *ps = p->p_sigacts;
- register int signum;
- int bit, error;
-
- signum = SCARG(uap, sig);
- if (signum <= 0 || signum >= NSIG ||
- (SCARG(uap, act) && (signum == SIGKILL || signum == SIGSTOP)))
- return (EINVAL);
- sa = &vec;
- if (SCARG(uap, oact)) {
- sa->sa_handler = ps->ps_sigact[signum];
- sa->sa_mask = ps->ps_catchmask[signum];
- bit = sigmask(signum);
- sa->sa_flags = 0;
- if ((ps->ps_sigonstack & bit) != 0)
- sa->sa_flags |= SA_ONSTACK;
- if ((ps->ps_sigintr & bit) == 0)
- sa->sa_flags |= SA_RESTART;
- if ((ps->ps_sigreset & bit) != 0)
- sa->sa_flags |= SA_RESETHAND;
- if ((ps->ps_siginfo & bit) != 0)
- sa->sa_flags |= SA_SIGINFO;
- if (signum == SIGCHLD) {
- if ((p->p_flag & P_NOCLDSTOP) != 0)
- sa->sa_flags |= SA_NOCLDSTOP;
- if ((p->p_flag & P_NOCLDWAIT) != 0)
- sa->sa_flags |= SA_NOCLDWAIT;
- }
- if ((sa->sa_mask & bit) == 0)
- sa->sa_flags |= SA_NODEFER;
- sa->sa_mask &= ~bit;
- openbsd_to_freebsd_sigaction(sa, &fbsa);
- error = copyout((caddr_t)&fbsa, (caddr_t)SCARG(uap, oact),
- sizeof (struct freebsd_sigaction));
- if (error)
- return (error);
- }
- if (SCARG(uap, act)) {
- error = copyin((caddr_t)SCARG(uap, act), (caddr_t)&fbsa,
- sizeof (struct freebsd_sigaction));
- if (error)
- return (error);
- freebsd_to_openbsd_sigaction(&fbsa, sa);
- setsigvec(p, signum, sa);
- }
- return (0);
-}
-
-/* ARGSUSED */
-int
-freebsd_sys_sigpending40(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- register struct freebsd_sys_sigpending40_args /* {
- freebsd_sigset_t *set;
- } */ *uap = v;
- freebsd_sigset_t fss;
-
- bcopy(&p->p_siglist, &fss.__bits[0], sizeof(sigset_t));
- return (copyout((caddr_t)&fss, (caddr_t)SCARG(uap, set), sizeof(fss)));
-}
-
-int
-freebsd_sys_sigprocmask40(p, v, retval)
- register struct proc *p;
- void *v;
- register_t *retval;
-{
- struct freebsd_sys_sigprocmask40_args /* {
- syscallarg(int) how;
- syscallarg(freebsd_sigset_t *) set;
- syscallarg(freebsd_sigset_t *) oset;
- } */ *uap = v;
- freebsd_sigset_t nss, oss;
- sigset_t obnss;
- int error = 0;
- int s;
-
- if (SCARG(uap, set)) {
- error = copyin(SCARG(uap, set), &nss, sizeof(nss));
- if (error)
- return (error);
- }
- if (SCARG(uap, oset)) {
- bzero(&oss, sizeof(freebsd_sigset_t));
- bcopy(&p->p_sigmask, &oss.__bits[0], sizeof(sigset_t));
- error = copyout((caddr_t)&oss, (caddr_t)SCARG(uap, oset),
- sizeof(freebsd_sigset_t));
- if (error)
- return (error);
- }
- if (SCARG(uap, set)) {
- bcopy(&nss.__bits[0], &obnss, sizeof(sigset_t));
- s = splhigh();
- switch (SCARG(uap, how)) {
- case SIG_BLOCK:
- p->p_sigmask |= obnss &~ sigcantmask;
- break;
- case SIG_UNBLOCK:
- p->p_sigmask &= ~obnss;
- break;
- case SIG_SETMASK:
- p->p_sigmask = obnss &~ sigcantmask;
- break;
- default:
- error = EINVAL;
- break;
- }
- splx(s);
- }
- return (error);
-}
-
-int
-freebsd_sys_sigsuspend40(p, v, retval)
- register struct proc *p;
- void *v;
- register_t *retval;
-{
- struct freebsd_sys_sigsuspend40_args /* {
- syscallarg(freebsd_sigset_t *) sigmask;
- } */ *uap = v;
- register struct sigacts *ps = p->p_sigacts;
- freebsd_sigset_t fbset;
- sigset_t obset;
-
- copyin(SCARG(uap, sigmask), &fbset, sizeof(freebsd_sigset_t));
- bcopy(&fbset.__bits[0], &obset, sizeof(sigset_t));
- /*
- * When returning from sigpause, we want
- * the old mask to be restored after the
- * signal handler has finished. Thus, we
- * save it here and mark the sigacts structure
- * to indicate this.
- */
- ps->ps_oldmask = p->p_sigmask;
- ps->ps_flags |= SAS_OLDMASK;
- p->p_sigmask = obset &~ sigcantmask;
- while (tsleep((caddr_t) ps, PPAUSE|PCATCH, "pause", 0) == 0)
- /* void */;
- /* always return EINTR rather than ERESTART... */
- return (EINTR);
-}
diff --git a/sys/compat/freebsd/freebsd_signal.h b/sys/compat/freebsd/freebsd_signal.h
deleted file mode 100644
index a3d19cb309e..00000000000
--- a/sys/compat/freebsd/freebsd_signal.h
+++ /dev/null
@@ -1,86 +0,0 @@
-/* $OpenBSD: freebsd_signal.h,v 1.3 2003/06/02 23:28:00 millert Exp $ */
-/* $NetBSD: signal.h,v 1.42 1998/12/21 10:35:00 drochner Exp $ */
-
-/*
- * Copyright (c) 1982, 1986, 1989, 1991, 1993
- * The Regents of the University of California. All rights reserved.
- * (c) UNIX System Laboratories, Inc.
- * All or some portions of this file are derived from material licensed
- * to the University of California by American Telephone and Telegraph
- * Co. or Unix System Laboratories, Inc. and are reproduced herein with
- * the permission of UNIX System Laboratories, Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)signal.h 8.4 (Berkeley) 5/4/95
- */
-
-#ifndef _FREEBSD_SYS_SIGNAL_H_
-#define _FREEBSD_SYS_SIGNAL_H_
-
-typedef struct {
- u_int32_t __bits[4];
-} freebsd_sigset_t;
-
-union freebsd_sigval {
- /* Members as suggested by Annex C of POSIX 1003.1b. */
- int freebsd_sigval_int;
- void *freebsd_sigval_ptr;
-};
-
-typedef struct __freebsd_siginfo {
- int freebsd_si_signo; /* signal number */
- int freebsd_si_errno; /* errno association */
- /*
- * Cause of signal, one of the SI_ macros or signal-specific
- * values, i.e. one of the FPE_... values for SIGFPE. This
- * value is equivalent to the second argument to an old-style
- * FreeBSD signal handler.
- */
- int freebsd_si_code; /* signal code */
- int freebsd_si_pid; /* sending process */
- unsigned int freebsd_si_uid; /* sender's ruid */
- int freebsd_si_status; /* exit value */
- void *freebsd_si_addr; /* faulting instruction */
- union freebsd_sigval freebsd_si_value; /* signal value */
- long freebsd_si_band; /* band event for SIGPOLL */
- int __spare__[7]; /* gimme some slack */
-} freebsd_siginfo_t;
-
-/*
- * Signal vector "template" used in sigaction call.
- */
-struct freebsd_sigaction {
- union {
- void (*__freebsd_sa_handler)(int);
- void (*__freebsd_sa_sigaction)(int, struct __freebsd_siginfo *, void *);
- } __freebsd_sigaction_u; /* signal handler */
- int freebsd_sa_flags; /* see signal options below */
- freebsd_sigset_t freebsd_sa_mask; /* signal mask to apply */
-};
-#define freebsd_sa_handler __freebsd_sigaction_u.__freebsd_sa_handler
-#define freebsd_sa_sigaction __freebsd_sigaction_u.__freebsd_sa_sigaction
-
-#endif /* !_FREEBSD_SYS_SIGNAL_H_ */
diff --git a/sys/compat/freebsd/freebsd_syscall.h b/sys/compat/freebsd/freebsd_syscall.h
deleted file mode 100644
index 79aea448e8e..00000000000
--- a/sys/compat/freebsd/freebsd_syscall.h
+++ /dev/null
@@ -1,630 +0,0 @@
-/* $OpenBSD: freebsd_syscall.h,v 1.37 2010/05/23 11:37:29 deraadt Exp $ */
-
-/*
- * System call numbers.
- *
- * DO NOT EDIT-- this file is automatically generated.
- * created from OpenBSD: syscalls.master,v 1.34 2010/05/23 11:35:18 deraadt Exp
- */
-
-/* syscall: "syscall" ret: "int" args: */
-#define FREEBSD_SYS_syscall 0
-
-/* syscall: "exit" ret: "int" args: "int" */
-#define FREEBSD_SYS_exit 1
-
-/* syscall: "fork" ret: "int" args: */
-#define FREEBSD_SYS_fork 2
-
-/* syscall: "read" ret: "int" args: "int" "char *" "u_int" */
-#define FREEBSD_SYS_read 3
-
-/* syscall: "write" ret: "int" args: "int" "char *" "u_int" */
-#define FREEBSD_SYS_write 4
-
-/* syscall: "open" ret: "int" args: "char *" "int" "int" */
-#define FREEBSD_SYS_open 5
-
-/* syscall: "close" ret: "int" args: "int" */
-#define FREEBSD_SYS_close 6
-
-/* syscall: "wait4" ret: "int" args: "int" "int *" "int" "struct rusage *" */
-#define FREEBSD_SYS_wait4 7
-
-/* syscall: "ocreat" ret: "int" args: "char *" "int" */
-#define FREEBSD_SYS_ocreat 8
-
-/* syscall: "link" ret: "int" args: "char *" "char *" */
-#define FREEBSD_SYS_link 9
-
-/* syscall: "unlink" ret: "int" args: "char *" */
-#define FREEBSD_SYS_unlink 10
-
- /* 11 is obsolete execv */
-/* syscall: "chdir" ret: "int" args: "char *" */
-#define FREEBSD_SYS_chdir 12
-
-/* syscall: "fchdir" ret: "int" args: "int" */
-#define FREEBSD_SYS_fchdir 13
-
-/* syscall: "mknod" ret: "int" args: "char *" "int" "int" */
-#define FREEBSD_SYS_mknod 14
-
-/* syscall: "chmod" ret: "int" args: "char *" "int" */
-#define FREEBSD_SYS_chmod 15
-
-/* syscall: "chown" ret: "int" args: "char *" "int" "int" */
-#define FREEBSD_SYS_chown 16
-
-/* syscall: "break" ret: "int" args: "char *" */
-#define FREEBSD_SYS_break 17
-
-/* syscall: "getfsstat" ret: "int" args: "struct freebsd_statfs *" "long" "int" */
-#define FREEBSD_SYS_getfsstat 18
-
-/* syscall: "olseek" ret: "long" args: "int" "long" "int" */
-#define FREEBSD_SYS_olseek 19
-
-/* syscall: "getpid" ret: "pid_t" args: */
-#define FREEBSD_SYS_getpid 20
-
-/* syscall: "mount" ret: "int" args: "int" "char *" "int" "caddr_t" */
-#define FREEBSD_SYS_mount 21
-
-/* syscall: "unmount" ret: "int" args: "char *" "int" */
-#define FREEBSD_SYS_unmount 22
-
-/* syscall: "setuid" ret: "int" args: "uid_t" */
-#define FREEBSD_SYS_setuid 23
-
-/* syscall: "getuid" ret: "uid_t" args: */
-#define FREEBSD_SYS_getuid 24
-
-/* syscall: "geteuid" ret: "uid_t" args: */
-#define FREEBSD_SYS_geteuid 25
-
-/* syscall: "ptrace" ret: "int" args: "int" "pid_t" "caddr_t" "int" */
-#define FREEBSD_SYS_ptrace 26
-
-/* syscall: "recvmsg" ret: "int" args: "int" "struct msghdr *" "int" */
-#define FREEBSD_SYS_recvmsg 27
-
-/* syscall: "sendmsg" ret: "int" args: "int" "caddr_t" "int" */
-#define FREEBSD_SYS_sendmsg 28
-
-/* syscall: "recvfrom" ret: "int" args: "int" "caddr_t" "size_t" "int" "caddr_t" "int *" */
-#define FREEBSD_SYS_recvfrom 29
-
-/* syscall: "accept" ret: "int" args: "int" "caddr_t" "int *" */
-#define FREEBSD_SYS_accept 30
-
-/* syscall: "getpeername" ret: "int" args: "int" "caddr_t" "int *" */
-#define FREEBSD_SYS_getpeername 31
-
-/* syscall: "getsockname" ret: "int" args: "int" "caddr_t" "int *" */
-#define FREEBSD_SYS_getsockname 32
-
-/* syscall: "access" ret: "int" args: "char *" "int" */
-#define FREEBSD_SYS_access 33
-
-/* syscall: "chflags" ret: "int" args: "char *" "int" */
-#define FREEBSD_SYS_chflags 34
-
-/* syscall: "fchflags" ret: "int" args: "int" "int" */
-#define FREEBSD_SYS_fchflags 35
-
-/* syscall: "sync" ret: "int" args: */
-#define FREEBSD_SYS_sync 36
-
-/* syscall: "kill" ret: "int" args: "int" "int" */
-#define FREEBSD_SYS_kill 37
-
-/* syscall: "stat43" ret: "int" args: "char *" "struct stat43 *" */
-#define FREEBSD_SYS_stat43 38
-
-/* syscall: "getppid" ret: "pid_t" args: */
-#define FREEBSD_SYS_getppid 39
-
-/* syscall: "lstat43" ret: "int" args: "char *" "struct stat43 *" */
-#define FREEBSD_SYS_lstat43 40
-
-/* syscall: "dup" ret: "int" args: "u_int" */
-#define FREEBSD_SYS_dup 41
-
-/* syscall: "opipe" ret: "int" args: */
-#define FREEBSD_SYS_opipe 42
-
-/* syscall: "getegid" ret: "gid_t" args: */
-#define FREEBSD_SYS_getegid 43
-
-/* syscall: "profil" ret: "int" args: "caddr_t" "u_int" "u_int" "u_int" */
-#define FREEBSD_SYS_profil 44
-
-/* syscall: "ktrace" ret: "int" args: "char *" "int" "int" "int" */
-#define FREEBSD_SYS_ktrace 45
-
-/* syscall: "sigaction" ret: "int" args: "int" "struct sigaction *" "struct sigaction *" */
-#define FREEBSD_SYS_sigaction 46
-
-/* syscall: "getgid" ret: "gid_t" args: */
-#define FREEBSD_SYS_getgid 47
-
-/* syscall: "sigprocmask" ret: "int" args: "int" "sigset_t" */
-#define FREEBSD_SYS_sigprocmask 48
-
-/* syscall: "getlogin" ret: "int" args: "char *" "u_int" */
-#define FREEBSD_SYS_getlogin 49
-
-/* syscall: "setlogin" ret: "int" args: "char *" */
-#define FREEBSD_SYS_setlogin 50
-
-/* syscall: "acct" ret: "int" args: "char *" */
-#define FREEBSD_SYS_acct 51
-
-/* syscall: "sigpending" ret: "int" args: */
-#define FREEBSD_SYS_sigpending 52
-
-/* syscall: "sigaltstack" ret: "int" args: "struct sigaltstack *" "struct sigaltstack *" */
-#define FREEBSD_SYS_sigaltstack 53
-
-/* syscall: "ioctl" ret: "int" args: "int" "u_long" "caddr_t" */
-#define FREEBSD_SYS_ioctl 54
-
-/* syscall: "reboot" ret: "int" args: "int" */
-#define FREEBSD_SYS_reboot 55
-
-/* syscall: "revoke" ret: "int" args: "char *" */
-#define FREEBSD_SYS_revoke 56
-
-/* syscall: "symlink" ret: "int" args: "char *" "char *" */
-#define FREEBSD_SYS_symlink 57
-
-/* syscall: "readlink" ret: "int" args: "char *" "char *" "int" */
-#define FREEBSD_SYS_readlink 58
-
-/* syscall: "execve" ret: "int" args: "char *" "char **" "char **" */
-#define FREEBSD_SYS_execve 59
-
-/* syscall: "umask" ret: "int" args: "int" */
-#define FREEBSD_SYS_umask 60
-
-/* syscall: "chroot" ret: "int" args: "char *" */
-#define FREEBSD_SYS_chroot 61
-
-/* syscall: "fstat43" ret: "int" args: "int" "struct stat43 *" */
-#define FREEBSD_SYS_fstat43 62
-
-/* syscall: "ogetkerninfo" ret: "int" args: "int" "char *" "int *" "int" */
-#define FREEBSD_SYS_ogetkerninfo 63
-
-/* syscall: "ogetpagesize" ret: "int" args: */
-#define FREEBSD_SYS_ogetpagesize 64
-
-/* syscall: "msync" ret: "int" args: "void *" "size_t" "int" */
-#define FREEBSD_SYS_msync 65
-
-/* syscall: "vfork" ret: "int" args: */
-#define FREEBSD_SYS_vfork 66
-
- /* 67 is obsolete vread */
- /* 68 is obsolete vwrite */
-/* syscall: "sbrk" ret: "int" args: "int" */
-#define FREEBSD_SYS_sbrk 69
-
-/* syscall: "sstk" ret: "int" args: "int" */
-#define FREEBSD_SYS_sstk 70
-
-/* syscall: "ommap" ret: "int" args: "caddr_t" "size_t" "int" "int" "int" "long" */
-#define FREEBSD_SYS_ommap 71
-
- /* 72 is obsolete vadvise */
-/* syscall: "munmap" ret: "int" args: "caddr_t" "size_t" */
-#define FREEBSD_SYS_munmap 73
-
-/* syscall: "mprotect" ret: "int" args: "caddr_t" "size_t" "int" */
-#define FREEBSD_SYS_mprotect 74
-
-/* syscall: "madvise" ret: "int" args: "caddr_t" "size_t" "int" */
-#define FREEBSD_SYS_madvise 75
-
- /* 76 is obsolete vhangup */
- /* 77 is obsolete vlimit */
-/* syscall: "mincore" ret: "int" args: "caddr_t" "size_t" "char *" */
-#define FREEBSD_SYS_mincore 78
-
-/* syscall: "getgroups" ret: "int" args: "u_int" "gid_t *" */
-#define FREEBSD_SYS_getgroups 79
-
-/* syscall: "setgroups" ret: "int" args: "u_int" "gid_t *" */
-#define FREEBSD_SYS_setgroups 80
-
-/* syscall: "getpgrp" ret: "int" args: */
-#define FREEBSD_SYS_getpgrp 81
-
-/* syscall: "setpgid" ret: "int" args: "int" "int" */
-#define FREEBSD_SYS_setpgid 82
-
-/* syscall: "setitimer" ret: "int" args: "u_int" "struct itimerval *" "struct itimerval *" */
-#define FREEBSD_SYS_setitimer 83
-
-/* syscall: "owait" ret: "int" args: */
-#define FREEBSD_SYS_owait 84
-
-/* syscall: "swapon" ret: "int" args: "char *" */
-#define FREEBSD_SYS_swapon 85
-
-/* syscall: "getitimer" ret: "int" args: "u_int" "struct itimerval *" */
-#define FREEBSD_SYS_getitimer 86
-
-/* syscall: "ogethostname" ret: "int" args: "char *" "u_int" */
-#define FREEBSD_SYS_ogethostname 87
-
-/* syscall: "osethostname" ret: "int" args: "char *" "u_int" */
-#define FREEBSD_SYS_osethostname 88
-
-/* syscall: "ogetdtablesize" ret: "int" args: */
-#define FREEBSD_SYS_ogetdtablesize 89
-
-/* syscall: "dup2" ret: "int" args: "u_int" "u_int" */
-#define FREEBSD_SYS_dup2 90
-
-/* syscall: "fcntl" ret: "int" args: "int" "int" "void *" */
-#define FREEBSD_SYS_fcntl 92
-
-/* syscall: "select" ret: "int" args: "u_int" "fd_set *" "fd_set *" "fd_set *" "struct timeval *" */
-#define FREEBSD_SYS_select 93
-
-/* syscall: "fsync" ret: "int" args: "int" */
-#define FREEBSD_SYS_fsync 95
-
-/* syscall: "setpriority" ret: "int" args: "int" "int" "int" */
-#define FREEBSD_SYS_setpriority 96
-
-/* syscall: "socket" ret: "int" args: "int" "int" "int" */
-#define FREEBSD_SYS_socket 97
-
-/* syscall: "connect" ret: "int" args: "int" "caddr_t" "int" */
-#define FREEBSD_SYS_connect 98
-
-/* syscall: "oaccept" ret: "int" args: "int" "caddr_t" "int *" */
-#define FREEBSD_SYS_oaccept 99
-
-/* syscall: "getpriority" ret: "int" args: "int" "int" */
-#define FREEBSD_SYS_getpriority 100
-
-/* syscall: "osend" ret: "int" args: "int" "caddr_t" "int" "int" */
-#define FREEBSD_SYS_osend 101
-
-/* syscall: "orecv" ret: "int" args: "int" "caddr_t" "int" "int" */
-#define FREEBSD_SYS_orecv 102
-
-/* syscall: "sigreturn" ret: "int" args: "struct freebsd_sigcontext *" */
-#define FREEBSD_SYS_sigreturn 103
-
-/* syscall: "bind" ret: "int" args: "int" "caddr_t" "int" */
-#define FREEBSD_SYS_bind 104
-
-/* syscall: "setsockopt" ret: "int" args: "int" "int" "int" "caddr_t" "int" */
-#define FREEBSD_SYS_setsockopt 105
-
-/* syscall: "listen" ret: "int" args: "int" "int" */
-#define FREEBSD_SYS_listen 106
-
- /* 107 is obsolete vtimes */
-/* syscall: "osigvec" ret: "int" args: "int" "struct sigvec *" "struct sigvec *" */
-#define FREEBSD_SYS_osigvec 108
-
-/* syscall: "osigblock" ret: "int" args: "int" */
-#define FREEBSD_SYS_osigblock 109
-
-/* syscall: "osigsetmask" ret: "int" args: "int" */
-#define FREEBSD_SYS_osigsetmask 110
-
-/* syscall: "sigsuspend" ret: "int" args: "int" */
-#define FREEBSD_SYS_sigsuspend 111
-
-/* syscall: "osigstack" ret: "int" args: "struct sigstack *" "struct sigstack *" */
-#define FREEBSD_SYS_osigstack 112
-
-/* syscall: "orecvmsg" ret: "int" args: "int" "struct omsghdr *" "int" */
-#define FREEBSD_SYS_orecvmsg 113
-
-/* syscall: "osendmsg" ret: "int" args: "int" "caddr_t" "int" */
-#define FREEBSD_SYS_osendmsg 114
-
-/* syscall: "vtrace" ret: "int" args: "int" "int" */
-#define FREEBSD_SYS_vtrace 115
-
- /* 115 is obsolete vtrace */
-/* syscall: "gettimeofday" ret: "int" args: "struct timeval *" "struct timezone *" */
-#define FREEBSD_SYS_gettimeofday 116
-
-/* syscall: "getrusage" ret: "int" args: "int" "struct rusage *" */
-#define FREEBSD_SYS_getrusage 117
-
-/* syscall: "getsockopt" ret: "int" args: "int" "int" "int" "caddr_t" "int *" */
-#define FREEBSD_SYS_getsockopt 118
-
- /* 119 is obsolete resuba */
-/* syscall: "readv" ret: "int" args: "int" "struct iovec *" "u_int" */
-#define FREEBSD_SYS_readv 120
-
-/* syscall: "writev" ret: "int" args: "int" "struct iovec *" "u_int" */
-#define FREEBSD_SYS_writev 121
-
-/* syscall: "settimeofday" ret: "int" args: "struct timeval *" "struct timezone *" */
-#define FREEBSD_SYS_settimeofday 122
-
-/* syscall: "fchown" ret: "int" args: "int" "int" "int" */
-#define FREEBSD_SYS_fchown 123
-
-/* syscall: "fchmod" ret: "int" args: "int" "int" */
-#define FREEBSD_SYS_fchmod 124
-
-/* syscall: "orecvfrom" ret: "int" args: "int" "caddr_t" "size_t" "int" "caddr_t" "int *" */
-#define FREEBSD_SYS_orecvfrom 125
-
-/* syscall: "setreuid" ret: "int" args: "uid_t" "uid_t" */
-#define FREEBSD_SYS_setreuid 126
-
-/* syscall: "setregid" ret: "int" args: "gid_t" "gid_t" */
-#define FREEBSD_SYS_setregid 127
-
-/* syscall: "rename" ret: "int" args: "char *" "char *" */
-#define FREEBSD_SYS_rename 128
-
-/* syscall: "otruncate" ret: "int" args: "char *" "long" */
-#define FREEBSD_SYS_otruncate 129
-
-/* syscall: "oftruncate" ret: "int" args: "int" "long" */
-#define FREEBSD_SYS_oftruncate 130
-
-/* syscall: "flock" ret: "int" args: "int" "int" */
-#define FREEBSD_SYS_flock 131
-
-/* syscall: "mkfifo" ret: "int" args: "char *" "int" */
-#define FREEBSD_SYS_mkfifo 132
-
-/* syscall: "sendto" ret: "int" args: "int" "caddr_t" "size_t" "int" "caddr_t" "int" */
-#define FREEBSD_SYS_sendto 133
-
-/* syscall: "shutdown" ret: "int" args: "int" "int" */
-#define FREEBSD_SYS_shutdown 134
-
-/* syscall: "socketpair" ret: "int" args: "int" "int" "int" "int *" */
-#define FREEBSD_SYS_socketpair 135
-
-/* syscall: "mkdir" ret: "int" args: "char *" "int" */
-#define FREEBSD_SYS_mkdir 136
-
-/* syscall: "rmdir" ret: "int" args: "char *" */
-#define FREEBSD_SYS_rmdir 137
-
-/* syscall: "utimes" ret: "int" args: "char *" "struct timeval *" */
-#define FREEBSD_SYS_utimes 138
-
- /* 139 is obsolete 4.2 sigreturn */
-/* syscall: "adjtime" ret: "int" args: "struct timeval *" "struct timeval *" */
-#define FREEBSD_SYS_adjtime 140
-
-/* syscall: "ogetpeername" ret: "int" args: "int" "caddr_t" "int *" */
-#define FREEBSD_SYS_ogetpeername 141
-
-/* syscall: "ogethostid" ret: "int32_t" args: */
-#define FREEBSD_SYS_ogethostid 142
-
-/* syscall: "osethostid" ret: "int" args: "int32_t" */
-#define FREEBSD_SYS_osethostid 143
-
-/* syscall: "ogetrlimit" ret: "int" args: "u_int" "struct ogetrlimit *" */
-#define FREEBSD_SYS_ogetrlimit 144
-
-/* syscall: "osetrlimit" ret: "int" args: "u_int" "struct ogetrlimit *" */
-#define FREEBSD_SYS_osetrlimit 145
-
-/* syscall: "okillpg" ret: "int" args: "int" "int" */
-#define FREEBSD_SYS_okillpg 146
-
-/* syscall: "setsid" ret: "int" args: */
-#define FREEBSD_SYS_setsid 147
-
-/* syscall: "quotactl" ret: "int" args: "char *" "int" "int" "caddr_t" */
-#define FREEBSD_SYS_quotactl 148
-
-/* syscall: "oquota" ret: "int" args: */
-#define FREEBSD_SYS_oquota 149
-
-/* syscall: "ogetsockname" ret: "int" args: "int" "caddr_t" "int *" */
-#define FREEBSD_SYS_ogetsockname 150
-
-/* syscall: "nfssvc" ret: "int" args: "int" "caddr_t" */
-#define FREEBSD_SYS_nfssvc 155
-
-/* syscall: "ogetdirentries" ret: "int" args: "int" "char *" "u_int" "long *" */
-#define FREEBSD_SYS_ogetdirentries 156
-
-/* syscall: "statfs" ret: "int" args: "char *" "struct freebsd_statfs *" */
-#define FREEBSD_SYS_statfs 157
-
-/* syscall: "fstatfs" ret: "int" args: "int" "struct freebsd_statfs *" */
-#define FREEBSD_SYS_fstatfs 158
-
-/* syscall: "getfh" ret: "int" args: "char *" "fhandle_t *" */
-#define FREEBSD_SYS_getfh 161
-
-/* syscall: "getdomainname" ret: "int" args: "char *" "int" */
-#define FREEBSD_SYS_getdomainname 162
-
-/* syscall: "setdomainname" ret: "int" args: "char *" "int" */
-#define FREEBSD_SYS_setdomainname 163
-
-/* syscall: "uname" ret: "int" args: "struct outsname *" */
-#define FREEBSD_SYS_uname 164
-
-/* syscall: "sysarch" ret: "int" args: "int" "char *" */
-#define FREEBSD_SYS_sysarch 165
-
-/* syscall: "rtprio" ret: "int" args: "int" "pid_t" "struct freebsd_rtprio *" */
-#define FREEBSD_SYS_rtprio 166
-
-/* syscall: "semsys" ret: "int" args: "int" "int" "int" "int" "int" */
-#define FREEBSD_SYS_semsys 169
-
-/* syscall: "msgsys" ret: "int" args: "int" "int" "int" "int" "int" "int" */
-#define FREEBSD_SYS_msgsys 170
-
-/* syscall: "shmsys" ret: "int" args: "int" "int" "int" "int" */
-#define FREEBSD_SYS_shmsys 171
-
-/* syscall: "pread" ret: "ssize_t" args: "int" "void *" "size_t" "int" "off_t" */
-#define FREEBSD_SYS_pread 173
-
-/* syscall: "pwrite" ret: "ssize_t" args: "int" "const void *" "size_t" "int" "off_t" */
-#define FREEBSD_SYS_pwrite 174
-
-/* syscall: "setgid" ret: "int" args: "gid_t" */
-#define FREEBSD_SYS_setgid 181
-
-/* syscall: "setegid" ret: "int" args: "gid_t" */
-#define FREEBSD_SYS_setegid 182
-
-/* syscall: "seteuid" ret: "int" args: "uid_t" */
-#define FREEBSD_SYS_seteuid 183
-
-/* syscall: "stat" ret: "int" args: "char *" "struct stat35 *" */
-#define FREEBSD_SYS_stat 188
-
-/* syscall: "fstat" ret: "int" args: "int" "struct stat35 *" */
-#define FREEBSD_SYS_fstat 189
-
-/* syscall: "lstat" ret: "int" args: "char *" "struct stat35 *" */
-#define FREEBSD_SYS_lstat 190
-
-/* syscall: "pathconf" ret: "int" args: "char *" "int" */
-#define FREEBSD_SYS_pathconf 191
-
-/* syscall: "fpathconf" ret: "int" args: "int" "int" */
-#define FREEBSD_SYS_fpathconf 192
-
-/* syscall: "getrlimit" ret: "int" args: "u_int" "struct rlimit *" */
-#define FREEBSD_SYS_getrlimit 194
-
-/* syscall: "setrlimit" ret: "int" args: "u_int" "struct rlimit *" */
-#define FREEBSD_SYS_setrlimit 195
-
-/* syscall: "getdirentries" ret: "int" args: "int" "char *" "u_int" "long *" */
-#define FREEBSD_SYS_getdirentries 196
-
-/* syscall: "mmap" ret: "caddr_t" args: "caddr_t" "size_t" "int" "int" "int" "long" "off_t" */
-#define FREEBSD_SYS_mmap 197
-
-/* syscall: "__syscall" ret: "int" args: */
-#define FREEBSD_SYS___syscall 198
-
-/* syscall: "lseek" ret: "off_t" args: "int" "int" "off_t" "int" */
-#define FREEBSD_SYS_lseek 199
-
-/* syscall: "truncate" ret: "int" args: "char *" "int" "off_t" */
-#define FREEBSD_SYS_truncate 200
-
-/* syscall: "ftruncate" ret: "int" args: "int" "int" "off_t" */
-#define FREEBSD_SYS_ftruncate 201
-
-/* syscall: "__sysctl" ret: "int" args: "int *" "u_int" "void *" "size_t *" "void *" "size_t" */
-#define FREEBSD_SYS___sysctl 202
-
-/* syscall: "mlock" ret: "int" args: "caddr_t" "size_t" */
-#define FREEBSD_SYS_mlock 203
-
-/* syscall: "munlock" ret: "int" args: "caddr_t" "size_t" */
-#define FREEBSD_SYS_munlock 204
-
-/* syscall: "getpgid" ret: "int" args: "pid_t" */
-#define FREEBSD_SYS_getpgid 207
-
-/* syscall: "poll" ret: "int" args: "struct pollfd *" "unsigned long" "int" */
-#define FREEBSD_SYS_poll 209
-
-/* syscall: "__semctl" ret: "int" args: "int" "int" "int" "union semun *" */
-#define FREEBSD_SYS___semctl 220
-
-/* syscall: "semget" ret: "int" args: "key_t" "int" "int" */
-#define FREEBSD_SYS_semget 221
-
-/* syscall: "semop" ret: "int" args: "int" "struct sembuf *" "u_int" */
-#define FREEBSD_SYS_semop 222
-
- /* 223 is obsolete sys_semconfig */
-/* syscall: "msgctl" ret: "int" args: "int" "int" "struct msqid_ds *" */
-#define FREEBSD_SYS_msgctl 224
-
-/* syscall: "msgget" ret: "int" args: "key_t" "int" */
-#define FREEBSD_SYS_msgget 225
-
-/* syscall: "msgsnd" ret: "int" args: "int" "void *" "size_t" "int" */
-#define FREEBSD_SYS_msgsnd 226
-
-/* syscall: "msgrcv" ret: "int" args: "int" "void *" "size_t" "long" "int" */
-#define FREEBSD_SYS_msgrcv 227
-
-/* syscall: "shmat" ret: "int" args: "int" "void *" "int" */
-#define FREEBSD_SYS_shmat 228
-
-/* syscall: "shmctl" ret: "int" args: "int" "int" "struct shmid_ds *" */
-#define FREEBSD_SYS_shmctl 229
-
-/* syscall: "shmdt" ret: "int" args: "void *" */
-#define FREEBSD_SYS_shmdt 230
-
-/* syscall: "shmget" ret: "int" args: "key_t" "int" "int" */
-#define FREEBSD_SYS_shmget 231
-
-/* syscall: "clock_gettime" ret: "int" args: "clockid_t" "struct timespec *" */
-#define FREEBSD_SYS_clock_gettime 232
-
-/* syscall: "nanosleep" ret: "int" args: "const struct timespec *" "struct timespec *" */
-#define FREEBSD_SYS_nanosleep 240
-
-/* syscall: "minherit" ret: "int" args: "caddr_t" "size_t" "int" */
-#define FREEBSD_SYS_minherit 250
-
-/* syscall: "rfork" ret: "int" args: "int" */
-#define FREEBSD_SYS_rfork 251
-
-/* syscall: "poll2" ret: "int" args: "struct pollfd *" "unsigned long" "int" */
-#define FREEBSD_SYS_poll2 252
-
-/* syscall: "issetugid" ret: "int" args: */
-#define FREEBSD_SYS_issetugid 253
-
-/* syscall: "lchown" ret: "int" args: "char *" "int" "int" */
-#define FREEBSD_SYS_lchown 254
-
-/* syscall: "getdents" ret: "int" args: "int" "void *" "unsigned" */
-#define FREEBSD_SYS_getdents 272
-
-/* syscall: "setresuid" ret: "int" args: "uid_t" "uid_t" "uid_t" */
-#define FREEBSD_SYS_setresuid 311
-
-/* syscall: "setresgid" ret: "int" args: "gid_t" "gid_t" "gid_t" */
-#define FREEBSD_SYS_setresgid 312
-
-/* syscall: "sigprocmask40" ret: "int" args: "int" "const freebsd_sigset_t *" "freebsd_sigset_t *" */
-#define FREEBSD_SYS_sigprocmask40 340
-
-/* syscall: "sigsuspend40" ret: "int" args: "const freebsd_sigset_t *" */
-#define FREEBSD_SYS_sigsuspend40 341
-
-/* syscall: "sigaction40" ret: "int" args: "int" "const struct freebsd_sigaction *" "struct freebsd_sigaction *" */
-#define FREEBSD_SYS_sigaction40 342
-
-/* syscall: "sigpending40" ret: "int" args: "freebsd_sigset_t *" */
-#define FREEBSD_SYS_sigpending40 343
-
-/* syscall: "kqueue" ret: "int" args: */
-#define FREEBSD_SYS_kqueue 362
-
-/* syscall: "kevent" ret: "int" args: "int" "const struct kevent *" "int" "struct kevent *" "int" "const struct timespec *" */
-#define FREEBSD_SYS_kevent 363
-
-#define FREEBSD_SYS_MAXSYSCALL 440
diff --git a/sys/compat/freebsd/freebsd_syscallargs.h b/sys/compat/freebsd/freebsd_syscallargs.h
deleted file mode 100644
index 90cb0e5ed9f..00000000000
--- a/sys/compat/freebsd/freebsd_syscallargs.h
+++ /dev/null
@@ -1,513 +0,0 @@
-/* $OpenBSD: freebsd_syscallargs.h,v 1.39 2010/05/23 11:37:29 deraadt Exp $ */
-
-/*
- * System call argument lists.
- *
- * DO NOT EDIT-- this file is automatically generated.
- * created from OpenBSD: syscalls.master,v 1.34 2010/05/23 11:35:18 deraadt Exp
- */
-
-#ifdef syscallarg
-#undef syscallarg
-#endif
-
-#define syscallarg(x) \
- union { \
- register_t pad; \
- struct { x datum; } le; \
- struct { \
- int8_t pad[ (sizeof (register_t) < sizeof (x)) \
- ? 0 \
- : sizeof (register_t) - sizeof (x)]; \
- x datum; \
- } be; \
- }
-
-struct freebsd_sys_open_args {
- syscallarg(char *) path;
- syscallarg(int) flags;
- syscallarg(int) mode;
-};
-
-struct compat_43_freebsd_sys_creat_args {
- syscallarg(char *) path;
- syscallarg(int) mode;
-};
-
-struct freebsd_sys_link_args {
- syscallarg(char *) path;
- syscallarg(char *) link;
-};
-
-struct freebsd_sys_unlink_args {
- syscallarg(char *) path;
-};
-
-struct freebsd_sys_chdir_args {
- syscallarg(char *) path;
-};
-
-struct freebsd_sys_mknod_args {
- syscallarg(char *) path;
- syscallarg(int) mode;
- syscallarg(int) dev;
-};
-
-struct freebsd_sys_chmod_args {
- syscallarg(char *) path;
- syscallarg(int) mode;
-};
-
-struct freebsd_sys_chown_args {
- syscallarg(char *) path;
- syscallarg(int) uid;
- syscallarg(int) gid;
-};
-
-struct freebsd_sys_getfsstat_args {
- syscallarg(struct freebsd_statfs *) buf;
- syscallarg(long) bufsize;
- syscallarg(int) flags;
-};
-
-struct freebsd_sys_mount_args {
- syscallarg(int) type;
- syscallarg(char *) path;
- syscallarg(int) flags;
- syscallarg(caddr_t) data;
-};
-
-struct freebsd_sys_unmount_args {
- syscallarg(char *) path;
- syscallarg(int) flags;
-};
-
-struct freebsd_sys_ptrace_args {
- syscallarg(int) req;
- syscallarg(pid_t) pid;
- syscallarg(caddr_t) addr;
- syscallarg(int) data;
-};
-
-struct freebsd_sys_access_args {
- syscallarg(char *) path;
- syscallarg(int) flags;
-};
-
-struct freebsd_sys_chflags_args {
- syscallarg(char *) path;
- syscallarg(int) flags;
-};
-
-struct compat_43_freebsd_sys_stat_args {
- syscallarg(char *) path;
- syscallarg(struct stat43 *) ub;
-};
-
-struct compat_43_freebsd_sys_lstat_args {
- syscallarg(char *) path;
- syscallarg(struct stat43 *) ub;
-};
-
-struct freebsd_sys_ioctl_args {
- syscallarg(int) fd;
- syscallarg(u_long) com;
- syscallarg(caddr_t) data;
-};
-
-struct freebsd_sys_revoke_args {
- syscallarg(char *) path;
-};
-
-struct freebsd_sys_symlink_args {
- syscallarg(char *) path;
- syscallarg(char *) link;
-};
-
-struct freebsd_sys_readlink_args {
- syscallarg(char *) path;
- syscallarg(char *) buf;
- syscallarg(int) count;
-};
-
-struct freebsd_sys_execve_args {
- syscallarg(char *) path;
- syscallarg(char **) argp;
- syscallarg(char **) envp;
-};
-
-struct freebsd_sys_chroot_args {
- syscallarg(char *) path;
-};
-
-struct freebsd_sys_madvise_args {
- syscallarg(caddr_t) addr;
- syscallarg(size_t) len;
- syscallarg(int) behav;
-};
-
-struct freebsd_sys_fcntl_args {
- syscallarg(int) fd;
- syscallarg(int) cmd;
- syscallarg(void *) arg;
-};
-
-struct freebsd_sys_sigreturn_args {
- syscallarg(struct freebsd_sigcontext *) scp;
-};
-
-struct freebsd_sys_rename_args {
- syscallarg(char *) from;
- syscallarg(char *) to;
-};
-
-struct compat_43_freebsd_sys_truncate_args {
- syscallarg(char *) path;
- syscallarg(long) length;
-};
-
-struct freebsd_sys_mkfifo_args {
- syscallarg(char *) path;
- syscallarg(int) mode;
-};
-
-struct freebsd_sys_mkdir_args {
- syscallarg(char *) path;
- syscallarg(int) mode;
-};
-
-struct freebsd_sys_rmdir_args {
- syscallarg(char *) path;
-};
-
-struct freebsd_sys_statfs_args {
- syscallarg(char *) path;
- syscallarg(struct freebsd_statfs *) buf;
-};
-
-struct freebsd_sys_fstatfs_args {
- syscallarg(int) fd;
- syscallarg(struct freebsd_statfs *) buf;
-};
-
-struct freebsd_sys_getfh_args {
- syscallarg(char *) fname;
- syscallarg(fhandle_t *) fhp;
-};
-
-struct compat_freebsd_sys_uname_args {
- syscallarg(struct outsname *) name;
-};
-
-struct freebsd_sys_rtprio_args {
- syscallarg(int) function;
- syscallarg(pid_t) pid;
- syscallarg(struct freebsd_rtprio *) rtp;
-};
-
-struct freebsd_sys_stat_args {
- syscallarg(char *) path;
- syscallarg(struct stat35 *) ub;
-};
-
-struct freebsd_sys_lstat_args {
- syscallarg(char *) path;
- syscallarg(struct stat35 *) ub;
-};
-
-struct freebsd_sys_pathconf_args {
- syscallarg(char *) path;
- syscallarg(int) name;
-};
-
-struct freebsd_sys_mmap_args {
- syscallarg(caddr_t) addr;
- syscallarg(size_t) len;
- syscallarg(int) prot;
- syscallarg(int) flags;
- syscallarg(int) fd;
- syscallarg(long) pad;
- syscallarg(off_t) pos;
-};
-
-struct freebsd_sys_truncate_args {
- syscallarg(char *) path;
- syscallarg(int) pad;
- syscallarg(off_t) length;
-};
-
-struct freebsd_sys_poll2_args {
- syscallarg(struct pollfd *) fds;
- syscallarg(unsigned long) nfds;
- syscallarg(int) timeout;
-};
-
-struct freebsd_sys_getdents_args {
- syscallarg(int) fd;
- syscallarg(void *) dirent;
- syscallarg(unsigned) count;
-};
-
-struct freebsd_sys_sigprocmask40_args {
- syscallarg(int) how;
- syscallarg(const freebsd_sigset_t *) set;
- syscallarg(freebsd_sigset_t *) oset;
-};
-
-struct freebsd_sys_sigsuspend40_args {
- syscallarg(const freebsd_sigset_t *) sigmask;
-};
-
-struct freebsd_sys_sigaction40_args {
- syscallarg(int) sig;
- syscallarg(const struct freebsd_sigaction *) act;
- syscallarg(struct freebsd_sigaction *) oact;
-};
-
-struct freebsd_sys_sigpending40_args {
- syscallarg(freebsd_sigset_t *) set;
-};
-
-/*
- * System call prototypes.
- */
-
-int sys_nosys(struct proc *, void *, register_t *);
-int sys_exit(struct proc *, void *, register_t *);
-int sys_fork(struct proc *, void *, register_t *);
-int sys_read(struct proc *, void *, register_t *);
-int sys_write(struct proc *, void *, register_t *);
-int freebsd_sys_open(struct proc *, void *, register_t *);
-int sys_close(struct proc *, void *, register_t *);
-int sys_wait4(struct proc *, void *, register_t *);
-int compat_43_freebsd_sys_creat(struct proc *, void *, register_t *);
-int freebsd_sys_link(struct proc *, void *, register_t *);
-int freebsd_sys_unlink(struct proc *, void *, register_t *);
-int freebsd_sys_chdir(struct proc *, void *, register_t *);
-int sys_fchdir(struct proc *, void *, register_t *);
-int freebsd_sys_mknod(struct proc *, void *, register_t *);
-int freebsd_sys_chmod(struct proc *, void *, register_t *);
-int freebsd_sys_chown(struct proc *, void *, register_t *);
-int sys_obreak(struct proc *, void *, register_t *);
-int freebsd_sys_getfsstat(struct proc *, void *, register_t *);
-int compat_43_sys_lseek(struct proc *, void *, register_t *);
-int sys_getpid(struct proc *, void *, register_t *);
-int freebsd_sys_mount(struct proc *, void *, register_t *);
-int freebsd_sys_unmount(struct proc *, void *, register_t *);
-int sys_setuid(struct proc *, void *, register_t *);
-int sys_getuid(struct proc *, void *, register_t *);
-int sys_geteuid(struct proc *, void *, register_t *);
-#ifdef PTRACE
-int freebsd_sys_ptrace(struct proc *, void *, register_t *);
-#else
-#endif
-int sys_recvmsg(struct proc *, void *, register_t *);
-int sys_sendmsg(struct proc *, void *, register_t *);
-int sys_recvfrom(struct proc *, void *, register_t *);
-int sys_accept(struct proc *, void *, register_t *);
-int sys_getpeername(struct proc *, void *, register_t *);
-int sys_getsockname(struct proc *, void *, register_t *);
-int freebsd_sys_access(struct proc *, void *, register_t *);
-int freebsd_sys_chflags(struct proc *, void *, register_t *);
-int sys_fchflags(struct proc *, void *, register_t *);
-int sys_sync(struct proc *, void *, register_t *);
-int sys_kill(struct proc *, void *, register_t *);
-int compat_43_freebsd_sys_stat(struct proc *, void *, register_t *);
-int sys_getppid(struct proc *, void *, register_t *);
-int compat_43_freebsd_sys_lstat(struct proc *, void *, register_t *);
-int sys_dup(struct proc *, void *, register_t *);
-int sys_opipe(struct proc *, void *, register_t *);
-int sys_getegid(struct proc *, void *, register_t *);
-int sys_profil(struct proc *, void *, register_t *);
-#ifdef KTRACE
-int sys_ktrace(struct proc *, void *, register_t *);
-#else
-#endif
-int sys_sigaction(struct proc *, void *, register_t *);
-int sys_getgid(struct proc *, void *, register_t *);
-int sys_sigprocmask(struct proc *, void *, register_t *);
-int sys_getlogin(struct proc *, void *, register_t *);
-int sys_setlogin(struct proc *, void *, register_t *);
-#ifdef ACCOUNTING
-int sys_acct(struct proc *, void *, register_t *);
-#else
-#endif
-int sys_sigpending(struct proc *, void *, register_t *);
-int sys_sigaltstack(struct proc *, void *, register_t *);
-int freebsd_sys_ioctl(struct proc *, void *, register_t *);
-int sys_reboot(struct proc *, void *, register_t *);
-int freebsd_sys_revoke(struct proc *, void *, register_t *);
-int freebsd_sys_symlink(struct proc *, void *, register_t *);
-int freebsd_sys_readlink(struct proc *, void *, register_t *);
-int freebsd_sys_execve(struct proc *, void *, register_t *);
-int sys_umask(struct proc *, void *, register_t *);
-int freebsd_sys_chroot(struct proc *, void *, register_t *);
-int compat_43_sys_fstat(struct proc *, void *, register_t *);
-int compat_43_sys_getkerninfo(struct proc *, void *, register_t *);
-int compat_43_sys_getpagesize(struct proc *, void *, register_t *);
-int sys_msync(struct proc *, void *, register_t *);
-int sys_vfork(struct proc *, void *, register_t *);
-int sys_sbrk(struct proc *, void *, register_t *);
-int sys_sstk(struct proc *, void *, register_t *);
-int compat_43_sys_mmap(struct proc *, void *, register_t *);
-int sys_munmap(struct proc *, void *, register_t *);
-int sys_mprotect(struct proc *, void *, register_t *);
-int freebsd_sys_madvise(struct proc *, void *, register_t *);
-int sys_mincore(struct proc *, void *, register_t *);
-int sys_getgroups(struct proc *, void *, register_t *);
-int sys_setgroups(struct proc *, void *, register_t *);
-int sys_getpgrp(struct proc *, void *, register_t *);
-int sys_setpgid(struct proc *, void *, register_t *);
-int sys_setitimer(struct proc *, void *, register_t *);
-int compat_43_sys_wait(struct proc *, void *, register_t *);
-int compat_25_sys_swapon(struct proc *, void *, register_t *);
-int sys_getitimer(struct proc *, void *, register_t *);
-int compat_43_sys_gethostname(struct proc *, void *, register_t *);
-int compat_43_sys_sethostname(struct proc *, void *, register_t *);
-int compat_43_sys_getdtablesize(struct proc *, void *, register_t *);
-int sys_dup2(struct proc *, void *, register_t *);
-int freebsd_sys_fcntl(struct proc *, void *, register_t *);
-int sys_select(struct proc *, void *, register_t *);
-int sys_fsync(struct proc *, void *, register_t *);
-int sys_setpriority(struct proc *, void *, register_t *);
-int sys_socket(struct proc *, void *, register_t *);
-int sys_connect(struct proc *, void *, register_t *);
-int compat_43_sys_accept(struct proc *, void *, register_t *);
-int sys_getpriority(struct proc *, void *, register_t *);
-int compat_43_sys_send(struct proc *, void *, register_t *);
-int compat_43_sys_recv(struct proc *, void *, register_t *);
-int freebsd_sys_sigreturn(struct proc *, void *, register_t *);
-int sys_bind(struct proc *, void *, register_t *);
-int sys_setsockopt(struct proc *, void *, register_t *);
-int sys_listen(struct proc *, void *, register_t *);
-int compat_43_sys_sigvec(struct proc *, void *, register_t *);
-int compat_43_sys_sigblock(struct proc *, void *, register_t *);
-int compat_43_sys_sigsetmask(struct proc *, void *, register_t *);
-int sys_sigsuspend(struct proc *, void *, register_t *);
-int compat_43_sys_sigstack(struct proc *, void *, register_t *);
-int compat_43_sys_recvmsg(struct proc *, void *, register_t *);
-int compat_43_sys_sendmsg(struct proc *, void *, register_t *);
-#ifdef TRACE
-int sys_vtrace(struct proc *, void *, register_t *);
-#else
-#endif
-int sys_gettimeofday(struct proc *, void *, register_t *);
-int sys_getrusage(struct proc *, void *, register_t *);
-int sys_getsockopt(struct proc *, void *, register_t *);
-int sys_readv(struct proc *, void *, register_t *);
-int sys_writev(struct proc *, void *, register_t *);
-int sys_settimeofday(struct proc *, void *, register_t *);
-int sys_fchown(struct proc *, void *, register_t *);
-int sys_fchmod(struct proc *, void *, register_t *);
-int compat_43_sys_recvfrom(struct proc *, void *, register_t *);
-int sys_setreuid(struct proc *, void *, register_t *);
-int sys_setregid(struct proc *, void *, register_t *);
-int freebsd_sys_rename(struct proc *, void *, register_t *);
-int compat_43_freebsd_sys_truncate(struct proc *, void *, register_t *);
-int compat_43_sys_ftruncate(struct proc *, void *, register_t *);
-int sys_flock(struct proc *, void *, register_t *);
-int freebsd_sys_mkfifo(struct proc *, void *, register_t *);
-int sys_sendto(struct proc *, void *, register_t *);
-int sys_shutdown(struct proc *, void *, register_t *);
-int sys_socketpair(struct proc *, void *, register_t *);
-int freebsd_sys_mkdir(struct proc *, void *, register_t *);
-int freebsd_sys_rmdir(struct proc *, void *, register_t *);
-int sys_utimes(struct proc *, void *, register_t *);
-int sys_adjtime(struct proc *, void *, register_t *);
-int compat_43_sys_getpeername(struct proc *, void *, register_t *);
-int compat_43_sys_gethostid(struct proc *, void *, register_t *);
-int compat_43_sys_sethostid(struct proc *, void *, register_t *);
-int compat_43_sys_getrlimit(struct proc *, void *, register_t *);
-int compat_43_sys_setrlimit(struct proc *, void *, register_t *);
-int compat_43_sys_killpg(struct proc *, void *, register_t *);
-int sys_setsid(struct proc *, void *, register_t *);
-int sys_quotactl(struct proc *, void *, register_t *);
-int compat_43_sys_quota(struct proc *, void *, register_t *);
-int compat_43_sys_getsockname(struct proc *, void *, register_t *);
-#if defined(NFSCLIENT) || defined(NFSSERVER)
-int sys_nfssvc(struct proc *, void *, register_t *);
-#else
-#endif
-int compat_43_sys_getdirentries(struct proc *, void *, register_t *);
-int freebsd_sys_statfs(struct proc *, void *, register_t *);
-int freebsd_sys_fstatfs(struct proc *, void *, register_t *);
-#ifdef NFSCLIENT
-int freebsd_sys_getfh(struct proc *, void *, register_t *);
-#else
-#endif
-int compat_09_sys_getdomainname(struct proc *, void *, register_t *);
-int compat_09_sys_setdomainname(struct proc *, void *, register_t *);
-int compat_freebsd_sys_uname(struct proc *, void *, register_t *);
-int sys_sysarch(struct proc *, void *, register_t *);
-int freebsd_sys_rtprio(struct proc *, void *, register_t *);
-#if defined(SYSVSEM) && !defined(__alpha__)
-int compat_10_sys_semsys(struct proc *, void *, register_t *);
-#else
-#endif
-#if defined(SYSVMSG) && !defined(__alpha__)
-int compat_10_sys_msgsys(struct proc *, void *, register_t *);
-#else
-#endif
-#if defined(SYSVSHM) && !defined(__alpha__)
-int compat_10_sys_shmsys(struct proc *, void *, register_t *);
-#else
-#endif
-int sys_pread(struct proc *, void *, register_t *);
-int sys_pwrite(struct proc *, void *, register_t *);
-int sys_setgid(struct proc *, void *, register_t *);
-int sys_setegid(struct proc *, void *, register_t *);
-int sys_seteuid(struct proc *, void *, register_t *);
-int freebsd_sys_stat(struct proc *, void *, register_t *);
-int compat_35_sys_fstat(struct proc *, void *, register_t *);
-int freebsd_sys_lstat(struct proc *, void *, register_t *);
-int freebsd_sys_pathconf(struct proc *, void *, register_t *);
-int sys_fpathconf(struct proc *, void *, register_t *);
-int sys_getrlimit(struct proc *, void *, register_t *);
-int sys_setrlimit(struct proc *, void *, register_t *);
-int sys_getdirentries(struct proc *, void *, register_t *);
-int freebsd_sys_mmap(struct proc *, void *, register_t *);
-int sys_nosys(struct proc *, void *, register_t *);
-int sys_lseek(struct proc *, void *, register_t *);
-int freebsd_sys_truncate(struct proc *, void *, register_t *);
-int sys_ftruncate(struct proc *, void *, register_t *);
-int sys___sysctl(struct proc *, void *, register_t *);
-int sys_mlock(struct proc *, void *, register_t *);
-int sys_munlock(struct proc *, void *, register_t *);
-int sys_getpgid(struct proc *, void *, register_t *);
-int sys_poll(struct proc *, void *, register_t *);
-#ifdef SYSVSEM
-int sys___semctl(struct proc *, void *, register_t *);
-int sys_semget(struct proc *, void *, register_t *);
-int sys_semop(struct proc *, void *, register_t *);
-#else
-#endif
-#ifdef SYSVMSG
-int sys_msgctl(struct proc *, void *, register_t *);
-int sys_msgget(struct proc *, void *, register_t *);
-int sys_msgsnd(struct proc *, void *, register_t *);
-int sys_msgrcv(struct proc *, void *, register_t *);
-#else
-#endif
-#ifdef SYSVSHM
-int sys_shmat(struct proc *, void *, register_t *);
-int sys_shmctl(struct proc *, void *, register_t *);
-int sys_shmdt(struct proc *, void *, register_t *);
-int sys_shmget(struct proc *, void *, register_t *);
-#else
-#endif
-int sys_clock_gettime(struct proc *, void *, register_t *);
-int sys_nanosleep(struct proc *, void *, register_t *);
-int sys_minherit(struct proc *, void *, register_t *);
-int sys_rfork(struct proc *, void *, register_t *);
-int freebsd_sys_poll2(struct proc *, void *, register_t *);
-int sys_issetugid(struct proc *, void *, register_t *);
-int sys_lchown(struct proc *, void *, register_t *);
-int freebsd_sys_getdents(struct proc *, void *, register_t *);
-int sys_setresuid(struct proc *, void *, register_t *);
-int sys_setresgid(struct proc *, void *, register_t *);
-int freebsd_sys_sigprocmask40(struct proc *, void *, register_t *);
-int freebsd_sys_sigsuspend40(struct proc *, void *, register_t *);
-int freebsd_sys_sigaction40(struct proc *, void *, register_t *);
-int freebsd_sys_sigpending40(struct proc *, void *, register_t *);
-int sys_kqueue(struct proc *, void *, register_t *);
-int sys_kevent(struct proc *, void *, register_t *);
diff --git a/sys/compat/freebsd/freebsd_syscalls.c b/sys/compat/freebsd/freebsd_syscalls.c
deleted file mode 100644
index e1e309c8edb..00000000000
--- a/sys/compat/freebsd/freebsd_syscalls.c
+++ /dev/null
@@ -1,508 +0,0 @@
-/* $OpenBSD: freebsd_syscalls.c,v 1.37 2010/05/23 11:37:29 deraadt Exp $ */
-
-/*
- * System call names.
- *
- * DO NOT EDIT-- this file is automatically generated.
- * created from OpenBSD: syscalls.master,v 1.34 2010/05/23 11:35:18 deraadt Exp
- */
-
-char *freebsd_syscallnames[] = {
- "syscall", /* 0 = syscall */
- "exit", /* 1 = exit */
- "fork", /* 2 = fork */
- "read", /* 3 = read */
- "write", /* 4 = write */
- "open", /* 5 = open */
- "close", /* 6 = close */
- "wait4", /* 7 = wait4 */
- "ocreat", /* 8 = ocreat */
- "link", /* 9 = link */
- "unlink", /* 10 = unlink */
- "#11 (obsolete execv)", /* 11 = obsolete execv */
- "chdir", /* 12 = chdir */
- "fchdir", /* 13 = fchdir */
- "mknod", /* 14 = mknod */
- "chmod", /* 15 = chmod */
- "chown", /* 16 = chown */
- "break", /* 17 = break */
- "getfsstat", /* 18 = getfsstat */
- "olseek", /* 19 = olseek */
- "getpid", /* 20 = getpid */
- "mount", /* 21 = mount */
- "unmount", /* 22 = unmount */
- "setuid", /* 23 = setuid */
- "getuid", /* 24 = getuid */
- "geteuid", /* 25 = geteuid */
-#ifdef PTRACE
- "ptrace", /* 26 = ptrace */
-#else
- "#26 (unimplemented ptrace)", /* 26 = unimplemented ptrace */
-#endif
- "recvmsg", /* 27 = recvmsg */
- "sendmsg", /* 28 = sendmsg */
- "recvfrom", /* 29 = recvfrom */
- "accept", /* 30 = accept */
- "getpeername", /* 31 = getpeername */
- "getsockname", /* 32 = getsockname */
- "access", /* 33 = access */
- "chflags", /* 34 = chflags */
- "fchflags", /* 35 = fchflags */
- "sync", /* 36 = sync */
- "kill", /* 37 = kill */
- "stat43", /* 38 = stat43 */
- "getppid", /* 39 = getppid */
- "lstat43", /* 40 = lstat43 */
- "dup", /* 41 = dup */
- "opipe", /* 42 = opipe */
- "getegid", /* 43 = getegid */
- "profil", /* 44 = profil */
-#ifdef KTRACE
- "ktrace", /* 45 = ktrace */
-#else
- "#45 (unimplemented ktrace)", /* 45 = unimplemented ktrace */
-#endif
- "sigaction", /* 46 = sigaction */
- "getgid", /* 47 = getgid */
- "sigprocmask", /* 48 = sigprocmask */
- "getlogin", /* 49 = getlogin */
- "setlogin", /* 50 = setlogin */
-#ifdef ACCOUNTING
- "acct", /* 51 = acct */
-#else
- "#51 (unimplemented acct)", /* 51 = unimplemented acct */
-#endif
- "sigpending", /* 52 = sigpending */
- "sigaltstack", /* 53 = sigaltstack */
- "ioctl", /* 54 = ioctl */
- "reboot", /* 55 = reboot */
- "revoke", /* 56 = revoke */
- "symlink", /* 57 = symlink */
- "readlink", /* 58 = readlink */
- "execve", /* 59 = execve */
- "umask", /* 60 = umask */
- "chroot", /* 61 = chroot */
- "fstat43", /* 62 = fstat43 */
- "ogetkerninfo", /* 63 = ogetkerninfo */
- "ogetpagesize", /* 64 = ogetpagesize */
- "msync", /* 65 = msync */
- "vfork", /* 66 = vfork */
- "#67 (obsolete vread)", /* 67 = obsolete vread */
- "#68 (obsolete vwrite)", /* 68 = obsolete vwrite */
- "sbrk", /* 69 = sbrk */
- "sstk", /* 70 = sstk */
- "ommap", /* 71 = ommap */
- "#72 (obsolete vadvise)", /* 72 = obsolete vadvise */
- "munmap", /* 73 = munmap */
- "mprotect", /* 74 = mprotect */
- "madvise", /* 75 = madvise */
- "#76 (obsolete vhangup)", /* 76 = obsolete vhangup */
- "#77 (obsolete vlimit)", /* 77 = obsolete vlimit */
- "mincore", /* 78 = mincore */
- "getgroups", /* 79 = getgroups */
- "setgroups", /* 80 = setgroups */
- "getpgrp", /* 81 = getpgrp */
- "setpgid", /* 82 = setpgid */
- "setitimer", /* 83 = setitimer */
- "owait", /* 84 = owait */
- "swapon", /* 85 = swapon */
- "getitimer", /* 86 = getitimer */
- "ogethostname", /* 87 = ogethostname */
- "osethostname", /* 88 = osethostname */
- "ogetdtablesize", /* 89 = ogetdtablesize */
- "dup2", /* 90 = dup2 */
- "#91 (unimplemented getdopt)", /* 91 = unimplemented getdopt */
- "fcntl", /* 92 = fcntl */
- "select", /* 93 = select */
- "#94 (unimplemented setdopt)", /* 94 = unimplemented setdopt */
- "fsync", /* 95 = fsync */
- "setpriority", /* 96 = setpriority */
- "socket", /* 97 = socket */
- "connect", /* 98 = connect */
- "oaccept", /* 99 = oaccept */
- "getpriority", /* 100 = getpriority */
- "osend", /* 101 = osend */
- "orecv", /* 102 = orecv */
- "sigreturn", /* 103 = sigreturn */
- "bind", /* 104 = bind */
- "setsockopt", /* 105 = setsockopt */
- "listen", /* 106 = listen */
- "#107 (obsolete vtimes)", /* 107 = obsolete vtimes */
- "osigvec", /* 108 = osigvec */
- "osigblock", /* 109 = osigblock */
- "osigsetmask", /* 110 = osigsetmask */
- "sigsuspend", /* 111 = sigsuspend */
- "osigstack", /* 112 = osigstack */
- "orecvmsg", /* 113 = orecvmsg */
- "osendmsg", /* 114 = osendmsg */
-#ifdef TRACE
- "vtrace", /* 115 = vtrace */
-#else
- "#115 (obsolete vtrace)", /* 115 = obsolete vtrace */
-#endif
- "gettimeofday", /* 116 = gettimeofday */
- "getrusage", /* 117 = getrusage */
- "getsockopt", /* 118 = getsockopt */
- "#119 (obsolete resuba)", /* 119 = obsolete resuba */
- "readv", /* 120 = readv */
- "writev", /* 121 = writev */
- "settimeofday", /* 122 = settimeofday */
- "fchown", /* 123 = fchown */
- "fchmod", /* 124 = fchmod */
- "orecvfrom", /* 125 = orecvfrom */
- "setreuid", /* 126 = setreuid */
- "setregid", /* 127 = setregid */
- "rename", /* 128 = rename */
- "otruncate", /* 129 = otruncate */
- "oftruncate", /* 130 = oftruncate */
- "flock", /* 131 = flock */
- "mkfifo", /* 132 = mkfifo */
- "sendto", /* 133 = sendto */
- "shutdown", /* 134 = shutdown */
- "socketpair", /* 135 = socketpair */
- "mkdir", /* 136 = mkdir */
- "rmdir", /* 137 = rmdir */
- "utimes", /* 138 = utimes */
- "#139 (obsolete 4.2 sigreturn)", /* 139 = obsolete 4.2 sigreturn */
- "adjtime", /* 140 = adjtime */
- "ogetpeername", /* 141 = ogetpeername */
- "ogethostid", /* 142 = ogethostid */
- "osethostid", /* 143 = osethostid */
- "ogetrlimit", /* 144 = ogetrlimit */
- "osetrlimit", /* 145 = osetrlimit */
- "okillpg", /* 146 = okillpg */
- "setsid", /* 147 = setsid */
- "quotactl", /* 148 = quotactl */
- "oquota", /* 149 = oquota */
- "ogetsockname", /* 150 = ogetsockname */
- "#151 (unimplemented sem_lock)", /* 151 = unimplemented sem_lock */
- "#152 (unimplemented sem_wakeup)", /* 152 = unimplemented sem_wakeup */
- "#153 (unimplemented asyncdaemon)", /* 153 = unimplemented asyncdaemon */
- "#154 (unimplemented)", /* 154 = unimplemented */
-#if defined(NFSCLIENT) || defined(NFSSERVER)
- "nfssvc", /* 155 = nfssvc */
-#else
- "#155 (unimplemented)", /* 155 = unimplemented */
-#endif
- "ogetdirentries", /* 156 = ogetdirentries */
- "statfs", /* 157 = statfs */
- "fstatfs", /* 158 = fstatfs */
- "#159 (unimplemented)", /* 159 = unimplemented */
- "#160 (unimplemented)", /* 160 = unimplemented */
-#ifdef NFSCLIENT
- "getfh", /* 161 = getfh */
-#else
- "#161 (unimplemented getfh)", /* 161 = unimplemented getfh */
-#endif
- "getdomainname", /* 162 = getdomainname */
- "setdomainname", /* 163 = setdomainname */
- "uname", /* 164 = uname */
- "sysarch", /* 165 = sysarch */
- "rtprio", /* 166 = rtprio */
- "#167 (unimplemented)", /* 167 = unimplemented */
- "#168 (unimplemented)", /* 168 = unimplemented */
-#if defined(SYSVSEM) && !defined(__alpha__)
- "semsys", /* 169 = semsys */
-#else
- "#169 (unimplemented 1.0 semsys)", /* 169 = unimplemented 1.0 semsys */
-#endif
-#if defined(SYSVMSG) && !defined(__alpha__)
- "msgsys", /* 170 = msgsys */
-#else
- "#170 (unimplemented 1.0 msgsys)", /* 170 = unimplemented 1.0 msgsys */
-#endif
-#if defined(SYSVSHM) && !defined(__alpha__)
- "shmsys", /* 171 = shmsys */
-#else
- "#171 (unimplemented 1.0 shmsys)", /* 171 = unimplemented 1.0 shmsys */
-#endif
- "#172 (unimplemented)", /* 172 = unimplemented */
- "pread", /* 173 = pread */
- "pwrite", /* 174 = pwrite */
- "#175 (unimplemented)", /* 175 = unimplemented */
- "#176 (unimplemented ntp_adjtime)", /* 176 = unimplemented ntp_adjtime */
- "#177 (unimplemented sfork)", /* 177 = unimplemented sfork */
- "#178 (unimplemented getdescriptor)", /* 178 = unimplemented getdescriptor */
- "#179 (unimplemented setdescriptor)", /* 179 = unimplemented setdescriptor */
- "#180 (unimplemented)", /* 180 = unimplemented */
- "setgid", /* 181 = setgid */
- "setegid", /* 182 = setegid */
- "seteuid", /* 183 = seteuid */
- "#184 (unimplemented)", /* 184 = unimplemented */
- "#185 (unimplemented)", /* 185 = unimplemented */
- "#186 (unimplemented)", /* 186 = unimplemented */
- "#187 (unimplemented)", /* 187 = unimplemented */
- "stat", /* 188 = stat */
- "fstat", /* 189 = fstat */
- "lstat", /* 190 = lstat */
- "pathconf", /* 191 = pathconf */
- "fpathconf", /* 192 = fpathconf */
- "#193 (unimplemented)", /* 193 = unimplemented */
- "getrlimit", /* 194 = getrlimit */
- "setrlimit", /* 195 = setrlimit */
- "getdirentries", /* 196 = getdirentries */
- "mmap", /* 197 = mmap */
- "__syscall", /* 198 = __syscall */
- "lseek", /* 199 = lseek */
- "truncate", /* 200 = truncate */
- "ftruncate", /* 201 = ftruncate */
- "__sysctl", /* 202 = __sysctl */
- "mlock", /* 203 = mlock */
- "munlock", /* 204 = munlock */
- "#205 (unimplemented sys_undelete)", /* 205 = unimplemented sys_undelete */
- "#206 (unimplemented futimes)", /* 206 = unimplemented futimes */
- "getpgid", /* 207 = getpgid */
- "#208 (unimplemented reboot)", /* 208 = unimplemented reboot */
- "poll", /* 209 = poll */
- "#210 (unimplemented)", /* 210 = unimplemented */
- "#211 (unimplemented)", /* 211 = unimplemented */
- "#212 (unimplemented)", /* 212 = unimplemented */
- "#213 (unimplemented)", /* 213 = unimplemented */
- "#214 (unimplemented)", /* 214 = unimplemented */
- "#215 (unimplemented)", /* 215 = unimplemented */
- "#216 (unimplemented)", /* 216 = unimplemented */
- "#217 (unimplemented)", /* 217 = unimplemented */
- "#218 (unimplemented)", /* 218 = unimplemented */
- "#219 (unimplemented)", /* 219 = unimplemented */
-#ifdef SYSVSEM
- "__semctl", /* 220 = __semctl */
- "semget", /* 221 = semget */
- "semop", /* 222 = semop */
- "#223 (obsolete sys_semconfig)", /* 223 = obsolete sys_semconfig */
-#else
- "#220 (unimplemented sys___semctl)", /* 220 = unimplemented sys___semctl */
- "#221 (unimplemented sys_semget)", /* 221 = unimplemented sys_semget */
- "#222 (unimplemented sys_semop)", /* 222 = unimplemented sys_semop */
- "#223 (unimplemented sys_semconfig)", /* 223 = unimplemented sys_semconfig */
-#endif
-#ifdef SYSVMSG
- "msgctl", /* 224 = msgctl */
- "msgget", /* 225 = msgget */
- "msgsnd", /* 226 = msgsnd */
- "msgrcv", /* 227 = msgrcv */
-#else
- "#224 (unimplemented sys_msgctl)", /* 224 = unimplemented sys_msgctl */
- "#225 (unimplemented sys_msgget)", /* 225 = unimplemented sys_msgget */
- "#226 (unimplemented sys_msgsnd)", /* 226 = unimplemented sys_msgsnd */
- "#227 (unimplemented sys_msgrcv)", /* 227 = unimplemented sys_msgrcv */
-#endif
-#ifdef SYSVSHM
- "shmat", /* 228 = shmat */
- "shmctl", /* 229 = shmctl */
- "shmdt", /* 230 = shmdt */
- "shmget", /* 231 = shmget */
-#else
- "#228 (unimplemented sys_shmat)", /* 228 = unimplemented sys_shmat */
- "#229 (unimplemented sys_shmctl)", /* 229 = unimplemented sys_shmctl */
- "#230 (unimplemented sys_shmdt)", /* 230 = unimplemented sys_shmdt */
- "#231 (unimplemented sys_shmget)", /* 231 = unimplemented sys_shmget */
-#endif
- "clock_gettime", /* 232 = clock_gettime */
- "#233 (unimplemented)", /* 233 = unimplemented */
- "#234 (unimplemented)", /* 234 = unimplemented */
- "#235 (unimplemented timer_create)", /* 235 = unimplemented timer_create */
- "#236 (unimplemented timer_delete)", /* 236 = unimplemented timer_delete */
- "#237 (unimplemented timer_settime)", /* 237 = unimplemented timer_settime */
- "#238 (unimplemented timer_gettime)", /* 238 = unimplemented timer_gettime */
- "#239 (unimplemented timer_getoverrun)", /* 239 = unimplemented timer_getoverrun */
- "nanosleep", /* 240 = nanosleep */
- "#241 (unimplemented)", /* 241 = unimplemented */
- "#242 (unimplemented)", /* 242 = unimplemented */
- "#243 (unimplemented)", /* 243 = unimplemented */
- "#244 (unimplemented)", /* 244 = unimplemented */
- "#245 (unimplemented)", /* 245 = unimplemented */
- "#246 (unimplemented)", /* 246 = unimplemented */
- "#247 (unimplemented)", /* 247 = unimplemented */
- "#248 (unimplemented)", /* 248 = unimplemented */
- "#249 (unimplemented)", /* 249 = unimplemented */
- "minherit", /* 250 = minherit */
- "rfork", /* 251 = rfork */
- "poll2", /* 252 = poll2 */
- "issetugid", /* 253 = issetugid */
- "lchown", /* 254 = lchown */
- "#255 (unimplemented)", /* 255 = unimplemented */
- "#256 (unimplemented)", /* 256 = unimplemented */
- "#257 (unimplemented)", /* 257 = unimplemented */
- "#258 (unimplemented)", /* 258 = unimplemented */
- "#259 (unimplemented)", /* 259 = unimplemented */
- "#260 (unimplemented)", /* 260 = unimplemented */
- "#261 (unimplemented)", /* 261 = unimplemented */
- "#262 (unimplemented)", /* 262 = unimplemented */
- "#263 (unimplemented)", /* 263 = unimplemented */
- "#264 (unimplemented)", /* 264 = unimplemented */
- "#265 (unimplemented)", /* 265 = unimplemented */
- "#266 (unimplemented)", /* 266 = unimplemented */
- "#267 (unimplemented)", /* 267 = unimplemented */
- "#268 (unimplemented)", /* 268 = unimplemented */
- "#269 (unimplemented)", /* 269 = unimplemented */
- "#270 (unimplemented)", /* 270 = unimplemented */
- "#271 (unimplemented)", /* 271 = unimplemented */
- "getdents", /* 272 = getdents */
- "#273 (unimplemented)", /* 273 = unimplemented */
- "#274 (unimplemented lchmod)", /* 274 = unimplemented lchmod */
- "#275 (unimplemented lchown)", /* 275 = unimplemented lchown */
- "#276 (unimplemented lutimes)", /* 276 = unimplemented lutimes */
- "#277 (unimplemented msync)", /* 277 = unimplemented msync */
- "#278 (unimplemented stat)", /* 278 = unimplemented stat */
- "#279 (unimplemented fstat)", /* 279 = unimplemented fstat */
- "#280 (unimplemented lstat)", /* 280 = unimplemented lstat */
- "#281 (unimplemented)", /* 281 = unimplemented */
- "#282 (unimplemented)", /* 282 = unimplemented */
- "#283 (unimplemented)", /* 283 = unimplemented */
- "#284 (unimplemented)", /* 284 = unimplemented */
- "#285 (unimplemented)", /* 285 = unimplemented */
- "#286 (unimplemented)", /* 286 = unimplemented */
- "#287 (unimplemented)", /* 287 = unimplemented */
- "#288 (unimplemented)", /* 288 = unimplemented */
- "#289 (unimplemented)", /* 289 = unimplemented */
- "#290 (unimplemented)", /* 290 = unimplemented */
- "#291 (unimplemented)", /* 291 = unimplemented */
- "#292 (unimplemented)", /* 292 = unimplemented */
- "#293 (unimplemented)", /* 293 = unimplemented */
- "#294 (unimplemented)", /* 294 = unimplemented */
- "#295 (unimplemented)", /* 295 = unimplemented */
- "#296 (unimplemented)", /* 296 = unimplemented */
- "#297 (unimplemented fhstatfs)", /* 297 = unimplemented fhstatfs */
- "#298 (unimplemented fhopen)", /* 298 = unimplemented fhopen */
- "#299 (unimplemented fhstat)", /* 299 = unimplemented fhstat */
- "#300 (unimplemented modnext)", /* 300 = unimplemented modnext */
- "#301 (unimplemented modstat)", /* 301 = unimplemented modstat */
- "#302 (unimplemented modfnext)", /* 302 = unimplemented modfnext */
- "#303 (unimplemented modfind)", /* 303 = unimplemented modfind */
- "#304 (unimplemented kldload)", /* 304 = unimplemented kldload */
- "#305 (unimplemented kldunload)", /* 305 = unimplemented kldunload */
- "#306 (unimplemented kldfind)", /* 306 = unimplemented kldfind */
- "#307 (unimplemented kldnext)", /* 307 = unimplemented kldnext */
- "#308 (unimplemented kldstat)", /* 308 = unimplemented kldstat */
- "#309 (unimplemented kldfirstmod)", /* 309 = unimplemented kldfirstmod */
- "#310 (unimplemented getsid)", /* 310 = unimplemented getsid */
- "setresuid", /* 311 = setresuid */
- "setresgid", /* 312 = setresgid */
- "#313 (unimplemented signanosleep)", /* 313 = unimplemented signanosleep */
- "#314 (unimplemented aio_return)", /* 314 = unimplemented aio_return */
- "#315 (unimplemented aio_suspend)", /* 315 = unimplemented aio_suspend */
- "#316 (unimplemented aio_cancel)", /* 316 = unimplemented aio_cancel */
- "#317 (unimplemented aio_error)", /* 317 = unimplemented aio_error */
- "#318 (unimplemented aio_read)", /* 318 = unimplemented aio_read */
- "#319 (unimplemented aio_write)", /* 319 = unimplemented aio_write */
- "#320 (unimplemented lio_listio)", /* 320 = unimplemented lio_listio */
- "#321 (unimplemented yield)", /* 321 = unimplemented yield */
- "#322 (unimplemented thr_sleep)", /* 322 = unimplemented thr_sleep */
- "#323 (unimplemented thr_wakeup)", /* 323 = unimplemented thr_wakeup */
- "#324 (unimplemented mlockall)", /* 324 = unimplemented mlockall */
- "#325 (unimplemented munlockall)", /* 325 = unimplemented munlockall */
- "#326 (unimplemented __getcwd)", /* 326 = unimplemented __getcwd */
- "#327 (unimplemented sched_setparam)", /* 327 = unimplemented sched_setparam */
- "#328 (unimplemented sched_getparam)", /* 328 = unimplemented sched_getparam */
- "#329 (unimplemented sched_setscheduler)", /* 329 = unimplemented sched_setscheduler */
- "#330 (unimplemented sched_getscheduler)", /* 330 = unimplemented sched_getscheduler */
- "#331 (unimplemented sched_yield)", /* 331 = unimplemented sched_yield */
- "#332 (unimplemented sched_get_priority_max)", /* 332 = unimplemented sched_get_priority_max */
- "#333 (unimplemented sched_get_priority_min)", /* 333 = unimplemented sched_get_priority_min */
- "#334 (unimplemented sched_rr_get_interval)", /* 334 = unimplemented sched_rr_get_interval */
- "#335 (unimplemented utrace)", /* 335 = unimplemented utrace */
- "#336 (unimplemented sendfile)", /* 336 = unimplemented sendfile */
- "#337 (unimplemented kldsym)", /* 337 = unimplemented kldsym */
- "#338 (unimplemented jail)", /* 338 = unimplemented jail */
- "#339 (unimplemented pioctl)", /* 339 = unimplemented pioctl */
- "sigprocmask40", /* 340 = sigprocmask40 */
- "sigsuspend40", /* 341 = sigsuspend40 */
- "sigaction40", /* 342 = sigaction40 */
- "sigpending40", /* 343 = sigpending40 */
- "#344 (unimplemented 4.0 sigreturn)", /* 344 = unimplemented 4.0 sigreturn */
- "#345 (unimplemented sigtimedwait)", /* 345 = unimplemented sigtimedwait */
- "#346 (unimplemented sigwaitinfo)", /* 346 = unimplemented sigwaitinfo */
- "#347 (unimplemented __acl_get_file)", /* 347 = unimplemented __acl_get_file */
- "#348 (unimplemented __acl_set_file)", /* 348 = unimplemented __acl_set_file */
- "#349 (unimplemented __acl_get_fd)", /* 349 = unimplemented __acl_get_fd */
- "#350 (unimplemented __acl_set_fd)", /* 350 = unimplemented __acl_set_fd */
- "#351 (unimplemented __acl_delete_file)", /* 351 = unimplemented __acl_delete_file */
- "#352 (unimplemented __acl_delete_fd)", /* 352 = unimplemented __acl_delete_fd */
- "#353 (unimplemented __acl_aclcheck_file)", /* 353 = unimplemented __acl_aclcheck_file */
- "#354 (unimplemented __acl_aclcheck_fd)", /* 354 = unimplemented __acl_aclcheck_fd */
- "#355 (unimplemented extattrctl)", /* 355 = unimplemented extattrctl */
- "#356 (unimplemented extattr_set_file)", /* 356 = unimplemented extattr_set_file */
- "#357 (unimplemented extattr_get_file)", /* 357 = unimplemented extattr_get_file */
- "#358 (unimplemented extattr_delete_file)", /* 358 = unimplemented extattr_delete_file */
- "#359 (unimplemented aio_waitcomplete)", /* 359 = unimplemented aio_waitcomplete */
- "#360 (unimplemented getresuid)", /* 360 = unimplemented getresuid */
- "#361 (unimplemented getresgid)", /* 361 = unimplemented getresgid */
- "kqueue", /* 362 = kqueue */
- "kevent", /* 363 = kevent */
- "#364 (unimplemented __cap_get_proc)", /* 364 = unimplemented __cap_get_proc */
- "#365 (unimplemented __cap_set_proc)", /* 365 = unimplemented __cap_set_proc */
- "#366 (unimplemented __cap_get_fd)", /* 366 = unimplemented __cap_get_fd */
- "#367 (unimplemented __cap_get_file)", /* 367 = unimplemented __cap_get_file */
- "#368 (unimplemented __cap_set_fd)", /* 368 = unimplemented __cap_set_fd */
- "#369 (unimplemented __cap_set_file)", /* 369 = unimplemented __cap_set_file */
- "#370 (unimplemented lkmressym)", /* 370 = unimplemented lkmressym */
- "#371 (unimplemented extattr_set_fd)", /* 371 = unimplemented extattr_set_fd */
- "#372 (unimplemented extattr_get_fd)", /* 372 = unimplemented extattr_get_fd */
- "#373 (unimplemented extattr_delete_fd)", /* 373 = unimplemented extattr_delete_fd */
- "#374 (unimplemented __setugid)", /* 374 = unimplemented __setugid */
- "#375 (unimplemented nfsclnt)", /* 375 = unimplemented nfsclnt */
- "#376 (unimplemented eaccess)", /* 376 = unimplemented eaccess */
- "#377 (unimplemented afs_syscall)", /* 377 = unimplemented afs_syscall */
- "#378 (unimplemented nmount)", /* 378 = unimplemented nmount */
- "#379 (unimplemented kse_exit)", /* 379 = unimplemented kse_exit */
- "#380 (unimplemented kse_wakeup)", /* 380 = unimplemented kse_wakeup */
- "#381 (unimplemented kse_create)", /* 381 = unimplemented kse_create */
- "#382 (unimplemented kse_thr_interrupt)", /* 382 = unimplemented kse_thr_interrupt */
- "#383 (unimplemented kse_release)", /* 383 = unimplemented kse_release */
- "#384 (unimplemented __mac_get_proc)", /* 384 = unimplemented __mac_get_proc */
- "#385 (unimplemented __mac_set_proc)", /* 385 = unimplemented __mac_set_proc */
- "#386 (unimplemented __mac_get_fd)", /* 386 = unimplemented __mac_get_fd */
- "#387 (unimplemented __mac_get_file)", /* 387 = unimplemented __mac_get_file */
- "#388 (unimplemented __mac_set_fd)", /* 388 = unimplemented __mac_set_fd */
- "#389 (unimplemented __mac_set_file)", /* 389 = unimplemented __mac_set_file */
- "#390 (unimplemented kenv)", /* 390 = unimplemented kenv */
- "#391 (unimplemented lchflags)", /* 391 = unimplemented lchflags */
- "#392 (unimplemented uuidgen)", /* 392 = unimplemented uuidgen */
- "#393 (unimplemented sendfile)", /* 393 = unimplemented sendfile */
- "#394 (unimplemented mac_syscall)", /* 394 = unimplemented mac_syscall */
- "#395 (unimplemented getfsstat)", /* 395 = unimplemented getfsstat */
- "#396 (unimplemented statfs)", /* 396 = unimplemented statfs */
- "#397 (unimplemented fsstatfs)", /* 397 = unimplemented fsstatfs */
- "#398 (unimplemented fhstatfs)", /* 398 = unimplemented fhstatfs */
- "#399 (unimplemented nosys)", /* 399 = unimplemented nosys */
- "#400 (unimplemented ksem_close)", /* 400 = unimplemented ksem_close */
- "#401 (unimplemented ksem_post)", /* 401 = unimplemented ksem_post */
- "#402 (unimplemented ksem_wait)", /* 402 = unimplemented ksem_wait */
- "#403 (unimplemented ksem_trywait)", /* 403 = unimplemented ksem_trywait */
- "#404 (unimplemented ksem_init)", /* 404 = unimplemented ksem_init */
- "#405 (unimplemented ksem_open)", /* 405 = unimplemented ksem_open */
- "#406 (unimplemented ksem_unlink)", /* 406 = unimplemented ksem_unlink */
- "#407 (unimplemented ksem_getvalue)", /* 407 = unimplemented ksem_getvalue */
- "#408 (unimplemented ksem_destroy)", /* 408 = unimplemented ksem_destroy */
- "#409 (unimplemented __mac_get_pid)", /* 409 = unimplemented __mac_get_pid */
- "#410 (unimplemented __mac_get_link)", /* 410 = unimplemented __mac_get_link */
- "#411 (unimplemented __mac_set_link)", /* 411 = unimplemented __mac_set_link */
- "#412 (unimplemented extattr_set_link)", /* 412 = unimplemented extattr_set_link */
- "#413 (unimplemented extattr_get_link)", /* 413 = unimplemented extattr_get_link */
- "#414 (unimplemented extattr_delete_link)", /* 414 = unimplemented extattr_delete_link */
- "#415 (unimplemented __mac_execve)", /* 415 = unimplemented __mac_execve */
- "#416 (unimplemented sigaction)", /* 416 = unimplemented sigaction */
- "#417 (unimplemented sigreturn)", /* 417 = unimplemented sigreturn */
- "#418 (unimplemented __xstat)", /* 418 = unimplemented __xstat */
- "#419 (unimplemented __xfstat)", /* 419 = unimplemented __xfstat */
- "#420 (unimplemented __xlstat)", /* 420 = unimplemented __xlstat */
- "#421 (unimplemented getcontext)", /* 421 = unimplemented getcontext */
- "#422 (unimplemented setcontext)", /* 422 = unimplemented setcontext */
- "#423 (unimplemented swapcontext)", /* 423 = unimplemented swapcontext */
- "#424 (unimplemented swapoff)", /* 424 = unimplemented swapoff */
- "#425 (unimplemented __acl_get_link)", /* 425 = unimplemented __acl_get_link */
- "#426 (unimplemented __acl_set_link)", /* 426 = unimplemented __acl_set_link */
- "#427 (unimplemented __acl_delete_link)", /* 427 = unimplemented __acl_delete_link */
- "#428 (unimplemented __acl_aclcheck_link)", /* 428 = unimplemented __acl_aclcheck_link */
- "#429 (unimplemented sigwait)", /* 429 = unimplemented sigwait */
- "#430 (unimplemented thr_create)", /* 430 = unimplemented thr_create */
- "#431 (unimplemented thr_exit)", /* 431 = unimplemented thr_exit */
- "#432 (unimplemented thr_self)", /* 432 = unimplemented thr_self */
- "#433 (unimplemented thr_kill)", /* 433 = unimplemented thr_kill */
- "#434 (unimplemented _umtx_lock)", /* 434 = unimplemented _umtx_lock */
- "#435 (unimplemented _umtx_unlock)", /* 435 = unimplemented _umtx_unlock */
- "#436 (unimplemented jail_attach)", /* 436 = unimplemented jail_attach */
- "#437 (unimplemented extattr_list_fd)", /* 437 = unimplemented extattr_list_fd */
- "#438 (unimplemented extattr_list_file)", /* 438 = unimplemented extattr_list_file */
- "#439 (unimplemented extattr_list_link)", /* 439 = unimplemented extattr_list_link */
-};
diff --git a/sys/compat/freebsd/freebsd_sysent.c b/sys/compat/freebsd/freebsd_sysent.c
deleted file mode 100644
index 2b41e3409d2..00000000000
--- a/sys/compat/freebsd/freebsd_sysent.c
+++ /dev/null
@@ -1,981 +0,0 @@
-/* $OpenBSD: freebsd_sysent.c,v 1.38 2010/05/23 11:37:29 deraadt Exp $ */
-
-/*
- * System call switch table.
- *
- * DO NOT EDIT-- this file is automatically generated.
- * created from OpenBSD: syscalls.master,v 1.34 2010/05/23 11:35:18 deraadt Exp
- */
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/signal.h>
-#include <sys/mount.h>
-#include <sys/syscallargs.h>
-#include <compat/freebsd/freebsd_signal.h>
-#include <compat/freebsd/freebsd_syscallargs.h>
-#include <machine/freebsd_machdep.h>
-
-#define s(type) sizeof(type)
-
-struct sysent freebsd_sysent[] = {
- { 0, 0, 0,
- sys_nosys }, /* 0 = syscall */
- { 1, s(struct sys_exit_args), 0,
- sys_exit }, /* 1 = exit */
- { 0, 0, 0,
- sys_fork }, /* 2 = fork */
- { 3, s(struct sys_read_args), 0,
- sys_read }, /* 3 = read */
- { 3, s(struct sys_write_args), 0,
- sys_write }, /* 4 = write */
- { 3, s(struct freebsd_sys_open_args), 0,
- freebsd_sys_open }, /* 5 = open */
- { 1, s(struct sys_close_args), 0,
- sys_close }, /* 6 = close */
- { 4, s(struct sys_wait4_args), 0,
- sys_wait4 }, /* 7 = wait4 */
- { 2, s(struct compat_43_freebsd_sys_creat_args), 0,
- compat_43_freebsd_sys_creat }, /* 8 = ocreat */
- { 2, s(struct freebsd_sys_link_args), 0,
- freebsd_sys_link }, /* 9 = link */
- { 1, s(struct freebsd_sys_unlink_args), 0,
- freebsd_sys_unlink }, /* 10 = unlink */
- { 0, 0, 0,
- sys_nosys }, /* 11 = obsolete execv */
- { 1, s(struct freebsd_sys_chdir_args), 0,
- freebsd_sys_chdir }, /* 12 = chdir */
- { 1, s(struct sys_fchdir_args), 0,
- sys_fchdir }, /* 13 = fchdir */
- { 3, s(struct freebsd_sys_mknod_args), 0,
- freebsd_sys_mknod }, /* 14 = mknod */
- { 2, s(struct freebsd_sys_chmod_args), 0,
- freebsd_sys_chmod }, /* 15 = chmod */
- { 3, s(struct freebsd_sys_chown_args), 0,
- freebsd_sys_chown }, /* 16 = chown */
- { 1, s(struct sys_obreak_args), 0,
- sys_obreak }, /* 17 = break */
- { 3, s(struct freebsd_sys_getfsstat_args), 0,
- freebsd_sys_getfsstat }, /* 18 = getfsstat */
- { 3, s(struct compat_43_sys_lseek_args), 0,
- compat_43_sys_lseek }, /* 19 = olseek */
- { 0, 0, 0,
- sys_getpid }, /* 20 = getpid */
- { 4, s(struct freebsd_sys_mount_args), 0,
- freebsd_sys_mount }, /* 21 = mount */
- { 2, s(struct freebsd_sys_unmount_args), 0,
- freebsd_sys_unmount }, /* 22 = unmount */
- { 1, s(struct sys_setuid_args), 0,
- sys_setuid }, /* 23 = setuid */
- { 0, 0, 0,
- sys_getuid }, /* 24 = getuid */
- { 0, 0, 0,
- sys_geteuid }, /* 25 = geteuid */
-#ifdef PTRACE
- { 4, s(struct freebsd_sys_ptrace_args), 0,
- freebsd_sys_ptrace }, /* 26 = ptrace */
-#else
- { 0, 0, 0,
- sys_nosys }, /* 26 = unimplemented ptrace */
-#endif
- { 3, s(struct sys_recvmsg_args), 0,
- sys_recvmsg }, /* 27 = recvmsg */
- { 3, s(struct sys_sendmsg_args), 0,
- sys_sendmsg }, /* 28 = sendmsg */
- { 6, s(struct sys_recvfrom_args), 0,
- sys_recvfrom }, /* 29 = recvfrom */
- { 3, s(struct sys_accept_args), 0,
- sys_accept }, /* 30 = accept */
- { 3, s(struct sys_getpeername_args), 0,
- sys_getpeername }, /* 31 = getpeername */
- { 3, s(struct sys_getsockname_args), 0,
- sys_getsockname }, /* 32 = getsockname */
- { 2, s(struct freebsd_sys_access_args), 0,
- freebsd_sys_access }, /* 33 = access */
- { 2, s(struct freebsd_sys_chflags_args), 0,
- freebsd_sys_chflags }, /* 34 = chflags */
- { 2, s(struct sys_fchflags_args), 0,
- sys_fchflags }, /* 35 = fchflags */
- { 0, 0, 0,
- sys_sync }, /* 36 = sync */
- { 2, s(struct sys_kill_args), 0,
- sys_kill }, /* 37 = kill */
- { 2, s(struct compat_43_freebsd_sys_stat_args), 0,
- compat_43_freebsd_sys_stat }, /* 38 = stat43 */
- { 0, 0, 0,
- sys_getppid }, /* 39 = getppid */
- { 2, s(struct compat_43_freebsd_sys_lstat_args), 0,
- compat_43_freebsd_sys_lstat }, /* 40 = lstat43 */
- { 1, s(struct sys_dup_args), 0,
- sys_dup }, /* 41 = dup */
- { 0, 0, 0,
- sys_opipe }, /* 42 = opipe */
- { 0, 0, 0,
- sys_getegid }, /* 43 = getegid */
- { 4, s(struct sys_profil_args), 0,
- sys_profil }, /* 44 = profil */
-#ifdef KTRACE
- { 4, s(struct sys_ktrace_args), 0,
- sys_ktrace }, /* 45 = ktrace */
-#else
- { 0, 0, 0,
- sys_nosys }, /* 45 = unimplemented ktrace */
-#endif
- { 3, s(struct sys_sigaction_args), 0,
- sys_sigaction }, /* 46 = sigaction */
- { 0, 0, 0,
- sys_getgid }, /* 47 = getgid */
- { 2, s(struct sys_sigprocmask_args), 0,
- sys_sigprocmask }, /* 48 = sigprocmask */
- { 2, s(struct sys_getlogin_args), 0,
- sys_getlogin }, /* 49 = getlogin */
- { 1, s(struct sys_setlogin_args), 0,
- sys_setlogin }, /* 50 = setlogin */
-#ifdef ACCOUNTING
- { 1, s(struct sys_acct_args), 0,
- sys_acct }, /* 51 = acct */
-#else
- { 0, 0, 0,
- sys_nosys }, /* 51 = unimplemented acct */
-#endif
- { 0, 0, 0,
- sys_sigpending }, /* 52 = sigpending */
- { 2, s(struct sys_sigaltstack_args), 0,
- sys_sigaltstack }, /* 53 = sigaltstack */
- { 3, s(struct freebsd_sys_ioctl_args), 0,
- freebsd_sys_ioctl }, /* 54 = ioctl */
- { 1, s(struct sys_reboot_args), 0,
- sys_reboot }, /* 55 = reboot */
- { 1, s(struct freebsd_sys_revoke_args), 0,
- freebsd_sys_revoke }, /* 56 = revoke */
- { 2, s(struct freebsd_sys_symlink_args), 0,
- freebsd_sys_symlink }, /* 57 = symlink */
- { 3, s(struct freebsd_sys_readlink_args), 0,
- freebsd_sys_readlink }, /* 58 = readlink */
- { 3, s(struct freebsd_sys_execve_args), 0,
- freebsd_sys_execve }, /* 59 = execve */
- { 1, s(struct sys_umask_args), 0,
- sys_umask }, /* 60 = umask */
- { 1, s(struct freebsd_sys_chroot_args), 0,
- freebsd_sys_chroot }, /* 61 = chroot */
- { 2, s(struct compat_43_sys_fstat_args), 0,
- compat_43_sys_fstat }, /* 62 = fstat43 */
- { 4, s(struct compat_43_sys_getkerninfo_args), 0,
- compat_43_sys_getkerninfo }, /* 63 = ogetkerninfo */
- { 0, 0, 0,
- compat_43_sys_getpagesize }, /* 64 = ogetpagesize */
- { 3, s(struct sys_msync_args), 0,
- sys_msync }, /* 65 = msync */
- { 0, 0, 0,
- sys_vfork }, /* 66 = vfork */
- { 0, 0, 0,
- sys_nosys }, /* 67 = obsolete vread */
- { 0, 0, 0,
- sys_nosys }, /* 68 = obsolete vwrite */
- { 1, s(struct sys_sbrk_args), 0,
- sys_sbrk }, /* 69 = sbrk */
- { 1, s(struct sys_sstk_args), 0,
- sys_sstk }, /* 70 = sstk */
- { 6, s(struct compat_43_sys_mmap_args), 0,
- compat_43_sys_mmap }, /* 71 = ommap */
- { 0, 0, 0,
- sys_nosys }, /* 72 = obsolete vadvise */
- { 2, s(struct sys_munmap_args), 0,
- sys_munmap }, /* 73 = munmap */
- { 3, s(struct sys_mprotect_args), 0,
- sys_mprotect }, /* 74 = mprotect */
- { 3, s(struct freebsd_sys_madvise_args), 0,
- freebsd_sys_madvise }, /* 75 = madvise */
- { 0, 0, 0,
- sys_nosys }, /* 76 = obsolete vhangup */
- { 0, 0, 0,
- sys_nosys }, /* 77 = obsolete vlimit */
- { 3, s(struct sys_mincore_args), 0,
- sys_mincore }, /* 78 = mincore */
- { 2, s(struct sys_getgroups_args), 0,
- sys_getgroups }, /* 79 = getgroups */
- { 2, s(struct sys_setgroups_args), 0,
- sys_setgroups }, /* 80 = setgroups */
- { 0, 0, 0,
- sys_getpgrp }, /* 81 = getpgrp */
- { 2, s(struct sys_setpgid_args), 0,
- sys_setpgid }, /* 82 = setpgid */
- { 3, s(struct sys_setitimer_args), 0,
- sys_setitimer }, /* 83 = setitimer */
- { 0, 0, 0,
- compat_43_sys_wait }, /* 84 = owait */
- { 1, s(struct compat_25_sys_swapon_args), 0,
- compat_25_sys_swapon }, /* 85 = swapon */
- { 2, s(struct sys_getitimer_args), 0,
- sys_getitimer }, /* 86 = getitimer */
- { 2, s(struct compat_43_sys_gethostname_args), 0,
- compat_43_sys_gethostname }, /* 87 = ogethostname */
- { 2, s(struct compat_43_sys_sethostname_args), 0,
- compat_43_sys_sethostname }, /* 88 = osethostname */
- { 0, 0, 0,
- compat_43_sys_getdtablesize }, /* 89 = ogetdtablesize */
- { 2, s(struct sys_dup2_args), 0,
- sys_dup2 }, /* 90 = dup2 */
- { 0, 0, 0,
- sys_nosys }, /* 91 = unimplemented getdopt */
- { 3, s(struct freebsd_sys_fcntl_args), 0,
- freebsd_sys_fcntl }, /* 92 = fcntl */
- { 5, s(struct sys_select_args), 0,
- sys_select }, /* 93 = select */
- { 0, 0, 0,
- sys_nosys }, /* 94 = unimplemented setdopt */
- { 1, s(struct sys_fsync_args), 0,
- sys_fsync }, /* 95 = fsync */
- { 3, s(struct sys_setpriority_args), 0,
- sys_setpriority }, /* 96 = setpriority */
- { 3, s(struct sys_socket_args), 0,
- sys_socket }, /* 97 = socket */
- { 3, s(struct sys_connect_args), 0,
- sys_connect }, /* 98 = connect */
- { 3, s(struct compat_43_sys_accept_args), 0,
- compat_43_sys_accept }, /* 99 = oaccept */
- { 2, s(struct sys_getpriority_args), 0,
- sys_getpriority }, /* 100 = getpriority */
- { 4, s(struct compat_43_sys_send_args), 0,
- compat_43_sys_send }, /* 101 = osend */
- { 4, s(struct compat_43_sys_recv_args), 0,
- compat_43_sys_recv }, /* 102 = orecv */
- { 1, s(struct freebsd_sys_sigreturn_args), 0,
- freebsd_sys_sigreturn }, /* 103 = sigreturn */
- { 3, s(struct sys_bind_args), 0,
- sys_bind }, /* 104 = bind */
- { 5, s(struct sys_setsockopt_args), 0,
- sys_setsockopt }, /* 105 = setsockopt */
- { 2, s(struct sys_listen_args), 0,
- sys_listen }, /* 106 = listen */
- { 0, 0, 0,
- sys_nosys }, /* 107 = obsolete vtimes */
- { 3, s(struct compat_43_sys_sigvec_args), 0,
- compat_43_sys_sigvec }, /* 108 = osigvec */
- { 1, s(struct compat_43_sys_sigblock_args), 0,
- compat_43_sys_sigblock }, /* 109 = osigblock */
- { 1, s(struct compat_43_sys_sigsetmask_args), 0,
- compat_43_sys_sigsetmask }, /* 110 = osigsetmask */
- { 1, s(struct sys_sigsuspend_args), 0,
- sys_sigsuspend }, /* 111 = sigsuspend */
- { 2, s(struct compat_43_sys_sigstack_args), 0,
- compat_43_sys_sigstack }, /* 112 = osigstack */
- { 3, s(struct compat_43_sys_recvmsg_args), 0,
- compat_43_sys_recvmsg }, /* 113 = orecvmsg */
- { 3, s(struct compat_43_sys_sendmsg_args), 0,
- compat_43_sys_sendmsg }, /* 114 = osendmsg */
-#ifdef TRACE
- { 2, s(struct sys_vtrace_args), 0,
- sys_vtrace }, /* 115 = vtrace */
-#else
- { 0, 0, 0,
- sys_nosys }, /* 115 = obsolete vtrace */
-#endif
- { 2, s(struct sys_gettimeofday_args), 0,
- sys_gettimeofday }, /* 116 = gettimeofday */
- { 2, s(struct sys_getrusage_args), 0,
- sys_getrusage }, /* 117 = getrusage */
- { 5, s(struct sys_getsockopt_args), 0,
- sys_getsockopt }, /* 118 = getsockopt */
- { 0, 0, 0,
- sys_nosys }, /* 119 = obsolete resuba */
- { 3, s(struct sys_readv_args), 0,
- sys_readv }, /* 120 = readv */
- { 3, s(struct sys_writev_args), 0,
- sys_writev }, /* 121 = writev */
- { 2, s(struct sys_settimeofday_args), 0,
- sys_settimeofday }, /* 122 = settimeofday */
- { 3, s(struct sys_fchown_args), 0,
- sys_fchown }, /* 123 = fchown */
- { 2, s(struct sys_fchmod_args), 0,
- sys_fchmod }, /* 124 = fchmod */
- { 6, s(struct compat_43_sys_recvfrom_args), 0,
- compat_43_sys_recvfrom }, /* 125 = orecvfrom */
- { 2, s(struct sys_setreuid_args), 0,
- sys_setreuid }, /* 126 = setreuid */
- { 2, s(struct sys_setregid_args), 0,
- sys_setregid }, /* 127 = setregid */
- { 2, s(struct freebsd_sys_rename_args), 0,
- freebsd_sys_rename }, /* 128 = rename */
- { 2, s(struct compat_43_freebsd_sys_truncate_args), 0,
- compat_43_freebsd_sys_truncate }, /* 129 = otruncate */
- { 2, s(struct compat_43_sys_ftruncate_args), 0,
- compat_43_sys_ftruncate }, /* 130 = oftruncate */
- { 2, s(struct sys_flock_args), 0,
- sys_flock }, /* 131 = flock */
- { 2, s(struct freebsd_sys_mkfifo_args), 0,
- freebsd_sys_mkfifo }, /* 132 = mkfifo */
- { 6, s(struct sys_sendto_args), 0,
- sys_sendto }, /* 133 = sendto */
- { 2, s(struct sys_shutdown_args), 0,
- sys_shutdown }, /* 134 = shutdown */
- { 4, s(struct sys_socketpair_args), 0,
- sys_socketpair }, /* 135 = socketpair */
- { 2, s(struct freebsd_sys_mkdir_args), 0,
- freebsd_sys_mkdir }, /* 136 = mkdir */
- { 1, s(struct freebsd_sys_rmdir_args), 0,
- freebsd_sys_rmdir }, /* 137 = rmdir */
- { 2, s(struct sys_utimes_args), 0,
- sys_utimes }, /* 138 = utimes */
- { 0, 0, 0,
- sys_nosys }, /* 139 = obsolete 4.2 sigreturn */
- { 2, s(struct sys_adjtime_args), 0,
- sys_adjtime }, /* 140 = adjtime */
- { 3, s(struct compat_43_sys_getpeername_args), 0,
- compat_43_sys_getpeername }, /* 141 = ogetpeername */
- { 0, 0, 0,
- compat_43_sys_gethostid }, /* 142 = ogethostid */
- { 1, s(struct compat_43_sys_sethostid_args), 0,
- compat_43_sys_sethostid }, /* 143 = osethostid */
- { 2, s(struct compat_43_sys_getrlimit_args), 0,
- compat_43_sys_getrlimit }, /* 144 = ogetrlimit */
- { 2, s(struct compat_43_sys_setrlimit_args), 0,
- compat_43_sys_setrlimit }, /* 145 = osetrlimit */
- { 2, s(struct compat_43_sys_killpg_args), 0,
- compat_43_sys_killpg }, /* 146 = okillpg */
- { 0, 0, 0,
- sys_setsid }, /* 147 = setsid */
- { 4, s(struct sys_quotactl_args), 0,
- sys_quotactl }, /* 148 = quotactl */
- { 0, 0, 0,
- compat_43_sys_quota }, /* 149 = oquota */
- { 3, s(struct compat_43_sys_getsockname_args), 0,
- compat_43_sys_getsockname }, /* 150 = ogetsockname */
- { 0, 0, 0,
- sys_nosys }, /* 151 = unimplemented sem_lock */
- { 0, 0, 0,
- sys_nosys }, /* 152 = unimplemented sem_wakeup */
- { 0, 0, 0,
- sys_nosys }, /* 153 = unimplemented asyncdaemon */
- { 0, 0, 0,
- sys_nosys }, /* 154 = unimplemented */
-#if defined(NFSCLIENT) || defined(NFSSERVER)
- { 2, s(struct sys_nfssvc_args), 0,
- sys_nfssvc }, /* 155 = nfssvc */
-#else
- { 0, 0, 0,
- sys_nosys }, /* 155 = unimplemented */
-#endif
- { 4, s(struct compat_43_sys_getdirentries_args), 0,
- compat_43_sys_getdirentries }, /* 156 = ogetdirentries */
- { 2, s(struct freebsd_sys_statfs_args), 0,
- freebsd_sys_statfs }, /* 157 = statfs */
- { 2, s(struct freebsd_sys_fstatfs_args), 0,
- freebsd_sys_fstatfs }, /* 158 = fstatfs */
- { 0, 0, 0,
- sys_nosys }, /* 159 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 160 = unimplemented */
-#ifdef NFSCLIENT
- { 2, s(struct freebsd_sys_getfh_args), 0,
- freebsd_sys_getfh }, /* 161 = getfh */
-#else
- { 0, 0, 0,
- sys_nosys }, /* 161 = unimplemented getfh */
-#endif
- { 2, s(struct compat_09_sys_getdomainname_args), 0,
- compat_09_sys_getdomainname }, /* 162 = getdomainname */
- { 2, s(struct compat_09_sys_setdomainname_args), 0,
- compat_09_sys_setdomainname }, /* 163 = setdomainname */
- { 1, s(struct compat_freebsd_sys_uname_args), 0,
- compat_freebsd_sys_uname }, /* 164 = uname */
- { 2, s(struct sys_sysarch_args), 0,
- sys_sysarch }, /* 165 = sysarch */
- { 3, s(struct freebsd_sys_rtprio_args), 0,
- freebsd_sys_rtprio }, /* 166 = rtprio */
- { 0, 0, 0,
- sys_nosys }, /* 167 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 168 = unimplemented */
-#if defined(SYSVSEM) && !defined(__alpha__)
- { 5, s(struct compat_10_sys_semsys_args), 0,
- compat_10_sys_semsys }, /* 169 = semsys */
-#else
- { 0, 0, 0,
- sys_nosys }, /* 169 = unimplemented 1.0 semsys */
-#endif
-#if defined(SYSVMSG) && !defined(__alpha__)
- { 6, s(struct compat_10_sys_msgsys_args), 0,
- compat_10_sys_msgsys }, /* 170 = msgsys */
-#else
- { 0, 0, 0,
- sys_nosys }, /* 170 = unimplemented 1.0 msgsys */
-#endif
-#if defined(SYSVSHM) && !defined(__alpha__)
- { 4, s(struct compat_10_sys_shmsys_args), 0,
- compat_10_sys_shmsys }, /* 171 = shmsys */
-#else
- { 0, 0, 0,
- sys_nosys }, /* 171 = unimplemented 1.0 shmsys */
-#endif
- { 0, 0, 0,
- sys_nosys }, /* 172 = unimplemented */
- { 5, s(struct sys_pread_args), 0,
- sys_pread }, /* 173 = pread */
- { 5, s(struct sys_pwrite_args), 0,
- sys_pwrite }, /* 174 = pwrite */
- { 0, 0, 0,
- sys_nosys }, /* 175 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 176 = unimplemented ntp_adjtime */
- { 0, 0, 0,
- sys_nosys }, /* 177 = unimplemented sfork */
- { 0, 0, 0,
- sys_nosys }, /* 178 = unimplemented getdescriptor */
- { 0, 0, 0,
- sys_nosys }, /* 179 = unimplemented setdescriptor */
- { 0, 0, 0,
- sys_nosys }, /* 180 = unimplemented */
- { 1, s(struct sys_setgid_args), 0,
- sys_setgid }, /* 181 = setgid */
- { 1, s(struct sys_setegid_args), 0,
- sys_setegid }, /* 182 = setegid */
- { 1, s(struct sys_seteuid_args), 0,
- sys_seteuid }, /* 183 = seteuid */
- { 0, 0, 0,
- sys_nosys }, /* 184 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 185 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 186 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 187 = unimplemented */
- { 2, s(struct freebsd_sys_stat_args), 0,
- freebsd_sys_stat }, /* 188 = stat */
- { 2, s(struct compat_35_sys_fstat_args), 0,
- compat_35_sys_fstat }, /* 189 = fstat */
- { 2, s(struct freebsd_sys_lstat_args), 0,
- freebsd_sys_lstat }, /* 190 = lstat */
- { 2, s(struct freebsd_sys_pathconf_args), 0,
- freebsd_sys_pathconf }, /* 191 = pathconf */
- { 2, s(struct sys_fpathconf_args), 0,
- sys_fpathconf }, /* 192 = fpathconf */
- { 0, 0, 0,
- sys_nosys }, /* 193 = unimplemented */
- { 2, s(struct sys_getrlimit_args), 0,
- sys_getrlimit }, /* 194 = getrlimit */
- { 2, s(struct sys_setrlimit_args), 0,
- sys_setrlimit }, /* 195 = setrlimit */
- { 4, s(struct sys_getdirentries_args), 0,
- sys_getdirentries }, /* 196 = getdirentries */
- { 7, s(struct freebsd_sys_mmap_args), 0,
- freebsd_sys_mmap }, /* 197 = mmap */
- { 0, 0, 0,
- sys_nosys }, /* 198 = __syscall */
- { 4, s(struct sys_lseek_args), 0,
- sys_lseek }, /* 199 = lseek */
- { 3, s(struct freebsd_sys_truncate_args), 0,
- freebsd_sys_truncate }, /* 200 = truncate */
- { 3, s(struct sys_ftruncate_args), 0,
- sys_ftruncate }, /* 201 = ftruncate */
- { 6, s(struct sys___sysctl_args), 0,
- sys___sysctl }, /* 202 = __sysctl */
- { 2, s(struct sys_mlock_args), 0,
- sys_mlock }, /* 203 = mlock */
- { 2, s(struct sys_munlock_args), 0,
- sys_munlock }, /* 204 = munlock */
- { 0, 0, 0,
- sys_nosys }, /* 205 = unimplemented sys_undelete */
- { 0, 0, 0,
- sys_nosys }, /* 206 = unimplemented futimes */
- { 1, s(struct sys_getpgid_args), 0,
- sys_getpgid }, /* 207 = getpgid */
- { 0, 0, 0,
- sys_nosys }, /* 208 = unimplemented reboot */
- { 3, s(struct sys_poll_args), 0,
- sys_poll }, /* 209 = poll */
- { 0, 0, 0,
- sys_nosys }, /* 210 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 211 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 212 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 213 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 214 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 215 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 216 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 217 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 218 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 219 = unimplemented */
-#ifdef SYSVSEM
- { 4, s(struct sys___semctl_args), 0,
- sys___semctl }, /* 220 = __semctl */
- { 3, s(struct sys_semget_args), 0,
- sys_semget }, /* 221 = semget */
- { 3, s(struct sys_semop_args), 0,
- sys_semop }, /* 222 = semop */
- { 0, 0, 0,
- sys_nosys }, /* 223 = obsolete sys_semconfig */
-#else
- { 0, 0, 0,
- sys_nosys }, /* 220 = unimplemented sys___semctl */
- { 0, 0, 0,
- sys_nosys }, /* 221 = unimplemented sys_semget */
- { 0, 0, 0,
- sys_nosys }, /* 222 = unimplemented sys_semop */
- { 0, 0, 0,
- sys_nosys }, /* 223 = unimplemented sys_semconfig */
-#endif
-#ifdef SYSVMSG
- { 3, s(struct sys_msgctl_args), 0,
- sys_msgctl }, /* 224 = msgctl */
- { 2, s(struct sys_msgget_args), 0,
- sys_msgget }, /* 225 = msgget */
- { 4, s(struct sys_msgsnd_args), 0,
- sys_msgsnd }, /* 226 = msgsnd */
- { 5, s(struct sys_msgrcv_args), 0,
- sys_msgrcv }, /* 227 = msgrcv */
-#else
- { 0, 0, 0,
- sys_nosys }, /* 224 = unimplemented sys_msgctl */
- { 0, 0, 0,
- sys_nosys }, /* 225 = unimplemented sys_msgget */
- { 0, 0, 0,
- sys_nosys }, /* 226 = unimplemented sys_msgsnd */
- { 0, 0, 0,
- sys_nosys }, /* 227 = unimplemented sys_msgrcv */
-#endif
-#ifdef SYSVSHM
- { 3, s(struct sys_shmat_args), 0,
- sys_shmat }, /* 228 = shmat */
- { 3, s(struct sys_shmctl_args), 0,
- sys_shmctl }, /* 229 = shmctl */
- { 1, s(struct sys_shmdt_args), 0,
- sys_shmdt }, /* 230 = shmdt */
- { 3, s(struct sys_shmget_args), 0,
- sys_shmget }, /* 231 = shmget */
-#else
- { 0, 0, 0,
- sys_nosys }, /* 228 = unimplemented sys_shmat */
- { 0, 0, 0,
- sys_nosys }, /* 229 = unimplemented sys_shmctl */
- { 0, 0, 0,
- sys_nosys }, /* 230 = unimplemented sys_shmdt */
- { 0, 0, 0,
- sys_nosys }, /* 231 = unimplemented sys_shmget */
-#endif
- { 2, s(struct sys_clock_gettime_args), 0,
- sys_clock_gettime }, /* 232 = clock_gettime */
- { 0, 0, 0,
- sys_nosys }, /* 233 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 234 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 235 = unimplemented timer_create */
- { 0, 0, 0,
- sys_nosys }, /* 236 = unimplemented timer_delete */
- { 0, 0, 0,
- sys_nosys }, /* 237 = unimplemented timer_settime */
- { 0, 0, 0,
- sys_nosys }, /* 238 = unimplemented timer_gettime */
- { 0, 0, 0,
- sys_nosys }, /* 239 = unimplemented timer_getoverrun */
- { 2, s(struct sys_nanosleep_args), 0,
- sys_nanosleep }, /* 240 = nanosleep */
- { 0, 0, 0,
- sys_nosys }, /* 241 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 242 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 243 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 244 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 245 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 246 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 247 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 248 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 249 = unimplemented */
- { 3, s(struct sys_minherit_args), 0,
- sys_minherit }, /* 250 = minherit */
- { 1, s(struct sys_rfork_args), 0,
- sys_rfork }, /* 251 = rfork */
- { 3, s(struct freebsd_sys_poll2_args), 0,
- freebsd_sys_poll2 }, /* 252 = poll2 */
- { 0, 0, 0,
- sys_issetugid }, /* 253 = issetugid */
- { 3, s(struct sys_lchown_args), 0,
- sys_lchown }, /* 254 = lchown */
- { 0, 0, 0,
- sys_nosys }, /* 255 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 256 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 257 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 258 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 259 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 260 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 261 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 262 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 263 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 264 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 265 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 266 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 267 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 268 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 269 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 270 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 271 = unimplemented */
- { 3, s(struct freebsd_sys_getdents_args), 0,
- freebsd_sys_getdents }, /* 272 = getdents */
- { 0, 0, 0,
- sys_nosys }, /* 273 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 274 = unimplemented lchmod */
- { 0, 0, 0,
- sys_nosys }, /* 275 = unimplemented lchown */
- { 0, 0, 0,
- sys_nosys }, /* 276 = unimplemented lutimes */
- { 0, 0, 0,
- sys_nosys }, /* 277 = unimplemented msync */
- { 0, 0, 0,
- sys_nosys }, /* 278 = unimplemented stat */
- { 0, 0, 0,
- sys_nosys }, /* 279 = unimplemented fstat */
- { 0, 0, 0,
- sys_nosys }, /* 280 = unimplemented lstat */
- { 0, 0, 0,
- sys_nosys }, /* 281 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 282 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 283 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 284 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 285 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 286 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 287 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 288 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 289 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 290 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 291 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 292 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 293 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 294 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 295 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 296 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 297 = unimplemented fhstatfs */
- { 0, 0, 0,
- sys_nosys }, /* 298 = unimplemented fhopen */
- { 0, 0, 0,
- sys_nosys }, /* 299 = unimplemented fhstat */
- { 0, 0, 0,
- sys_nosys }, /* 300 = unimplemented modnext */
- { 0, 0, 0,
- sys_nosys }, /* 301 = unimplemented modstat */
- { 0, 0, 0,
- sys_nosys }, /* 302 = unimplemented modfnext */
- { 0, 0, 0,
- sys_nosys }, /* 303 = unimplemented modfind */
- { 0, 0, 0,
- sys_nosys }, /* 304 = unimplemented kldload */
- { 0, 0, 0,
- sys_nosys }, /* 305 = unimplemented kldunload */
- { 0, 0, 0,
- sys_nosys }, /* 306 = unimplemented kldfind */
- { 0, 0, 0,
- sys_nosys }, /* 307 = unimplemented kldnext */
- { 0, 0, 0,
- sys_nosys }, /* 308 = unimplemented kldstat */
- { 0, 0, 0,
- sys_nosys }, /* 309 = unimplemented kldfirstmod */
- { 0, 0, 0,
- sys_nosys }, /* 310 = unimplemented getsid */
- { 3, s(struct sys_setresuid_args), 0,
- sys_setresuid }, /* 311 = setresuid */
- { 3, s(struct sys_setresgid_args), 0,
- sys_setresgid }, /* 312 = setresgid */
- { 0, 0, 0,
- sys_nosys }, /* 313 = unimplemented signanosleep */
- { 0, 0, 0,
- sys_nosys }, /* 314 = unimplemented aio_return */
- { 0, 0, 0,
- sys_nosys }, /* 315 = unimplemented aio_suspend */
- { 0, 0, 0,
- sys_nosys }, /* 316 = unimplemented aio_cancel */
- { 0, 0, 0,
- sys_nosys }, /* 317 = unimplemented aio_error */
- { 0, 0, 0,
- sys_nosys }, /* 318 = unimplemented aio_read */
- { 0, 0, 0,
- sys_nosys }, /* 319 = unimplemented aio_write */
- { 0, 0, 0,
- sys_nosys }, /* 320 = unimplemented lio_listio */
- { 0, 0, 0,
- sys_nosys }, /* 321 = unimplemented yield */
- { 0, 0, 0,
- sys_nosys }, /* 322 = unimplemented thr_sleep */
- { 0, 0, 0,
- sys_nosys }, /* 323 = unimplemented thr_wakeup */
- { 0, 0, 0,
- sys_nosys }, /* 324 = unimplemented mlockall */
- { 0, 0, 0,
- sys_nosys }, /* 325 = unimplemented munlockall */
- { 0, 0, 0,
- sys_nosys }, /* 326 = unimplemented __getcwd */
- { 0, 0, 0,
- sys_nosys }, /* 327 = unimplemented sched_setparam */
- { 0, 0, 0,
- sys_nosys }, /* 328 = unimplemented sched_getparam */
- { 0, 0, 0,
- sys_nosys }, /* 329 = unimplemented sched_setscheduler */
- { 0, 0, 0,
- sys_nosys }, /* 330 = unimplemented sched_getscheduler */
- { 0, 0, 0,
- sys_nosys }, /* 331 = unimplemented sched_yield */
- { 0, 0, 0,
- sys_nosys }, /* 332 = unimplemented sched_get_priority_max */
- { 0, 0, 0,
- sys_nosys }, /* 333 = unimplemented sched_get_priority_min */
- { 0, 0, 0,
- sys_nosys }, /* 334 = unimplemented sched_rr_get_interval */
- { 0, 0, 0,
- sys_nosys }, /* 335 = unimplemented utrace */
- { 0, 0, 0,
- sys_nosys }, /* 336 = unimplemented sendfile */
- { 0, 0, 0,
- sys_nosys }, /* 337 = unimplemented kldsym */
- { 0, 0, 0,
- sys_nosys }, /* 338 = unimplemented jail */
- { 0, 0, 0,
- sys_nosys }, /* 339 = unimplemented pioctl */
- { 3, s(struct freebsd_sys_sigprocmask40_args), 0,
- freebsd_sys_sigprocmask40 }, /* 340 = sigprocmask40 */
- { 1, s(struct freebsd_sys_sigsuspend40_args), 0,
- freebsd_sys_sigsuspend40 }, /* 341 = sigsuspend40 */
- { 3, s(struct freebsd_sys_sigaction40_args), 0,
- freebsd_sys_sigaction40 }, /* 342 = sigaction40 */
- { 1, s(struct freebsd_sys_sigpending40_args), 0,
- freebsd_sys_sigpending40 }, /* 343 = sigpending40 */
- { 0, 0, 0,
- sys_nosys }, /* 344 = unimplemented 4.0 sigreturn */
- { 0, 0, 0,
- sys_nosys }, /* 345 = unimplemented sigtimedwait */
- { 0, 0, 0,
- sys_nosys }, /* 346 = unimplemented sigwaitinfo */
- { 0, 0, 0,
- sys_nosys }, /* 347 = unimplemented __acl_get_file */
- { 0, 0, 0,
- sys_nosys }, /* 348 = unimplemented __acl_set_file */
- { 0, 0, 0,
- sys_nosys }, /* 349 = unimplemented __acl_get_fd */
- { 0, 0, 0,
- sys_nosys }, /* 350 = unimplemented __acl_set_fd */
- { 0, 0, 0,
- sys_nosys }, /* 351 = unimplemented __acl_delete_file */
- { 0, 0, 0,
- sys_nosys }, /* 352 = unimplemented __acl_delete_fd */
- { 0, 0, 0,
- sys_nosys }, /* 353 = unimplemented __acl_aclcheck_file */
- { 0, 0, 0,
- sys_nosys }, /* 354 = unimplemented __acl_aclcheck_fd */
- { 0, 0, 0,
- sys_nosys }, /* 355 = unimplemented extattrctl */
- { 0, 0, 0,
- sys_nosys }, /* 356 = unimplemented extattr_set_file */
- { 0, 0, 0,
- sys_nosys }, /* 357 = unimplemented extattr_get_file */
- { 0, 0, 0,
- sys_nosys }, /* 358 = unimplemented extattr_delete_file */
- { 0, 0, 0,
- sys_nosys }, /* 359 = unimplemented aio_waitcomplete */
- { 0, 0, 0,
- sys_nosys }, /* 360 = unimplemented getresuid */
- { 0, 0, 0,
- sys_nosys }, /* 361 = unimplemented getresgid */
- { 0, 0, 0,
- sys_kqueue }, /* 362 = kqueue */
- { 6, s(struct sys_kevent_args), 0,
- sys_kevent }, /* 363 = kevent */
- { 0, 0, 0,
- sys_nosys }, /* 364 = unimplemented __cap_get_proc */
- { 0, 0, 0,
- sys_nosys }, /* 365 = unimplemented __cap_set_proc */
- { 0, 0, 0,
- sys_nosys }, /* 366 = unimplemented __cap_get_fd */
- { 0, 0, 0,
- sys_nosys }, /* 367 = unimplemented __cap_get_file */
- { 0, 0, 0,
- sys_nosys }, /* 368 = unimplemented __cap_set_fd */
- { 0, 0, 0,
- sys_nosys }, /* 369 = unimplemented __cap_set_file */
- { 0, 0, 0,
- sys_nosys }, /* 370 = unimplemented lkmressym */
- { 0, 0, 0,
- sys_nosys }, /* 371 = unimplemented extattr_set_fd */
- { 0, 0, 0,
- sys_nosys }, /* 372 = unimplemented extattr_get_fd */
- { 0, 0, 0,
- sys_nosys }, /* 373 = unimplemented extattr_delete_fd */
- { 0, 0, 0,
- sys_nosys }, /* 374 = unimplemented __setugid */
- { 0, 0, 0,
- sys_nosys }, /* 375 = unimplemented nfsclnt */
- { 0, 0, 0,
- sys_nosys }, /* 376 = unimplemented eaccess */
- { 0, 0, 0,
- sys_nosys }, /* 377 = unimplemented afs_syscall */
- { 0, 0, 0,
- sys_nosys }, /* 378 = unimplemented nmount */
- { 0, 0, 0,
- sys_nosys }, /* 379 = unimplemented kse_exit */
- { 0, 0, 0,
- sys_nosys }, /* 380 = unimplemented kse_wakeup */
- { 0, 0, 0,
- sys_nosys }, /* 381 = unimplemented kse_create */
- { 0, 0, 0,
- sys_nosys }, /* 382 = unimplemented kse_thr_interrupt */
- { 0, 0, 0,
- sys_nosys }, /* 383 = unimplemented kse_release */
- { 0, 0, 0,
- sys_nosys }, /* 384 = unimplemented __mac_get_proc */
- { 0, 0, 0,
- sys_nosys }, /* 385 = unimplemented __mac_set_proc */
- { 0, 0, 0,
- sys_nosys }, /* 386 = unimplemented __mac_get_fd */
- { 0, 0, 0,
- sys_nosys }, /* 387 = unimplemented __mac_get_file */
- { 0, 0, 0,
- sys_nosys }, /* 388 = unimplemented __mac_set_fd */
- { 0, 0, 0,
- sys_nosys }, /* 389 = unimplemented __mac_set_file */
- { 0, 0, 0,
- sys_nosys }, /* 390 = unimplemented kenv */
- { 0, 0, 0,
- sys_nosys }, /* 391 = unimplemented lchflags */
- { 0, 0, 0,
- sys_nosys }, /* 392 = unimplemented uuidgen */
- { 0, 0, 0,
- sys_nosys }, /* 393 = unimplemented sendfile */
- { 0, 0, 0,
- sys_nosys }, /* 394 = unimplemented mac_syscall */
- { 0, 0, 0,
- sys_nosys }, /* 395 = unimplemented getfsstat */
- { 0, 0, 0,
- sys_nosys }, /* 396 = unimplemented statfs */
- { 0, 0, 0,
- sys_nosys }, /* 397 = unimplemented fsstatfs */
- { 0, 0, 0,
- sys_nosys }, /* 398 = unimplemented fhstatfs */
- { 0, 0, 0,
- sys_nosys }, /* 399 = unimplemented nosys */
- { 0, 0, 0,
- sys_nosys }, /* 400 = unimplemented ksem_close */
- { 0, 0, 0,
- sys_nosys }, /* 401 = unimplemented ksem_post */
- { 0, 0, 0,
- sys_nosys }, /* 402 = unimplemented ksem_wait */
- { 0, 0, 0,
- sys_nosys }, /* 403 = unimplemented ksem_trywait */
- { 0, 0, 0,
- sys_nosys }, /* 404 = unimplemented ksem_init */
- { 0, 0, 0,
- sys_nosys }, /* 405 = unimplemented ksem_open */
- { 0, 0, 0,
- sys_nosys }, /* 406 = unimplemented ksem_unlink */
- { 0, 0, 0,
- sys_nosys }, /* 407 = unimplemented ksem_getvalue */
- { 0, 0, 0,
- sys_nosys }, /* 408 = unimplemented ksem_destroy */
- { 0, 0, 0,
- sys_nosys }, /* 409 = unimplemented __mac_get_pid */
- { 0, 0, 0,
- sys_nosys }, /* 410 = unimplemented __mac_get_link */
- { 0, 0, 0,
- sys_nosys }, /* 411 = unimplemented __mac_set_link */
- { 0, 0, 0,
- sys_nosys }, /* 412 = unimplemented extattr_set_link */
- { 0, 0, 0,
- sys_nosys }, /* 413 = unimplemented extattr_get_link */
- { 0, 0, 0,
- sys_nosys }, /* 414 = unimplemented extattr_delete_link */
- { 0, 0, 0,
- sys_nosys }, /* 415 = unimplemented __mac_execve */
- { 0, 0, 0,
- sys_nosys }, /* 416 = unimplemented sigaction */
- { 0, 0, 0,
- sys_nosys }, /* 417 = unimplemented sigreturn */
- { 0, 0, 0,
- sys_nosys }, /* 418 = unimplemented __xstat */
- { 0, 0, 0,
- sys_nosys }, /* 419 = unimplemented __xfstat */
- { 0, 0, 0,
- sys_nosys }, /* 420 = unimplemented __xlstat */
- { 0, 0, 0,
- sys_nosys }, /* 421 = unimplemented getcontext */
- { 0, 0, 0,
- sys_nosys }, /* 422 = unimplemented setcontext */
- { 0, 0, 0,
- sys_nosys }, /* 423 = unimplemented swapcontext */
- { 0, 0, 0,
- sys_nosys }, /* 424 = unimplemented swapoff */
- { 0, 0, 0,
- sys_nosys }, /* 425 = unimplemented __acl_get_link */
- { 0, 0, 0,
- sys_nosys }, /* 426 = unimplemented __acl_set_link */
- { 0, 0, 0,
- sys_nosys }, /* 427 = unimplemented __acl_delete_link */
- { 0, 0, 0,
- sys_nosys }, /* 428 = unimplemented __acl_aclcheck_link */
- { 0, 0, 0,
- sys_nosys }, /* 429 = unimplemented sigwait */
- { 0, 0, 0,
- sys_nosys }, /* 430 = unimplemented thr_create */
- { 0, 0, 0,
- sys_nosys }, /* 431 = unimplemented thr_exit */
- { 0, 0, 0,
- sys_nosys }, /* 432 = unimplemented thr_self */
- { 0, 0, 0,
- sys_nosys }, /* 433 = unimplemented thr_kill */
- { 0, 0, 0,
- sys_nosys }, /* 434 = unimplemented _umtx_lock */
- { 0, 0, 0,
- sys_nosys }, /* 435 = unimplemented _umtx_unlock */
- { 0, 0, 0,
- sys_nosys }, /* 436 = unimplemented jail_attach */
- { 0, 0, 0,
- sys_nosys }, /* 437 = unimplemented extattr_list_fd */
- { 0, 0, 0,
- sys_nosys }, /* 438 = unimplemented extattr_list_file */
- { 0, 0, 0,
- sys_nosys }, /* 439 = unimplemented extattr_list_link */
-};
-
diff --git a/sys/compat/freebsd/freebsd_util.h b/sys/compat/freebsd/freebsd_util.h
deleted file mode 100644
index 25cc767595a..00000000000
--- a/sys/compat/freebsd/freebsd_util.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/* $OpenBSD: freebsd_util.h,v 1.2 1996/08/02 20:34:50 niklas Exp $ */
-/* $NetBSD: freebsd_util.h,v 1.1 1995/10/10 01:19:38 mycroft Exp $ */
-
-/*
- * Copyright (c) 1994 Christos Zoulas
- * Copyright (c) 1995 Frank van der Linden
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * from: svr4_util.h,v 1.5 1994/11/18 02:54:31 christos Exp
- * from: linux_util.h,v 1.3 1995/04/07 22:23:27 fvdl Exp
- */
-
-/*
- * This file is pretty much the same as Christos' svr4_util.h
- * This file is pretty much the same as Fvdl's linux_util.h
- * (for now).
- */
-
-#ifndef _FREEBSD_UTIL_H_
-#define _FREEBSD_UTIL_H_
-
-#include <compat/common/compat_util.h>
-
-extern const char freebsd_emul_path[];
-
-#define FREEBSD_CHECK_ALT_EXIST(p, sgp, path) \
- CHECK_ALT_EXIST(p, sgp, freebsd_emul_path, path)
-
-#define FREEBSD_CHECK_ALT_CREAT(p, sgp, path) \
- CHECK_ALT_CREAT(p, sgp, freebsd_emul_path, path)
-
-#endif /* !_FREEBSD_UTIL_H_ */
diff --git a/sys/compat/freebsd/syscalls.conf b/sys/compat/freebsd/syscalls.conf
deleted file mode 100644
index db6c44cda96..00000000000
--- a/sys/compat/freebsd/syscalls.conf
+++ /dev/null
@@ -1,13 +0,0 @@
-# $OpenBSD: syscalls.conf,v 1.2 1996/08/02 20:34:51 niklas Exp $
-# $NetBSD: syscalls.conf,v 1.2 1995/10/10 01:20:55 mycroft Exp $
-
-sysnames="freebsd_syscalls.c"
-sysnumhdr="freebsd_syscall.h"
-syssw="freebsd_sysent.c"
-sysarghdr="freebsd_syscallargs.h"
-compatopts=""
-libcompatopts=""
-
-switchname="freebsd_sysent"
-namesname="freebsd_syscallnames"
-constprefix="FREEBSD_SYS_"
diff --git a/sys/compat/freebsd/syscalls.master b/sys/compat/freebsd/syscalls.master
deleted file mode 100644
index 80982e62ef0..00000000000
--- a/sys/compat/freebsd/syscalls.master
+++ /dev/null
@@ -1,662 +0,0 @@
- $OpenBSD: syscalls.master,v 1.34 2010/05/23 11:35:18 deraadt Exp $
-; $NetBSD: syscalls.master,v 1.3 1995/10/10 18:28:40 mycroft Exp $
-
-; from: @(#)syscalls.master 8.2 (Berkeley) 1/13/94
-
-; NetBSD COMPAT_FREEBSD system call name/number "master" file.
-; (See syscalls.conf to see what it is processed into.)
-;
-; Fields: number type [type-dependent ...]
-; number system call number, must be in order
-; type one of STD, OBSOL, UNIMPL, NODEF, NOARGS, or one of
-; the compatibility options defined in syscalls.conf.
-;
-; types:
-; STD always included
-; OBSOL obsolete, not included in system
-; UNIMPL unimplemented, not included in system
-; NODEF included, but don't define the syscall number
-; NOARGS included, but don't define the syscall args structure
-;
-; The compat options are defined in the syscalls.conf file, and the
-; compat option name is prefixed to the syscall name. Other than
-; that, they're like NODEF (for 'compat' options), or STD (for
-; 'libcompat' options).
-;
-; The type-dependent arguments are as follows:
-; For STD, NODEF, NOARGS, and compat syscalls:
-; { pseudo-proto } [alias]
-; For other syscalls:
-; [comment]
-;
-; #ifdef's, etc. may be included, and are copied to the output files.
-; #include's are copied to the syscall switch definition file only.
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/signal.h>
-#include <sys/mount.h>
-#include <sys/syscallargs.h>
-
-#include <compat/freebsd/freebsd_signal.h>
-#include <compat/freebsd/freebsd_syscallargs.h>
-
-#include <machine/freebsd_machdep.h>
-
-; Reserved/unimplemented system calls in the range 0-150 inclusive
-; are reserved for use in future Berkeley releases.
-; Additional system calls implemented in vendor and other
-; redistributions should be placed in the reserved range at the end
-; of the current calls.
-
-0 NOARGS { int sys_nosys(void); } syscall
-1 NOARGS { int sys_exit(int rval); }
-2 NOARGS { int sys_fork(void); }
-3 NOARGS { int sys_read(int fd, char *buf, u_int nbyte); }
-4 NOARGS { int sys_write(int fd, char *buf, u_int nbyte); }
-5 STD { int freebsd_sys_open(char *path, int flags, \
- int mode); }
-6 NOARGS { int sys_close(int fd); }
-7 NOARGS { int sys_wait4(int pid, int *status, int options, \
- struct rusage *rusage); }
-8 STD { int compat_43_freebsd_sys_creat(char *path, \
- int mode); } ocreat
-9 STD { int freebsd_sys_link(char *path, char *link); }
-10 STD { int freebsd_sys_unlink(char *path); }
-11 OBSOL execv
-12 STD { int freebsd_sys_chdir(char *path); }
-13 NOARGS { int sys_fchdir(int fd); }
-14 STD { int freebsd_sys_mknod(char *path, int mode, \
- int dev); }
-15 STD { int freebsd_sys_chmod(char *path, int mode); }
-16 STD { int freebsd_sys_chown(char *path, int uid, int gid); }
-17 NOARGS { int sys_obreak(char *nsize); } break
-18 STD { int freebsd_sys_getfsstat(struct freebsd_statfs *buf,\
- long bufsize, int flags); }
-19 NOARGS { long compat_43_sys_lseek(int fd, long offset, \
- int whence); } olseek
-20 NOARGS { pid_t sys_getpid(void); }
-21 STD { int freebsd_sys_mount(int type, char *path, \
- int flags, caddr_t data); }
-22 STD { int freebsd_sys_unmount(char *path, int flags); }
-23 NOARGS { int sys_setuid(uid_t uid); }
-24 NOARGS { uid_t sys_getuid(void); }
-25 NOARGS { uid_t sys_geteuid(void); }
-#ifdef PTRACE
-26 STD { int freebsd_sys_ptrace(int req, pid_t pid, \
- caddr_t addr, int data); }
-#else
-26 UNIMPL ptrace
-#endif
-27 NOARGS { int sys_recvmsg(int s, struct msghdr *msg, \
- int flags); }
-28 NOARGS { int sys_sendmsg(int s, caddr_t msg, int flags); }
-29 NOARGS { int sys_recvfrom(int s, caddr_t buf, size_t len, \
- int flags, caddr_t from, int *fromlenaddr); }
-30 NOARGS { int sys_accept(int s, caddr_t name, int *anamelen); }
-31 NOARGS { int sys_getpeername(int fdes, caddr_t asa, \
- int *alen); }
-32 NOARGS { int sys_getsockname(int fdes, caddr_t asa, \
- int *alen); }
-33 STD { int freebsd_sys_access(char *path, int flags); }
-34 STD { int freebsd_sys_chflags(char *path, int flags); }
-35 NOARGS { int sys_fchflags(int fd, int flags); }
-36 NOARGS { int sys_sync(void); }
-37 NOARGS { int sys_kill(int pid, int signum); }
-38 STD { int compat_43_freebsd_sys_stat(char *path, \
- struct stat43 *ub); } stat43
-39 NOARGS { pid_t sys_getppid(void); }
-40 STD { int compat_43_freebsd_sys_lstat(char *path, \
- struct stat43 *ub); } lstat43
-41 NOARGS { int sys_dup(u_int fd); }
-42 NOARGS { int sys_opipe(void); }
-43 NOARGS { gid_t sys_getegid(void); }
-44 NOARGS { int sys_profil(caddr_t samples, u_int size, \
- u_int offset, u_int scale); }
-#ifdef KTRACE
-45 NOARGS { int sys_ktrace(char *fname, int ops, int facs, \
- int pid); }
-#else
-45 UNIMPL ktrace
-#endif
-46 NOARGS { int sys_sigaction(int signum, struct sigaction *nsa, \
- struct sigaction *osa); }
-47 NOARGS { gid_t sys_getgid(void); }
-48 NOARGS { int sys_sigprocmask(int how, sigset_t mask); }
-49 NOARGS { int sys_getlogin(char *namebuf, u_int namelen); }
-50 NOARGS { int sys_setlogin(char *namebuf); }
-#ifdef ACCOUNTING
-51 NOARGS { int sys_acct(char *path); }
-#else
-51 UNIMPL acct
-#endif
-52 NOARGS { int sys_sigpending(void); }
-53 NOARGS { int sys_sigaltstack(struct sigaltstack *nss, \
- struct sigaltstack *oss); }
-54 STD { int freebsd_sys_ioctl(int fd, u_long com, \
- caddr_t data); }
-55 NOARGS { int sys_reboot(int opt); }
-56 STD { int freebsd_sys_revoke(char *path); }
-57 STD { int freebsd_sys_symlink(char *path, char *link); }
-58 STD { int freebsd_sys_readlink(char *path, char *buf, \
- int count); }
-59 STD { int freebsd_sys_execve(char *path, char **argp, \
- char **envp); }
-60 NOARGS { int sys_umask(int newmask); }
-61 STD { int freebsd_sys_chroot(char *path); }
-62 NOARGS { int compat_43_sys_fstat(int fd, struct stat43 *sb); } \
- fstat43
-63 NOARGS { int compat_43_sys_getkerninfo(int op, char *where, \
- int *size, int arg); } ogetkerninfo
-64 NOARGS { int compat_43_sys_getpagesize(void); } ogetpagesize
-65 NOARGS { int sys_msync(void *addr, size_t len, \
- int flags); }
-66 NOARGS { int sys_vfork(void); }
-67 OBSOL vread
-68 OBSOL vwrite
-69 NOARGS { int sys_sbrk(int incr); }
-70 NOARGS { int sys_sstk(int incr); }
-71 NOARGS { int compat_43_sys_mmap(caddr_t addr, size_t len, \
- int prot, int flags, int fd, long pos); } ommap
-72 OBSOL vadvise
-73 NOARGS { int sys_munmap(caddr_t addr, size_t len); }
-74 NOARGS { int sys_mprotect(caddr_t addr, size_t len, \
- int prot); }
-75 STD { int freebsd_sys_madvise(caddr_t addr, size_t len, \
- int behav); }
-76 OBSOL vhangup
-77 OBSOL vlimit
-78 NOARGS { int sys_mincore(caddr_t addr, size_t len, char *vec); }
-79 NOARGS { int sys_getgroups(u_int gidsetsize, gid_t *gidset); }
-80 NOARGS { int sys_setgroups(u_int gidsetsize, gid_t *gidset); }
-81 NOARGS { int sys_getpgrp(void); }
-82 NOARGS { int sys_setpgid(int pid, int pgid); }
-83 NOARGS { int sys_setitimer(u_int which, \
- struct itimerval *itv, struct itimerval *oitv); }
-84 NOARGS { int compat_43_sys_wait(void); } owait
-85 NOARGS { int compat_25_sys_swapon(char *name); }
-86 NOARGS { int sys_getitimer(u_int which, \
- struct itimerval *itv); }
-87 NOARGS { int compat_43_sys_gethostname(char *hostname, \
- u_int len); } ogethostname
-88 NOARGS { int compat_43_sys_sethostname(char *hostname, \
- u_int len); } osethostname
-89 NOARGS { int compat_43_sys_getdtablesize(void); } \
- ogetdtablesize
-90 NOARGS { int sys_dup2(u_int from, u_int to); }
-91 UNIMPL getdopt
-92 STD { int freebsd_sys_fcntl(int fd, int cmd, void *arg); }
-93 NOARGS { int sys_select(u_int nd, fd_set *in, fd_set *ou, \
- fd_set *ex, struct timeval *tv); }
-94 UNIMPL setdopt
-95 NOARGS { int sys_fsync(int fd); }
-96 NOARGS { int sys_setpriority(int which, int who, int prio); }
-97 NOARGS { int sys_socket(int domain, int type, int protocol); }
-98 NOARGS { int sys_connect(int s, caddr_t name, int namelen); }
-99 NOARGS { int compat_43_sys_accept(int s, caddr_t name, \
- int *anamelen); } oaccept
-100 NOARGS { int sys_getpriority(int which, int who); }
-101 NOARGS { int compat_43_sys_send(int s, caddr_t buf, int len, \
- int flags); } osend
-102 NOARGS { int compat_43_sys_recv(int s, caddr_t buf, int len, \
- int flags); } orecv
-103 STD { int freebsd_sys_sigreturn( \
- struct freebsd_sigcontext *scp); }
-104 NOARGS { int sys_bind(int s, caddr_t name, int namelen); }
-105 NOARGS { int sys_setsockopt(int s, int level, int name, \
- caddr_t val, int valsize); }
-106 NOARGS { int sys_listen(int s, int backlog); }
-107 OBSOL vtimes
-108 NOARGS { int compat_43_sys_sigvec(int signum, \
- struct sigvec *nsv, struct sigvec *osv); } osigvec
-109 NOARGS { int compat_43_sys_sigblock(int mask); } osigblock
-110 NOARGS { int compat_43_sys_sigsetmask(int mask); } osigsetmask
-111 NOARGS { int sys_sigsuspend(int mask); }
-112 NOARGS { int compat_43_sys_sigstack(struct sigstack *nss, \
- struct sigstack *oss); } osigstack
-113 NOARGS { int compat_43_sys_recvmsg(int s, \
- struct omsghdr *msg, int flags); } orecvmsg
-114 NOARGS { int compat_43_sys_sendmsg(int s, caddr_t msg, \
- int flags); } osendmsg
-#ifdef TRACE
-115 NOARGS { int sys_vtrace(int request, int value); }
-#else
-115 OBSOL vtrace
-#endif
-116 NOARGS { int sys_gettimeofday(struct timeval *tp, \
- struct timezone *tzp); }
-117 NOARGS { int sys_getrusage(int who, struct rusage *rusage); }
-118 NOARGS { int sys_getsockopt(int s, int level, int name, \
- caddr_t val, int *avalsize); }
-119 OBSOL resuba
-120 NOARGS { int sys_readv(int fd, struct iovec *iovp, \
- u_int iovcnt); }
-121 NOARGS { int sys_writev(int fd, struct iovec *iovp, \
- u_int iovcnt); }
-122 NOARGS { int sys_settimeofday(struct timeval *tv, \
- struct timezone *tzp); }
-123 NOARGS { int sys_fchown(int fd, int uid, int gid); }
-124 NOARGS { int sys_fchmod(int fd, int mode); }
-125 NOARGS { int compat_43_sys_recvfrom(int s, caddr_t buf, \
- size_t len, int flags, caddr_t from, \
- int *fromlenaddr); } orecvfrom
-126 NOARGS { int sys_setreuid(uid_t ruid, uid_t euid); }
-127 NOARGS { int sys_setregid(gid_t rgid, gid_t egid); }
-128 STD { int freebsd_sys_rename(char *from, char *to); }
-129 STD { int compat_43_freebsd_sys_truncate(char *path, \
- long length); } otruncate
-130 NOARGS { int compat_43_sys_ftruncate(int fd, long length); } \
- oftruncate
-131 NOARGS { int sys_flock(int fd, int how); }
-132 STD { int freebsd_sys_mkfifo(char *path, int mode); }
-133 NOARGS { int sys_sendto(int s, caddr_t buf, size_t len, \
- int flags, caddr_t to, int tolen); }
-134 NOARGS { int sys_shutdown(int s, int how); }
-135 NOARGS { int sys_socketpair(int domain, int type, \
- int protocol, int *rsv); }
-136 STD { int freebsd_sys_mkdir(char *path, int mode); }
-137 STD { int freebsd_sys_rmdir(char *path); }
-138 NOARGS { int sys_utimes(char *path, struct timeval *tptr); }
-139 OBSOL 4.2 sigreturn
-140 NOARGS { int sys_adjtime(struct timeval *delta, \
- struct timeval *olddelta); }
-141 NOARGS { int compat_43_sys_getpeername(int fdes, caddr_t asa, \
- int *alen); } ogetpeername
-142 NOARGS { int32_t compat_43_sys_gethostid(void); } ogethostid
-143 NOARGS { int compat_43_sys_sethostid(int32_t hostid); } \
- osethostid
-144 NOARGS { int compat_43_sys_getrlimit(u_int which, \
- struct ogetrlimit *rlp); } ogetrlimit
-145 NOARGS { int compat_43_sys_setrlimit(u_int which, \
- struct ogetrlimit *rlp); } osetrlimit
-146 NOARGS { int compat_43_sys_killpg(int pgid, int signum); } \
- okillpg
-147 NOARGS { int sys_setsid(void); }
-148 NOARGS { int sys_quotactl(char *path, int cmd, int uid, \
- caddr_t arg); }
-149 NOARGS { int compat_43_sys_quota(void); } oquota
-150 NOARGS { int compat_43_sys_getsockname(int fdec, caddr_t asa, \
- int *alen); } ogetsockname
-
-; Syscalls 151-180 inclusive are reserved for vendor-specific
-; system calls. (This includes various calls added for compatibity
-; with other Unix variants.)
-; Some of these calls are now supported by BSD...
-151 UNIMPL sem_lock
-152 UNIMPL sem_wakeup
-153 UNIMPL asyncdaemon
-154 UNIMPL
-#if defined(NFSCLIENT) || defined(NFSSERVER)
-155 NOARGS { int sys_nfssvc(int flag, caddr_t argp); }
-#else
-155 UNIMPL
-#endif
-156 NOARGS { int compat_43_sys_getdirentries(int fd, char *buf, \
- u_int count, long *basep); } ogetdirentries
-157 STD { int freebsd_sys_statfs(char *path, \
- struct freebsd_statfs *buf); }
-158 STD { int freebsd_sys_fstatfs(int fd, \
- struct freebsd_statfs *buf); }
-159 UNIMPL
-160 UNIMPL
-#ifdef NFSCLIENT
-161 STD { int freebsd_sys_getfh(char *fname, fhandle_t *fhp); }
-#else
-161 UNIMPL getfh
-#endif
-162 NOARGS { int compat_09_sys_getdomainname(char *domainname, \
- int len); }
-163 NOARGS { int compat_09_sys_setdomainname(char *domainname, \
- int len); }
-164 STD { int compat_freebsd_sys_uname(struct outsname *name); }
-165 NOARGS { int sys_sysarch(int op, char *parms); }
-166 STD { int freebsd_sys_rtprio(int function, pid_t pid, \
- struct freebsd_rtprio *rtp); }
-167 UNIMPL
-168 UNIMPL
-; XXX more generally, never on machines where sizeof(void *) != sizeof(int)
-#if defined(SYSVSEM) && !defined(__alpha__)
-169 NOARGS { int compat_10_sys_semsys(int which, int a2, int a3, \
- int a4, int a5); }
-#else
-169 UNIMPL 1.0 semsys
-#endif
-; XXX more generally, never on machines where sizeof(void *) != sizeof(int)
-#if defined(SYSVMSG) && !defined(__alpha__)
-170 NOARGS { int compat_10_sys_msgsys(int which, int a2, int a3, \
- int a4, int a5, int a6); }
-#else
-170 UNIMPL 1.0 msgsys
-#endif
-; XXX more generally, never on machines where sizeof(void *) != sizeof(int)
-#if defined(SYSVSHM) && !defined(__alpha__)
-171 NOARGS { int compat_10_sys_shmsys(int which, int a2, int a3, \
- int a4); }
-#else
-171 UNIMPL 1.0 shmsys
-#endif
-172 UNIMPL
-173 NOARGS { ssize_t sys_pread(int fd, void *buf, \
- size_t nbyte, int pad, off_t offset); }
-174 NOARGS { ssize_t sys_pwrite(int fd, const void *buf, \
- size_t nbyte, int pad, off_t offset); }
-175 UNIMPL
-176 UNIMPL ntp_adjtime
-177 UNIMPL sfork
-178 UNIMPL getdescriptor
-179 UNIMPL setdescriptor
-180 UNIMPL
-
-; Syscalls 180-199 are used by/reserved for BSD
-181 NOARGS { int sys_setgid(gid_t gid); }
-182 NOARGS { int sys_setegid(gid_t egid); }
-183 NOARGS { int sys_seteuid(uid_t euid); }
-184 UNIMPL
-185 UNIMPL
-186 UNIMPL
-187 UNIMPL
-188 STD { int freebsd_sys_stat(char *path, struct stat35 *ub); }
-189 NOARGS { int compat_35_sys_fstat(int fd, \
- struct stat35 *sb); }
-190 STD { int freebsd_sys_lstat(char *path, \
- struct stat35 *ub); }
-191 STD { int freebsd_sys_pathconf(char *path, int name); }
-192 NOARGS { int sys_fpathconf(int fd, int name); }
-193 UNIMPL
-194 NOARGS { int sys_getrlimit(u_int which, struct rlimit *rlp); }
-195 NOARGS { int sys_setrlimit(u_int which, struct rlimit *rlp); }
-196 NOARGS { int sys_getdirentries(int fd, char *buf, \
- u_int count, long *basep); }
-197 STD { caddr_t freebsd_sys_mmap(caddr_t addr, size_t len, \
- int prot, int flags, int fd, long pad, off_t pos); }
-198 NOARGS { int sys_nosys(void); } __syscall
-199 NOARGS { off_t sys_lseek(int fd, int pad, off_t offset, \
- int whence); }
-200 STD { int freebsd_sys_truncate(char *path, int pad, \
- off_t length); }
-201 NOARGS { int sys_ftruncate(int fd, int pad, off_t length); }
-202 NOARGS { int sys___sysctl(int *name, u_int namelen, \
- void *old, size_t *oldlenp, void *new, \
- size_t newlen); }
-203 NOARGS { int sys_mlock(caddr_t addr, size_t len); }
-204 NOARGS { int sys_munlock(caddr_t addr, size_t len); }
-205 UNIMPL sys_undelete
-206 UNIMPL futimes
-207 NOARGS { int sys_getpgid(pid_t pid); }
-208 UNIMPL reboot
-209 NOARGS { int sys_poll(struct pollfd *fds, \
- unsigned long nfds, int timeout); }
-;
-; Syscalls 210-219 are reserved for dynamically loaded syscalls
-;
-210 UNIMPL
-211 UNIMPL
-212 UNIMPL
-213 UNIMPL
-214 UNIMPL
-215 UNIMPL
-216 UNIMPL
-217 UNIMPL
-218 UNIMPL
-219 UNIMPL
-; Syscalls 220-239 are reserved for syscalls imported from NetBSD
-#ifdef SYSVSEM
-220 NOARGS { int sys___semctl(int semid, int semnum, int cmd, \
- union semun *arg); }
-221 NOARGS { int sys_semget(key_t key, int nsems, int semflg); }
-222 NOARGS { int sys_semop(int semid, struct sembuf *sops, \
- u_int nsops); }
-223 OBSOL sys_semconfig
-#else
-220 UNIMPL sys___semctl
-221 UNIMPL sys_semget
-222 UNIMPL sys_semop
-223 UNIMPL sys_semconfig
-#endif
-#ifdef SYSVMSG
-224 NOARGS { int sys_msgctl(int msqid, int cmd, \
- struct msqid_ds *buf); }
-225 NOARGS { int sys_msgget(key_t key, int msgflg); }
-226 NOARGS { int sys_msgsnd(int msqid, void *msgp, size_t msgsz, \
- int msgflg); }
-227 NOARGS { int sys_msgrcv(int msqid, void *msgp, size_t msgsz, \
- long msgtyp, int msgflg); }
-#else
-224 UNIMPL sys_msgctl
-225 UNIMPL sys_msgget
-226 UNIMPL sys_msgsnd
-227 UNIMPL sys_msgrcv
-#endif
-#ifdef SYSVSHM
-228 NOARGS { int sys_shmat(int shmid, void *shmaddr, int shmflg); }
-229 NOARGS { int sys_shmctl(int shmid, int cmd, \
- struct shmid_ds *buf); }
-230 NOARGS { int sys_shmdt(void *shmaddr); }
-231 NOARGS { int sys_shmget(key_t key, int size, int shmflg); }
-#else
-228 UNIMPL sys_shmat
-229 UNIMPL sys_shmctl
-230 UNIMPL sys_shmdt
-231 UNIMPL sys_shmget
-#endif
-232 NOARGS { int sys_clock_gettime(clockid_t clock_id, \
- struct timespec *tp); }
-233 UNIMPL
-234 UNIMPL
-235 UNIMPL timer_create
-236 UNIMPL timer_delete
-237 UNIMPL timer_settime
-238 UNIMPL timer_gettime
-239 UNIMPL timer_getoverrun
-240 NOARGS { int sys_nanosleep(const struct timespec *rqtp, \
- struct timespec *rmtp); }
-241 UNIMPL
-242 UNIMPL
-243 UNIMPL
-244 UNIMPL
-245 UNIMPL
-246 UNIMPL
-247 UNIMPL
-248 UNIMPL
-249 UNIMPL
-; syscall numbers initially used in OpenBSD
-250 NOARGS { int sys_minherit(caddr_t addr, size_t len, \
- int inherit); }
-251 NOARGS { int sys_rfork(int flags); }
-252 STD { int freebsd_sys_poll2(struct pollfd *fds, \
- unsigned long nfds, int timeout); }
-253 NOARGS { int sys_issetugid(void); }
-254 NOARGS { int sys_lchown(char *path, int uid, int gid); }
-255 UNIMPL
-256 UNIMPL
-257 UNIMPL
-258 UNIMPL
-259 UNIMPL
-260 UNIMPL
-261 UNIMPL
-262 UNIMPL
-263 UNIMPL
-264 UNIMPL
-265 UNIMPL
-266 UNIMPL
-267 UNIMPL
-268 UNIMPL
-269 UNIMPL
-270 UNIMPL
-271 UNIMPL
-272 STD { int freebsd_sys_getdents(int fd, void *dirent, \
- unsigned count); }
-273 UNIMPL
-274 UNIMPL lchmod
-275 UNIMPL lchown
-276 UNIMPL lutimes
-277 UNIMPL msync
-278 UNIMPL stat
-279 UNIMPL fstat
-280 UNIMPL lstat
-281 UNIMPL
-282 UNIMPL
-283 UNIMPL
-284 UNIMPL
-285 UNIMPL
-286 UNIMPL
-287 UNIMPL
-288 UNIMPL
-289 UNIMPL
-290 UNIMPL
-291 UNIMPL
-292 UNIMPL
-293 UNIMPL
-294 UNIMPL
-295 UNIMPL
-296 UNIMPL
-297 UNIMPL fhstatfs
-298 UNIMPL fhopen
-299 UNIMPL fhstat
-; syscall numbers for FreeBSD
-300 UNIMPL modnext
-301 UNIMPL modstat
-302 UNIMPL modfnext
-303 UNIMPL modfind
-304 UNIMPL kldload
-305 UNIMPL kldunload
-306 UNIMPL kldfind
-307 UNIMPL kldnext
-308 UNIMPL kldstat
-309 UNIMPL kldfirstmod
-310 UNIMPL getsid
-311 NOARGS { int sys_setresuid(uid_t ruid, uid_t euid, \
- uid_t suid); }
-312 NOARGS { int sys_setresgid(gid_t rgid, gid_t egid, \
- gid_t sgid); }
-313 UNIMPL signanosleep
-314 UNIMPL aio_return
-315 UNIMPL aio_suspend
-316 UNIMPL aio_cancel
-317 UNIMPL aio_error
-318 UNIMPL aio_read
-319 UNIMPL aio_write
-320 UNIMPL lio_listio
-321 UNIMPL yield
-322 UNIMPL thr_sleep
-323 UNIMPL thr_wakeup
-324 UNIMPL mlockall
-325 UNIMPL munlockall
-326 UNIMPL __getcwd
-327 UNIMPL sched_setparam
-328 UNIMPL sched_getparam
-329 UNIMPL sched_setscheduler
-330 UNIMPL sched_getscheduler
-331 UNIMPL sched_yield
-332 UNIMPL sched_get_priority_max
-333 UNIMPL sched_get_priority_min
-334 UNIMPL sched_rr_get_interval
-335 UNIMPL utrace
-336 UNIMPL sendfile
-337 UNIMPL kldsym
-338 UNIMPL jail
-339 UNIMPL pioctl
-340 STD { int freebsd_sys_sigprocmask40(int how, const freebsd_sigset_t \
- *set, freebsd_sigset_t *oset); }
-341 STD { int freebsd_sys_sigsuspend40(const freebsd_sigset_t *sigmask); }
-342 STD { int freebsd_sys_sigaction40(int sig, const struct freebsd_sigaction \
- *act, struct freebsd_sigaction *oact); }
-343 STD { int freebsd_sys_sigpending40(freebsd_sigset_t *set); }
-344 UNIMPL 4.0 sigreturn
-345 UNIMPL sigtimedwait
-346 UNIMPL sigwaitinfo
-347 UNIMPL __acl_get_file
-348 UNIMPL __acl_set_file
-349 UNIMPL __acl_get_fd
-350 UNIMPL __acl_set_fd
-351 UNIMPL __acl_delete_file
-352 UNIMPL __acl_delete_fd
-353 UNIMPL __acl_aclcheck_file
-354 UNIMPL __acl_aclcheck_fd
-355 UNIMPL extattrctl
-356 UNIMPL extattr_set_file
-357 UNIMPL extattr_get_file
-358 UNIMPL extattr_delete_file
-359 UNIMPL aio_waitcomplete
-360 UNIMPL getresuid
-361 UNIMPL getresgid
-362 NOARGS { int sys_kqueue(void); }
-363 NOARGS { int sys_kevent(int kq, const struct kevent *changelist, \
- int nchanges, struct kevent *eventlist, int nevents, \
- const struct timespec *timeout); }
-364 UNIMPL __cap_get_proc
-365 UNIMPL __cap_set_proc
-366 UNIMPL __cap_get_fd
-367 UNIMPL __cap_get_file
-368 UNIMPL __cap_set_fd
-369 UNIMPL __cap_set_file
-370 UNIMPL lkmressym
-371 UNIMPL extattr_set_fd
-372 UNIMPL extattr_get_fd
-373 UNIMPL extattr_delete_fd
-374 UNIMPL __setugid
-375 UNIMPL nfsclnt
-376 UNIMPL eaccess
-377 UNIMPL afs_syscall
-378 UNIMPL nmount
-379 UNIMPL kse_exit
-380 UNIMPL kse_wakeup
-381 UNIMPL kse_create
-382 UNIMPL kse_thr_interrupt
-383 UNIMPL kse_release
-384 UNIMPL __mac_get_proc
-385 UNIMPL __mac_set_proc
-386 UNIMPL __mac_get_fd
-387 UNIMPL __mac_get_file
-388 UNIMPL __mac_set_fd
-389 UNIMPL __mac_set_file
-390 UNIMPL kenv
-391 UNIMPL lchflags
-392 UNIMPL uuidgen
-393 UNIMPL sendfile
-394 UNIMPL mac_syscall
-395 UNIMPL getfsstat
-396 UNIMPL statfs
-397 UNIMPL fsstatfs
-398 UNIMPL fhstatfs
-399 UNIMPL nosys
-400 UNIMPL ksem_close
-401 UNIMPL ksem_post
-402 UNIMPL ksem_wait
-403 UNIMPL ksem_trywait
-404 UNIMPL ksem_init
-405 UNIMPL ksem_open
-406 UNIMPL ksem_unlink
-407 UNIMPL ksem_getvalue
-408 UNIMPL ksem_destroy
-409 UNIMPL __mac_get_pid
-410 UNIMPL __mac_get_link
-411 UNIMPL __mac_set_link
-412 UNIMPL extattr_set_link
-413 UNIMPL extattr_get_link
-414 UNIMPL extattr_delete_link
-415 UNIMPL __mac_execve
-416 UNIMPL sigaction
-417 UNIMPL sigreturn
-418 UNIMPL __xstat
-419 UNIMPL __xfstat
-420 UNIMPL __xlstat
-421 UNIMPL getcontext
-422 UNIMPL setcontext
-423 UNIMPL swapcontext
-424 UNIMPL swapoff
-425 UNIMPL __acl_get_link
-426 UNIMPL __acl_set_link
-427 UNIMPL __acl_delete_link
-428 UNIMPL __acl_aclcheck_link
-429 UNIMPL sigwait
-430 UNIMPL thr_create
-431 UNIMPL thr_exit
-432 UNIMPL thr_self
-433 UNIMPL thr_kill
-434 UNIMPL _umtx_lock
-435 UNIMPL _umtx_unlock
-436 UNIMPL jail_attach
-437 UNIMPL extattr_list_fd
-438 UNIMPL extattr_list_file
-439 UNIMPL extattr_list_link
diff --git a/sys/compat/ossaudio/files.ossaudio b/sys/compat/ossaudio/files.ossaudio
index c5870b6eab1..85e73f8c236 100644
--- a/sys/compat/ossaudio/files.ossaudio
+++ b/sys/compat/ossaudio/files.ossaudio
@@ -1,8 +1,8 @@
-# $OpenBSD: files.ossaudio,v 1.4 2001/01/25 18:06:41 brad Exp $
+# $OpenBSD: files.ossaudio,v 1.5 2011/04/05 12:50:15 guenther Exp $
# $NetBSD: files.ossaudio,v 1.2 1997/07/20 20:35:44 pk Exp $
#
# Config file description for OSS (Voxware) audio driver
-# compatibility. Used by compat_linux, compat_freebsd and compat_bsdos.
+# compatibility. Used by compat_linux
# Included by ports that need it.
-file compat/ossaudio/ossaudio.c compat_linux | compat_freebsd | compat_bsdos
+file compat/ossaudio/ossaudio.c compat_linux