diff options
author | Bob Beck <beck@cvs.openbsd.org> | 2007-05-28 23:10:11 +0000 |
---|---|---|
committer | Bob Beck <beck@cvs.openbsd.org> | 2007-05-28 23:10:11 +0000 |
commit | 0607194a881701170175f156fb947adff1da714f (patch) | |
tree | 851dcf0d128fa156f3439bd1b73d4744d74a87f2 /sys/compat | |
parent | 62e9e0c9395791a5babdc92d6bc74e79ae3a1348 (diff) |
Maintaining a broken compatibility layer for a broken OS is not a productive
activity for anyone. Bye bye COMPAT_NETBSD. ok tedu@, deraadt@, and many others
in the hackathon room.
Diffstat (limited to 'sys/compat')
-rw-r--r-- | sys/compat/netbsd/Makefile | 9 | ||||
-rw-r--r-- | sys/compat/netbsd/files.netbsd | 17 | ||||
-rw-r--r-- | sys/compat/netbsd/netbsd_exec.c | 111 | ||||
-rw-r--r-- | sys/compat/netbsd/netbsd_exec.h | 45 | ||||
-rw-r--r-- | sys/compat/netbsd/netbsd_file.c | 728 | ||||
-rw-r--r-- | sys/compat/netbsd/netbsd_getcwd.c | 536 | ||||
-rw-r--r-- | sys/compat/netbsd/netbsd_getdents.c | 121 | ||||
-rw-r--r-- | sys/compat/netbsd/netbsd_misc.c | 162 | ||||
-rw-r--r-- | sys/compat/netbsd/netbsd_signal.c | 240 | ||||
-rw-r--r-- | sys/compat/netbsd/netbsd_signal.h | 57 | ||||
-rw-r--r-- | sys/compat/netbsd/netbsd_stat.c | 266 | ||||
-rw-r--r-- | sys/compat/netbsd/netbsd_stat.h | 94 | ||||
-rw-r--r-- | sys/compat/netbsd/netbsd_syscall.h | 668 | ||||
-rw-r--r-- | sys/compat/netbsd/netbsd_syscallargs.h | 500 | ||||
-rw-r--r-- | sys/compat/netbsd/netbsd_syscalls.c | 399 | ||||
-rw-r--r-- | sys/compat/netbsd/netbsd_sysent.c | 754 | ||||
-rw-r--r-- | sys/compat/netbsd/netbsd_types.h | 42 | ||||
-rw-r--r-- | sys/compat/netbsd/netbsd_util.h | 54 | ||||
-rw-r--r-- | sys/compat/netbsd/syscalls.conf | 12 | ||||
-rw-r--r-- | sys/compat/netbsd/syscalls.master | 610 |
20 files changed, 0 insertions, 5425 deletions
diff --git a/sys/compat/netbsd/Makefile b/sys/compat/netbsd/Makefile deleted file mode 100644 index 4c8590e4713..00000000000 --- a/sys/compat/netbsd/Makefile +++ /dev/null @@ -1,9 +0,0 @@ -# $OpenBSD: Makefile,v 1.2 2001/08/26 03:23:44 deraadt Exp $ - -SYS= ../.. -DEP= syscalls.conf syscalls.master ${SYS}/kern/makesyscalls.sh -OBJS= netbsd_sysent.c netbsd_syscalls.c \ - netbsd_syscall.h netbsd_syscallargs.h - -${OBJS}: ${DEP} - sh ${SYS}/kern/makesyscalls.sh syscalls.conf syscalls.master diff --git a/sys/compat/netbsd/files.netbsd b/sys/compat/netbsd/files.netbsd deleted file mode 100644 index 1e15de7918b..00000000000 --- a/sys/compat/netbsd/files.netbsd +++ /dev/null @@ -1,17 +0,0 @@ -# $OpenBSD: files.netbsd,v 1.8 2001/09/21 15:31:59 art Exp $ -# -# Config.new file description for machine-independent NetBSD compat code. -# Included by ports that need it. - -# ports should define any machine-specific files they need in their -# own file lists. - -file compat/netbsd/netbsd_exec.c compat_netbsd -file compat/netbsd/netbsd_file.c compat_netbsd -file compat/netbsd/netbsd_getcwd.c compat_netbsd -file compat/netbsd/netbsd_getdents.c compat_netbsd -file compat/netbsd/netbsd_misc.c compat_netbsd -file compat/netbsd/netbsd_signal.c compat_netbsd -file compat/netbsd/netbsd_stat.c compat_netbsd -file compat/netbsd/netbsd_sysent.c compat_netbsd -file compat/netbsd/netbsd_syscalls.c compat_netbsd & syscall_debug diff --git a/sys/compat/netbsd/netbsd_exec.c b/sys/compat/netbsd/netbsd_exec.c deleted file mode 100644 index 65df435fbe3..00000000000 --- a/sys/compat/netbsd/netbsd_exec.c +++ /dev/null @@ -1,111 +0,0 @@ -/* $OpenBSD: netbsd_exec.c,v 1.12 2006/01/19 17:54:54 mickey Exp $ */ -/* $NetBSD: svr4_exec.c,v 1.16 1995/10/14 20:24:20 christos Exp $ */ - -/* - * Copyright (c) 1994 Christos Zoulas - * 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. - */ - -#include <sys/param.h> -#include <sys/systm.h> -#include <sys/proc.h> -#include <sys/signalvar.h> -#include <sys/malloc.h> -#include <sys/exec.h> -#include <sys/exec_elf.h> -#include <sys/exec_olf.h> - -#include <sys/mman.h> -#include <uvm/uvm_extern.h> - -#include <machine/cpu.h> -#include <machine/reg.h> - -#include <compat/netbsd/netbsd_util.h> -#include <compat/netbsd/netbsd_syscall.h> -#include <compat/netbsd/netbsd_exec.h> -#include <compat/netbsd/netbsd_signal.h> - -#include <machine/netbsd_machdep.h> - -#ifdef _KERN_DO_ELF64 - -extern char netbsd_sigcode[], netbsd_esigcode[]; -extern struct sysent netbsd_sysent[]; -#ifdef SYSCALL_DEBUG -extern char *netbsd_syscallnames[]; -#endif - -struct emul emul_netbsd_elf64 = { - "netbsd", - NULL, - netbsd_sendsig, - NETBSD_SYS_syscall, - NETBSD_SYS_MAXSYSCALL, - netbsd_sysent, -#ifdef SYSCALL_DEBUG - netbsd_syscallnames, -#else - NULL, -#endif - ELF_AUX_ENTRIES * sizeof(Aux64Info), - elf64_copyargs, - setregs, - exec_elf64_fixup, - netbsd_sigcode, - netbsd_esigcode, -}; - -int -netbsd_elf64_probe(p, epp, itp, pos, os) - struct proc *p; - struct exec_package *epp; - char *itp; - u_long *pos; - u_int8_t *os; -{ - Elf64_Ehdr *eh = epp->ep_hdr; - char *bp; - int error; - size_t len; - - if (elf64_os_pt_note(p, epp, eh, "NetBSD\0", 7, 4)) - return (EINVAL); - - if (itp) { - if ((error = emul_find(p, NULL, netbsd_emul_path, itp, &bp, 0))) - return (error); - if ((error = copystr(bp, itp, MAXPATHLEN, &len))) - return (error); - free(bp, M_TEMP); - } - epp->ep_emul = &emul_netbsd_elf64; - *pos = ELF64_NO_ADDR; - if (*os == OOS_NULL) - *os = OOS_NETBSD; - return (0); -} - -#endif /* _KERN_DO_ELF64 */ diff --git a/sys/compat/netbsd/netbsd_exec.h b/sys/compat/netbsd/netbsd_exec.h deleted file mode 100644 index cec4badb8ad..00000000000 --- a/sys/compat/netbsd/netbsd_exec.h +++ /dev/null @@ -1,45 +0,0 @@ -/* $OpenBSD: netbsd_exec.h,v 1.3 2003/06/02 23:28:00 millert 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 _NETBSD_EXEC_H -#define _NETBSD_EXEC_H - -int exec_netbsd_aout_makecmds(struct proc *, struct exec_package *); - -#ifdef _KERN_DO_ELF64 -int netbsd_elf64_probe(struct proc *, struct exec_package *, char *, - u_long *, u_int8_t *); -#endif - -#endif /* !_NETBSD_EXEC_H */ diff --git a/sys/compat/netbsd/netbsd_file.c b/sys/compat/netbsd/netbsd_file.c deleted file mode 100644 index 6fecfca8710..00000000000 --- a/sys/compat/netbsd/netbsd_file.c +++ /dev/null @@ -1,728 +0,0 @@ -/* $OpenBSD: netbsd_file.c,v 1.11 2006/06/25 15:01:53 sturm 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/netbsd/netbsd_types.h> -#include <compat/netbsd/netbsd_stat.h> -#include <compat/netbsd/netbsd_signal.h> -#include <compat/netbsd/netbsd_syscallargs.h> -#include <compat/netbsd/netbsd_util.h> - -#define ARRAY_LENGTH(array) (sizeof(array)/sizeof(array[0])) - -const char netbsd_emul_path[] = "/emul/netbsd"; - -#if 0 -static char * convert_from_netbsd_mount_type(int); -void statfs_to_netbsd_statfs(struct proc *, struct mount *, - struct statfs *, struct netbsd_statfs *); - -struct netbsd_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_netbsd_mount_type(type) - int type; -{ - static char *netbsd_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 Netbsd */ - "adosfs", /* ?? = AmigaDOS Filesystem */ -#endif - }; - - if (type < 0 || type >= ARRAY_LENGTH(netbsd_mount_type)) - return (NULL); - return (netbsd_mount_type[type]); -} - -int -netbsd_sys_mount(p, v, retval) - struct proc *p; - void *v; - register_t *retval; -{ - struct netbsd_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_netbsd_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; - NETBSD_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); -} -#endif /* 0 */ - -/* - * The following syscalls are only here because of the alternate path check. - */ - -/* XXX - UNIX domain: int netbsd_sys_bind(int s, caddr_t name, int namelen); */ -/* XXX - UNIX domain: int netbsd_sys_connect(int s, caddr_t name, int namelen); */ - - -int -netbsd_sys_open(p, v, retval) - struct proc *p; - void *v; - register_t *retval; -{ - struct netbsd_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) - NETBSD_CHECK_ALT_CREAT(p, &sg, SCARG(uap, path)); - else - NETBSD_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path)); - return sys_open(p, uap, retval); -} - -int -compat_43_netbsd_sys_creat(p, v, retval) - struct proc *p; - void *v; - register_t *retval; -{ - struct compat_43_netbsd_sys_creat_args /* { - syscallarg(char *) path; - syscallarg(int) mode; - } */ *uap = v; - caddr_t sg = stackgap_init(p->p_emul); - - NETBSD_CHECK_ALT_CREAT(p, &sg, SCARG(uap, path)); - return compat_43_sys_creat(p, uap, retval); -} - -int -netbsd_sys_link(p, v, retval) - struct proc *p; - void *v; - register_t *retval; -{ - struct netbsd_sys_link_args /* { - syscallarg(char *) path; - syscallarg(char *) link; - } */ *uap = v; - caddr_t sg = stackgap_init(p->p_emul); - - NETBSD_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path)); - NETBSD_CHECK_ALT_CREAT(p, &sg, SCARG(uap, link)); - return sys_link(p, uap, retval); -} - -int -netbsd_sys_unlink(p, v, retval) - struct proc *p; - void *v; - register_t *retval; -{ - struct netbsd_sys_unlink_args /* { - syscallarg(char *) path; - } */ *uap = v; - caddr_t sg = stackgap_init(p->p_emul); - - NETBSD_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path)); - return sys_unlink(p, uap, retval); -} - -int -netbsd_sys_chdir(p, v, retval) - struct proc *p; - void *v; - register_t *retval; -{ - struct netbsd_sys_chdir_args /* { - syscallarg(char *) path; - } */ *uap = v; - caddr_t sg = stackgap_init(p->p_emul); - - NETBSD_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path)); - return sys_chdir(p, uap, retval); -} - -int -netbsd_sys_mknod(p, v, retval) - struct proc *p; - void *v; - register_t *retval; -{ - struct netbsd_sys_mknod_args /* { - syscallarg(char *) path; - syscallarg(int) mode; - syscallarg(int) dev; - } */ *uap = v; - caddr_t sg = stackgap_init(p->p_emul); - - NETBSD_CHECK_ALT_CREAT(p, &sg, SCARG(uap, path)); - return sys_mknod(p, uap, retval); -} - -int -netbsd_sys_chmod(p, v, retval) - struct proc *p; - void *v; - register_t *retval; -{ - struct netbsd_sys_chmod_args /* { - syscallarg(char *) path; - syscallarg(int) mode; - } */ *uap = v; - caddr_t sg = stackgap_init(p->p_emul); - - NETBSD_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path)); - return sys_chmod(p, uap, retval); -} - -int -netbsd_sys_chown(p, v, retval) - struct proc *p; - void *v; - register_t *retval; -{ - struct netbsd_sys_chown_args /* { - syscallarg(char *) path; - syscallarg(int) uid; - syscallarg(int) gid; - } */ *uap = v; - caddr_t sg = stackgap_init(p->p_emul); - - NETBSD_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path)); - return sys_chown(p, uap, retval); -} - -int -netbsd_sys_unmount(p, v, retval) - struct proc *p; - void *v; - register_t *retval; -{ - struct netbsd_sys_unmount_args /* { - syscallarg(char *) path; - syscallarg(int) flags; - } */ *uap = v; - caddr_t sg = stackgap_init(p->p_emul); - - NETBSD_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path)); - return sys_unmount(p, uap, retval); -} - -int -netbsd_sys_access(p, v, retval) - struct proc *p; - void *v; - register_t *retval; -{ - struct netbsd_sys_access_args /* { - syscallarg(char *) path; - syscallarg(int) flags; - } */ *uap = v; - caddr_t sg = stackgap_init(p->p_emul); - - NETBSD_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path)); - return sys_access(p, uap, retval); -} - -int -netbsd_sys_chflags(p, v, retval) - struct proc *p; - void *v; - register_t *retval; -{ - struct netbsd_sys_chflags_args /* { - syscallarg(char *) path; - syscallarg(int) flags; - } */ *uap = v; - caddr_t sg = stackgap_init(p->p_emul); - - NETBSD_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path)); - return sys_chflags(p, uap, retval); -} - -int -netbsd_sys_revoke(p, v, retval) - struct proc *p; - void *v; - register_t *retval; -{ - struct netbsd_sys_revoke_args /* { - syscallarg(char *) path; - } */ *uap = v; - caddr_t sg = stackgap_init(p->p_emul); - - NETBSD_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path)); - return sys_revoke(p, uap, retval); -} - -int -netbsd_sys_symlink(p, v, retval) - struct proc *p; - void *v; - register_t *retval; -{ - struct netbsd_sys_symlink_args /* { - syscallarg(char *) path; - syscallarg(char *) link; - } */ *uap = v; - caddr_t sg = stackgap_init(p->p_emul); - - NETBSD_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path)); - NETBSD_CHECK_ALT_CREAT(p, &sg, SCARG(uap, link)); - return sys_symlink(p, uap, retval); -} - -int -netbsd_sys_readlink(p, v, retval) - struct proc *p; - void *v; - register_t *retval; -{ - struct netbsd_sys_readlink_args /* { - syscallarg(char *) path; - syscallarg(char *) buf; - syscallarg(int) count; - } */ *uap = v; - caddr_t sg = stackgap_init(p->p_emul); - - NETBSD_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path)); - return sys_readlink(p, uap, retval); -} - -int -netbsd_sys_execve(p, v, retval) - struct proc *p; - void *v; - register_t *retval; -{ - struct netbsd_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); - NETBSD_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 -netbsd_sys_chroot(p, v, retval) - struct proc *p; - void *v; - register_t *retval; -{ - struct netbsd_sys_chroot_args /* { - syscallarg(char *) path; - } */ *uap = v; - caddr_t sg = stackgap_init(p->p_emul); - - NETBSD_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path)); - return sys_chroot(p, uap, retval); -} - -int -netbsd_sys_rename(p, v, retval) - struct proc *p; - void *v; - register_t *retval; -{ - struct netbsd_sys_rename_args /* { - syscallarg(char *) from; - syscallarg(char *) to; - } */ *uap = v; - caddr_t sg = stackgap_init(p->p_emul); - - NETBSD_CHECK_ALT_EXIST(p, &sg, SCARG(uap, from)); - NETBSD_CHECK_ALT_CREAT(p, &sg, SCARG(uap, to)); - return sys_rename(p, uap, retval); -} - -int -compat_43_netbsd_sys_truncate(p, v, retval) - struct proc *p; - void *v; - register_t *retval; -{ - struct compat_43_netbsd_sys_truncate_args /* { - syscallarg(char *) path; - syscallarg(long) length; - } */ *uap = v; - caddr_t sg = stackgap_init(p->p_emul); - - NETBSD_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path)); - return compat_43_sys_truncate(p, uap, retval); -} - -int -netbsd_sys_mkfifo(p, v, retval) - struct proc *p; - void *v; - register_t *retval; -{ - struct netbsd_sys_mkfifo_args /* { - syscallarg(char *) path; - syscallarg(int) mode; - } */ *uap = v; - caddr_t sg = stackgap_init(p->p_emul); - - NETBSD_CHECK_ALT_CREAT(p, &sg, SCARG(uap, path)); - return sys_mkfifo(p, uap, retval); -} - -int -netbsd_sys_mkdir(p, v, retval) - struct proc *p; - void *v; - register_t *retval; -{ - struct netbsd_sys_mkdir_args /* { - syscallarg(char *) path; - syscallarg(int) mode; - } */ *uap = v; - caddr_t sg = stackgap_init(p->p_emul); - - NETBSD_CHECK_ALT_CREAT(p, &sg, SCARG(uap, path)); - return sys_mkdir(p, uap, retval); -} - -int -netbsd_sys_rmdir(p, v, retval) - struct proc *p; - void *v; - register_t *retval; -{ - struct netbsd_sys_rmdir_args /* { - syscallarg(char *) path; - } */ *uap = v; - caddr_t sg = stackgap_init(p->p_emul); - - NETBSD_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path)); - return sys_rmdir(p, uap, retval); -} - -#if 0 /* XXX */ -/* - * Convert struct statfs -> struct netbsd_statfs - */ -void -statfs_to_netbsd_statfs(p, mp, sp, fsp) - struct proc *p; - struct mount *mp; - struct statfs *sp; - struct netbsd_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 -netbsd_sys_statfs(p, v, retval) - struct proc *p; - void *v; - register_t *retval; -{ - register struct netbsd_sys_statfs_args /* { - syscallarg(char *) path; - syscallarg(struct netbsd_statfs *) buf; - } */ *uap = v; - register struct mount *mp; - register struct statfs *sp; - struct netbsd_statfs fsb; - int error; - struct nameidata nd; - caddr_t sg = stackgap_init(p->p_emul); - - NETBSD_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_netbsd_statfs(p, mp, sp, &fsb); - return (copyout((caddr_t)&fsb, (caddr_t)SCARG(uap, buf), sizeof(fsb))); -} - -/* - * Get filesystem statistics. - */ -/* ARGSUSED */ -int -netbsd_sys_fstatfs(p, v, retval) - struct proc *p; - void *v; - register_t *retval; -{ - register struct netbsd_sys_fstatfs_args /* { - syscallarg(int) fd; - syscallarg(struct netbsd_statfs *) buf; - } */ *uap = v; - struct file *fp; - struct mount *mp; - register struct statfs *sp; - struct netbsd_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_netbsd_statfs(p, mp, sp, &fsb); - return (copyout((caddr_t)&fsb, (caddr_t)SCARG(uap, buf), sizeof(fsb))); -} - -/* - * Get statistics on all filesystems. - */ -int -netbsd_sys_getfsstat(p, v, retval) - struct proc *p; - void *v; - register_t *retval; -{ - register struct netbsd_sys_getfsstat_args /* { - syscallarg(struct netbsd_statfs *) buf; - syscallarg(long) bufsize; - syscallarg(int) flags; - } */ *uap = v; - register struct mount *mp, *nmp; - register struct statfs *sp; - struct netbsd_statfs fsb; - caddr_t sfsp; - long count, maxcount; - int error, flags = SCARG(uap, flags); - - maxcount = SCARG(uap, bufsize) / sizeof(struct netbsd_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_netbsd_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 -netbsd_sys_getfh(p, v, retval) - struct proc *p; - void *v; - register_t *retval; -{ - struct netbsd_sys_getfh_args /* { - syscallarg(char *) fname; - syscallarg(fhandle_t *) fhp; - } */ *uap = v; - caddr_t sg = stackgap_init(p->p_emul); - - NETBSD_CHECK_ALT_EXIST(p, &sg, SCARG(uap, fname)); - return sys_getfh(p, uap, retval); -} -#endif /* NFSCLIENT */ - -#endif /* 0 XXX */ - -int -netbsd_sys_pathconf(p, v, retval) - struct proc *p; - void *v; - register_t *retval; -{ - struct netbsd_sys_pathconf_args /* { - syscallarg(char *) path; - syscallarg(int) name; - } */ *uap = v; - caddr_t sg = stackgap_init(p->p_emul); - - NETBSD_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path)); - return sys_pathconf(p, uap, retval); -} - -int -netbsd_sys_truncate(p, v, retval) - struct proc *p; - void *v; - register_t *retval; -{ - struct netbsd_sys_truncate_args /* { - syscallarg(char *) path; - syscallarg(int) pad; - syscallarg(off_t) length; - } */ *uap = v; - caddr_t sg = stackgap_init(p->p_emul); - - NETBSD_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path)); - return sys_truncate(p, uap, retval); -} diff --git a/sys/compat/netbsd/netbsd_getcwd.c b/sys/compat/netbsd/netbsd_getcwd.c deleted file mode 100644 index d570dc5d93d..00000000000 --- a/sys/compat/netbsd/netbsd_getcwd.c +++ /dev/null @@ -1,536 +0,0 @@ -/* $OpenBSD: netbsd_getcwd.c,v 1.10 2006/04/28 08:34:32 pedro Exp $ */ -/* $NetBSD: vfs_getcwd.c,v 1.3.2.3 1999/07/11 10:24:09 sommerfeld Exp $ */ - -/*- - * Copyright (c) 1999 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Bill Sommerfeld. - * - * 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 the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation 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 NETBSD FOUNDATION, INC. 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 FOUNDATION 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. - */ - -#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/stat.h> -#include <sys/vnode.h> -#include <sys/mount.h> -#include <sys/proc.h> -#include <sys/uio.h> -#include <sys/malloc.h> -#include <sys/dirent.h> -#include <ufs/ufs/dir.h> /* XXX only for DIRBLKSIZ */ - -#include <compat/netbsd/netbsd_types.h> -#include <compat/netbsd/netbsd_signal.h> -#include <compat/netbsd/netbsd_syscallargs.h> - -static int -netbsd_getcwd_scandir(struct vnode **, struct vnode **, - char **, char *, struct proc *); -static int -netbsd_getcwd_getcache(struct vnode **, struct vnode **, - char **, char *); -static int -netbsd_getcwd_common(struct vnode *, struct vnode *, - char **, char *, int, int, struct proc *); - -#define DIRENT_MINSIZE (sizeof(struct dirent) - (MAXNAMLEN+1) + 4) - -/* - * Vnode variable naming conventions in this file: - * - * rvp: the current root we're aiming towards. - * lvp, *lvpp: the "lower" vnode - * uvp, *uvpp: the "upper" vnode. - * - * Since all the vnodes we're dealing with are directories, and the - * lookups are going *up* in the filesystem rather than *down*, the - * usual "pvp" (parent) or "dvp" (directory) naming conventions are - * too confusing. - */ - -/* - * XXX Will infinite loop in certain cases if a directory read reliably - * returns EINVAL on last block. - * XXX is EINVAL the right thing to return if a directory is malformed? - */ - -/* - * XXX Untested vs. mount -o union; probably does the wrong thing. - */ - -/* - * Find parent vnode of *lvpp, return in *uvpp - * - * If we care about the name, scan it looking for name of directory - * entry pointing at lvp. - * - * Place the name in the buffer which starts at bufp, immediately - * before *bpp, and move bpp backwards to point at the start of it. - * - * On entry, *lvpp is a locked vnode reference; on exit, it is vput and NULL'ed - * On exit, *uvpp is either NULL or is a locked vnode reference. - */ -static int -netbsd_getcwd_scandir(lvpp, uvpp, bpp, bufp, p) - struct vnode **lvpp; - struct vnode **uvpp; - char **bpp; - char *bufp; - struct proc *p; -{ - int error = 0; - int eofflag; - off_t off; - int tries; - struct uio uio; - struct iovec iov; - char *dirbuf = NULL; - int dirbuflen; - ino_t fileno; - struct vattr va; - struct vnode *uvp = NULL; - struct vnode *lvp = *lvpp; - struct componentname cn; - int len, reclen; - tries = 0; - - /* - * If we want the filename, get some info we need while the - * current directory is still locked. - */ - if (bufp != NULL) { - error = VOP_GETATTR(lvp, &va, p->p_ucred, p); - if (error) { - vput(lvp); - *lvpp = NULL; - *uvpp = NULL; - return error; - } - } - - /* - * Ok, we have to do it the hard way.. - * Next, get parent vnode using lookup of .. - */ - cn.cn_nameiop = LOOKUP; - cn.cn_flags = ISLASTCN | ISDOTDOT | RDONLY; - cn.cn_proc = p; - cn.cn_cred = p->p_ucred; - cn.cn_pnbuf = NULL; - cn.cn_nameptr = ".."; - cn.cn_namelen = 2; - cn.cn_hash = 0; - cn.cn_consume = 0; - - /* - * At this point, lvp is locked and will be unlocked by the lookup. - * On successful return, *uvpp will be locked - */ - error = VOP_LOOKUP(lvp, uvpp, &cn); - if (error) { - vput(lvp); - *lvpp = NULL; - *uvpp = NULL; - return error; - } - uvp = *uvpp; - - /* If we don't care about the pathname, we're done */ - if (bufp == NULL) { - vrele(lvp); - *lvpp = NULL; - return 0; - } - - fileno = va.va_fileid; - - dirbuflen = DIRBLKSIZ; - if (dirbuflen < va.va_blocksize) - dirbuflen = va.va_blocksize; - dirbuf = (char *)malloc(dirbuflen, M_TEMP, M_WAITOK); - -#if 0 -unionread: -#endif - off = 0; - do { - /* call VOP_READDIR of parent */ - iov.iov_base = dirbuf; - iov.iov_len = dirbuflen; - - uio.uio_iov = &iov; - uio.uio_iovcnt = 1; - uio.uio_offset = off; - uio.uio_resid = dirbuflen; - uio.uio_segflg = UIO_SYSSPACE; - uio.uio_rw = UIO_READ; - uio.uio_procp = p; - - eofflag = 0; - - error = VOP_READDIR(uvp, &uio, p->p_ucred, &eofflag, 0, 0); - - off = uio.uio_offset; - - /* - * Try again if NFS tosses its cookies. - * XXX this can still loop forever if the directory is busted - * such that the second or subsequent page of it always - * returns EINVAL - */ - if ((error == EINVAL) && (tries < 3)) { - off = 0; - tries++; - continue; /* once more, with feeling */ - } - - if (!error) { - char *cpos; - struct dirent *dp; - - cpos = dirbuf; - tries = 0; - - /* scan directory page looking for matching vnode */ - for (len = (dirbuflen - uio.uio_resid); len > 0; len -= reclen) { - dp = (struct dirent *) cpos; - reclen = dp->d_reclen; - - /* check for malformed directory.. */ - if (reclen < DIRENT_MINSIZE) { - error = EINVAL; - goto out; - } - /* - * XXX should perhaps do VOP_LOOKUP to - * check that we got back to the right place, - * but getting the locking games for that - * right would be heinous. - */ - if (dp->d_fileno == fileno) { - char *bp = *bpp; - bp -= dp->d_namlen; - - if (bp <= bufp) { - error = ERANGE; - goto out; - } - bcopy(dp->d_name, bp, dp->d_namlen); - error = 0; - *bpp = bp; - goto out; - } - cpos += reclen; - } - } - } while (!eofflag); - - error = ENOENT; - -out: - vrele(lvp); - *lvpp = NULL; - free(dirbuf, M_TEMP); - return error; -} - -/* - * Look in the vnode-to-name reverse cache to see if - * we can find things the easy way. - * - * XXX vget failure path is untested. - * - * On entry, *lvpp is a locked vnode reference. - * On exit, one of the following is the case: - * 0) Both *lvpp and *uvpp are NULL and failure is returned. - * 1) *uvpp is NULL, *lvpp remains locked and -1 is returned (cache miss) - * 2) *uvpp is a locked vnode reference, *lvpp is vput and NULL'ed - * and 0 is returned (cache hit) - */ - -static int -netbsd_getcwd_getcache(lvpp, uvpp, bpp, bufp) - struct vnode **lvpp, **uvpp; - char **bpp; - char *bufp; -{ -#ifdef notyet - struct vnode *lvp, *uvp = NULL; - int error; - int vpid; - - lvp = *lvpp; - - /* - * This returns 0 on a cache hit, -1 on a clean cache miss, - * or an errno on other failure. - */ - error = cache_revlookup(lvp, uvpp, bpp, bufp); - if (error) { - if (error != -1) { - vput(lvp); - *lvpp = NULL; - *uvpp = NULL; - } - return error; - } - uvp = *uvpp; - vpid = uvp->v_id; - - /* - * Since we're going up, we have to release the current lock - * before we take the parent lock. - */ - - VOP_UNLOCK(lvp, 0); - - error = vget(uvp, LK_EXCLUSIVE | LK_RETRY); - if (error != 0) - *uvpp = NULL; - /* - * Verify that vget succeeded, and check that vnode capability - * didn't change while we were waiting for the lock. - */ - if (error || (vpid != uvp->v_id)) { - /* - * Oops, we missed. If the vget failed, or the - * capability changed, try to get our lock back; if - * that works, tell caller to try things the hard way, - * otherwise give up. - */ - if (!error) vput(uvp); - *uvpp = NULL; - - error = vn_lock(lvp, LK_EXCLUSIVE | LK_RETRY); - - if (!error) - return -1; - } - vrele(lvp); - *lvpp = NULL; - return error; -#endif /* notyet */ - return (-1); -} - -/* - * common routine shared by sys___getcwd() and netbsd_vn_isunder() - */ - -#define GETCWD_CHECK_ACCESS 0x0001 - -static int -netbsd_getcwd_common (lvp, rvp, bpp, bufp, limit, flags, p) - struct vnode *lvp; - struct vnode *rvp; - char **bpp; - char *bufp; - int limit; - int flags; - struct proc *p; -{ - struct filedesc *fdp = p->p_fd; - struct vnode *uvp = NULL; - char *bp = NULL; - int error; - int perms = VEXEC; - - if (rvp == NULL) { - rvp = fdp->fd_rdir; - if (rvp == NULL) - rvp = rootvnode; - } - - VREF(rvp); - VREF(lvp); - - /* - * Error handling invariant: - * Before a `goto out': - * lvp is either NULL, or locked and held. - * uvp is either NULL, or locked and held. - */ - - error = vn_lock(lvp, LK_EXCLUSIVE | LK_RETRY, p); - if (error) { - vrele(lvp); - lvp = NULL; - goto out; - } - if (bufp) - bp = *bpp; - /* - * this loop will terminate when one of the following happens: - * - we hit the root - * - getdirentries or lookup fails - * - we run out of space in the buffer. - */ - if (lvp == rvp) { - if (bp) - *(--bp) = '/'; - goto out; - } - do { - if (lvp->v_type != VDIR) { - error = ENOTDIR; - goto out; - } - - /* - * access check here is optional, depending on - * whether or not caller cares. - */ - if (flags & GETCWD_CHECK_ACCESS) { - error = VOP_ACCESS(lvp, perms, p->p_ucred, p); - if (error) - goto out; - perms = VEXEC|VREAD; - } - - /* - * step up if we're a covered vnode.. - */ - while (lvp->v_flag & VROOT) { - struct vnode *tvp; - - if (lvp == rvp) - goto out; - - tvp = lvp; - lvp = lvp->v_mount->mnt_vnodecovered; - vput(tvp); - /* - * hodie natus est radici frater - */ - if (lvp == NULL) { - error = ENOENT; - goto out; - } - VREF(lvp); - error = vn_lock(lvp, LK_EXCLUSIVE | LK_RETRY, p); - if (error != 0) { - vrele(lvp); - lvp = NULL; - goto out; - } - } - /* - * Look in the name cache; if that fails, look in the - * directory.. - */ - error = netbsd_getcwd_getcache(&lvp, &uvp, &bp, bufp); - if (error == -1) - error = netbsd_getcwd_scandir(&lvp, &uvp, &bp, bufp, p); - if (error) - goto out; -#ifdef DIAGNOSTIC - if (lvp != NULL) - panic("getcwd: oops, forgot to null lvp"); - if (bufp && (bp <= bufp)) { - panic("getcwd: oops, went back too far"); - } -#endif - if (bp) - *(--bp) = '/'; - lvp = uvp; - uvp = NULL; - limit--; - } while ((lvp != rvp) && (limit > 0)); - -out: - if (bpp) - *bpp = bp; - if (uvp) - vput(uvp); - if (lvp) - vput(lvp); - vrele(rvp); - return error; -} - -/* - * Find pathname of process's current directory. - * - * Use vfs vnode-to-name reverse cache; if that fails, fall back - * to reading directory contents. - */ - -int netbsd_sys___getcwd(p, v, retval) - struct proc *p; - void *v; - register_t *retval; -{ - register struct netbsd_sys___getcwd_args /* { - syscallarg(char *) bufp; - syscallarg(size_t) length; - } */ *uap = v; - - int error; - char *path; - char *bp, *bend; - int len = SCARG(uap, length); - int lenused; - - if (len > MAXPATHLEN*4) - len = MAXPATHLEN*4; - else if (len < 2) - return ERANGE; - - path = (char *)malloc(len, M_TEMP, M_WAITOK); - - bp = &path[len]; - bend = bp; - *(--bp) = '\0'; - - /* - * 5th argument here is "max number of vnodes to traverse". - * Since each entry takes up at least 2 bytes in the output buffer, - * limit it to N/2 vnodes for an N byte buffer. - */ - error = netbsd_getcwd_common (p->p_fd->fd_cdir, NULL, &bp, path, len/2, - GETCWD_CHECK_ACCESS, p); - - if (error) - goto out; - lenused = bend - bp; - *retval = lenused; - /* put the result into user buffer */ - error = copyout(bp, SCARG(uap, bufp), lenused); - -out: - free(path, M_TEMP); - return error; -} diff --git a/sys/compat/netbsd/netbsd_getdents.c b/sys/compat/netbsd/netbsd_getdents.c deleted file mode 100644 index dd621bd4bd4..00000000000 --- a/sys/compat/netbsd/netbsd_getdents.c +++ /dev/null @@ -1,121 +0,0 @@ -/* $OpenBSD: netbsd_getdents.c,v 1.9 2005/05/26 00:33:45 pedro Exp $ */ - -/* - * 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. - * - * @(#)vfs_vnops.c 8.14 (Berkeley) 6/15/95 - * @(#)vfs_syscalls.c 8.42 (Berkeley) 7/31/95 - */ - -#include <sys/param.h> -#include <sys/file.h> -#include <sys/mount.h> -#include <sys/proc.h> -#include <sys/uio.h> -#include <sys/vnode.h> -#include <sys/stat.h> - -#include <compat/netbsd/netbsd_types.h> -#include <compat/netbsd/netbsd_signal.h> -#include <compat/netbsd/netbsd_syscallargs.h> - -static int netbsd_vn_readdir(struct file *, char *, int, u_int, int *, - struct proc *, off_t **, int *); - -static int -netbsd_vn_readdir(fp, buf, segflg, count, done, p, cookies, ncookies) - struct file *fp; - char *buf; - int segflg, *done, *ncookies; - u_int count; - struct proc *p; - off_t **cookies; -{ - struct vnode *vp = (struct vnode *)fp->f_data; - struct iovec aiov; - struct uio auio; - int error, eofflag; - - if (vp->v_type != VDIR) - return (EINVAL); - aiov.iov_base = buf; - aiov.iov_len = count; - auio.uio_iov = &aiov; - auio.uio_iovcnt = 1; - auio.uio_rw = UIO_READ; - auio.uio_segflg = segflg; - auio.uio_procp = p; - auio.uio_resid = count; - vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, p); - auio.uio_offset = fp->f_offset; - error = VOP_READDIR(vp, &auio, fp->f_cred, &eofflag, ncookies, - (u_long **)cookies); /* XXX 32-bit? */ - fp->f_offset = auio.uio_offset; - VOP_UNLOCK(vp, 0, p); - if (error) - return (error); - *done = count - auio.uio_resid; - return error; -} - -/* - * Read a block of directory entries in a file system independent format. - */ -int -netbsd_sys_getdents(p, v, retval) - struct proc *p; - void *v; - register_t *retval; -{ - register struct netbsd_sys_getdents_args /* { - syscallarg(int) fd; - syscallarg(char *) buf; - syscallarg(size_t) count; - } */ *uap = v; - struct file *fp; - int error, done; - - if ((error = getvnode(p->p_fd, SCARG(uap, fd), &fp)) != 0) - return (error); - if ((fp->f_flag & FREAD) == 0) { - error = EBADF; - goto bad; - } - error = netbsd_vn_readdir(fp, SCARG(uap, buf), UIO_USERSPACE, - SCARG(uap, count), &done, p, 0, 0); - *retval = done; -bad: - FRELE(fp); - return (error); -} - diff --git a/sys/compat/netbsd/netbsd_misc.c b/sys/compat/netbsd/netbsd_misc.c deleted file mode 100644 index 8bf0f9d0843..00000000000 --- a/sys/compat/netbsd/netbsd_misc.c +++ /dev/null @@ -1,162 +0,0 @@ -/* $OpenBSD: netbsd_misc.c,v 1.15 2007/01/16 17:52:18 thib 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. - * - * @(#)kern_fork.c 8.6 (Berkeley) 4/8/94 - * @(#)vfs_syscalls.c 8.28 (Berkeley) 12/10/94 - */ - -#include <sys/param.h> -#include <sys/file.h> -#include <sys/mount.h> -#include <sys/namei.h> -#include <sys/proc.h> -#include <sys/stat.h> -#include <sys/vnode.h> - -#include <compat/netbsd/netbsd_types.h> -#include <compat/netbsd/netbsd_signal.h> -#include <compat/netbsd/netbsd_syscallargs.h> - -/*ARGSUSED*/ -int -netbsd_sys___vfork14(p, v, retval) - struct proc *p; - void *v; - register_t *retval; -{ - return (fork1(p, SIGCHLD, FORK_PPWAIT|FORK_SHAREVM, NULL, 0, NULL, - NULL, retval, NULL)); -} - -/* XXX syncs whole file */ -/*ARGSUSED*/ -int -netbsd_sys_fdatasync(p, v, retval) - struct proc *p; - void *v; - register_t *retval; -{ - struct netbsd_sys_fdatasync_args /* { - syscallarg(int) fd; - } */ *uap = v; - - return sys_fsync(p, uap, retval); -} - -/*ARGSUSED*/ -int -netbsd_sys_lchmod(p, v, retval) - struct proc *p; - void *v; - register_t *retval; -{ - register struct netbsd_sys_lchmod_args /* { - syscallarg(char *) path; - syscallarg(netbsd_mode_t) mode; - } */ *uap = v; - register struct vnode *vp; - struct vattr vattr; - int error; - struct nameidata nd; - - if (SCARG(uap, mode) & ~(S_IFMT | ALLPERMS)) - return (EINVAL); - - NDINIT(&nd, LOOKUP, NOFOLLOW, UIO_USERSPACE, SCARG(uap, path), p); - if ((error = namei(&nd)) != 0) - return (error); - vp = nd.ni_vp; - vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, p); - if (vp->v_mount->mnt_flag & MNT_RDONLY) - error = EROFS; - else { - VATTR_NULL(&vattr); - vattr.va_mode = SCARG(uap, mode) & ALLPERMS; - error = VOP_SETATTR(vp, &vattr, p->p_ucred, p); - } - vput(vp); - return (error); -} - -/*ARGSUSED*/ -int -netbsd_sys_lutimes(p, v, retval) - struct proc *p; - void *v; - register_t *retval; -{ - register struct netbsd_sys_lutimes_args /* { - syscallarg(const char *) path; - syscallarg(const struct timeval *) tptr; - } */ *uap = v; - register struct vnode *vp; - struct timeval tv[2]; - struct vattr vattr; - int error; - struct nameidata nd; - - VATTR_NULL(&vattr); - if (SCARG(uap, tptr) == NULL) { - microtime(&tv[0]); - tv[1] = tv[0]; - vattr.va_vaflags |= VA_UTIMES_NULL; - } else { - error = copyin((caddr_t)SCARG(uap, tptr), (caddr_t)tv, - sizeof (tv)); - if (error) - return (error); - /* XXX workaround timeval matching the VFS constant VNOVAL */ - if (tv[0].tv_sec == VNOVAL) - tv[0].tv_sec = VNOVAL - 1; - if (tv[1].tv_sec == VNOVAL) - tv[1].tv_sec = VNOVAL - 1; - } - NDINIT(&nd, LOOKUP, NOFOLLOW, UIO_USERSPACE, SCARG(uap, path), p); - if ((error = namei(&nd)) != 0) - return (error); - vp = nd.ni_vp; - vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, p); - if (vp->v_mount->mnt_flag & MNT_RDONLY) - error = EROFS; - else { - vattr.va_atime.tv_sec = tv[0].tv_sec; - vattr.va_atime.tv_nsec = tv[0].tv_usec * 1000; - vattr.va_mtime.tv_sec = tv[1].tv_sec; - vattr.va_mtime.tv_nsec = tv[1].tv_usec * 1000; - error = VOP_SETATTR(vp, &vattr, p->p_ucred, p); - } - vput(vp); - return (error); -} diff --git a/sys/compat/netbsd/netbsd_signal.c b/sys/compat/netbsd/netbsd_signal.c deleted file mode 100644 index 44c1fcc443c..00000000000 --- a/sys/compat/netbsd/netbsd_signal.c +++ /dev/null @@ -1,240 +0,0 @@ -/* $OpenBSD: netbsd_signal.c,v 1.7 2004/01/14 05:23:25 tedu 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 <compat/netbsd/netbsd_types.h> -#include <compat/netbsd/netbsd_signal.h> -#include <compat/netbsd/netbsd_syscallargs.h> - -static void netbsd_to_openbsd_sigaction(struct netbsd_sigaction *, - struct sigaction *); - -static void openbsd_to_netbsd_sigaction(struct sigaction *, - struct netbsd_sigaction *); - -static void -openbsd_to_netbsd_sigaction(obsa, nbsa) - struct sigaction *obsa; - struct netbsd_sigaction *nbsa; -{ - bzero(nbsa, sizeof(struct netbsd_sigaction)); - nbsa->netbsd_sa_handler = obsa->sa_handler; - bcopy(&obsa->sa_mask, &nbsa->netbsd_sa_mask.__bits[0], - sizeof(sigset_t)); - nbsa->netbsd_sa_flags = obsa->sa_flags; -} - -static void -netbsd_to_openbsd_sigaction(nbsa, obsa) - struct netbsd_sigaction *nbsa; - struct sigaction *obsa; -{ - obsa->sa_handler = nbsa->netbsd_sa_handler; - bcopy(&nbsa->netbsd_sa_mask.__bits[0], &obsa->sa_mask, - sizeof(sigset_t)); - obsa->sa_flags = nbsa->netbsd_sa_flags; -} - -/* ARGSUSED */ -int -netbsd_sys___sigaction14(p, v, retval) - struct proc *p; - void *v; - register_t *retval; -{ - register struct netbsd_sys___sigaction14_args /* { - syscallarg(int) signum; - syscallarg(struct netbsd_sigaction *) nsa; - syscallarg(struct netbsd_sigaction *) osa; - } */ *uap = v; - struct sigaction vec; - register struct sigaction *sa; - struct netbsd_sigaction nbsa; - register struct sigacts *ps = p->p_sigacts; - register int signum; - int bit, error; - - signum = SCARG(uap, signum); - if (signum <= 0 || signum >= NSIG || - (SCARG(uap, nsa) && (signum == SIGKILL || signum == SIGSTOP))) - return (EINVAL); - sa = &vec; - if (SCARG(uap, osa)) { - 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_netbsd_sigaction(sa, &nbsa); - error = copyout((caddr_t)&nbsa, (caddr_t)SCARG(uap, osa), - sizeof (struct netbsd_sigaction)); - if (error) - return (error); - } - if (SCARG(uap, nsa)) { - error = copyin((caddr_t)SCARG(uap, nsa), (caddr_t)&nbsa, - sizeof (struct netbsd_sigaction)); - if (error) - return (error); - netbsd_to_openbsd_sigaction(&nbsa, sa); - setsigvec(p, signum, sa); - } - return (0); -} - -/* ARGSUSED */ -int -netbsd_sys___sigpending14(p, v, retval) - struct proc *p; - void *v; - register_t *retval; -{ - register struct netbsd_sys___sigpending14_args /* { - netbsd_sigset_t *set; - } */ *uap = v; - netbsd_sigset_t nss; - - bcopy(&p->p_siglist, &nss.__bits[0], sizeof(sigset_t)); - return (copyout((caddr_t)&nss, (caddr_t)SCARG(uap, set), sizeof(nss))); -} - -int -netbsd_sys___sigprocmask14(p, v, retval) - register struct proc *p; - void *v; - register_t *retval; -{ - struct netbsd_sys___sigprocmask14_args /* { - syscallarg(int) how; - syscallarg(netbsd_sigset_t *) set; - syscallarg(netbsd_sigset_t *) oset; - } */ *uap = v; - netbsd_sigset_t nss, oss; - sigset_t obnss; - int error = 0; - - if (SCARG(uap, set)) { - error = copyin(SCARG(uap, set), &nss, sizeof(nss)); - if (error) - return (error); - } - if (SCARG(uap, oset)) { - bzero(&oss, sizeof(netbsd_sigset_t)); - bcopy(&p->p_sigmask, &oss.__bits[0], sizeof(sigset_t)); - error = copyout((caddr_t)&oss, (caddr_t)SCARG(uap, oset), - sizeof(netbsd_sigset_t)); - if (error) - return (error); - } - if (SCARG(uap, set)) { - bcopy(&nss.__bits[0], &obnss, sizeof(sigset_t)); - (void)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; - } - (void) spl0(); - } - return (error); -} - -int -netbsd_sys___sigsuspend14(p, v, retval) - register struct proc *p; - void *v; - register_t *retval; -{ - struct netbsd_sys___sigsuspend14_args /* { - syscallarg(netbsd_sigset_t *) set; - } */ *uap = v; - register struct sigacts *ps = p->p_sigacts; - netbsd_sigset_t nbset; - sigset_t obset; - - copyin(SCARG(uap, set), &nbset, sizeof(netbsd_sigset_t)); - bcopy(&nbset.__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/netbsd/netbsd_signal.h b/sys/compat/netbsd/netbsd_signal.h deleted file mode 100644 index 8158ef009ee..00000000000 --- a/sys/compat/netbsd/netbsd_signal.h +++ /dev/null @@ -1,57 +0,0 @@ -/* $OpenBSD: netbsd_signal.h,v 1.5 2004/01/14 05:23:25 tedu 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 _NETBSD_SYS_SIGNAL_H_ -#define _NETBSD_SYS_SIGNAL_H_ - - -typedef struct { - u_int32_t __bits[4]; -} netbsd_sigset_t; - -/* - * Signal vector "template" used in sigaction call. - */ -struct netbsd_sigaction { - void (*netbsd_sa_handler)(int);/* signal handler */ - netbsd_sigset_t netbsd_sa_mask; /* signal mask to apply */ - int netbsd_sa_flags; /* see signal options below */ -}; - -#endif /* !_NETBSD_SYS_SIGNAL_H_ */ diff --git a/sys/compat/netbsd/netbsd_stat.c b/sys/compat/netbsd/netbsd_stat.c deleted file mode 100644 index dc022272773..00000000000 --- a/sys/compat/netbsd/netbsd_stat.c +++ /dev/null @@ -1,266 +0,0 @@ -/* $OpenBSD: netbsd_stat.c,v 1.17 2004/07/09 23:52:02 millert 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.42 (Berkeley) 7/31/95 - */ - -#include <sys/param.h> -#include <sys/systm.h> -#include <sys/file.h> -#include <sys/filedesc.h> -#include <sys/proc.h> -#include <sys/socketvar.h> -#include <sys/stat.h> -#include <sys/pipe.h> -#include <sys/mount.h> -#include <sys/namei.h> -#include <sys/vnode.h> - -#include <sys/syscallargs.h> - -#include <compat/netbsd/netbsd_types.h> -#include <compat/netbsd/netbsd_stat.h> -#include <compat/netbsd/netbsd_signal.h> -#include <compat/netbsd/netbsd_syscallargs.h> -#include <compat/netbsd/netbsd_util.h> - -static void openbsd_to_netbsd_stat(struct stat *, struct netbsd_stat *); - -static void -openbsd_to_netbsd_stat(obst, nbst) - struct stat *obst; - struct netbsd_stat *nbst; -{ - bzero(nbst, sizeof(*nbst)); - nbst->st_dev = obst->st_dev; - nbst->st_ino = obst->st_ino; - nbst->st_mode = obst->st_mode; - nbst->st_nlink = obst->st_nlink; - nbst->st_uid = obst->st_uid; - nbst->st_gid = obst->st_gid; - nbst->st_rdev = obst->st_rdev; -#if !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE) - nbst->st_atimespec.tv_sec = obst->st_atimespec.tv_sec; - nbst->st_atimespec.tv_nsec = obst->st_atimespec.tv_nsec; - nbst->st_mtimespec.tv_sec = obst->st_mtimespec.tv_sec; - nbst->st_mtimespec.tv_nsec = obst->st_mtimespec.tv_nsec; - nbst->st_ctimespec.tv_sec = obst->st_ctimespec.tv_sec; - nbst->st_ctimespec.tv_nsec = obst->st_ctimespec.tv_nsec; -#else - nbst->st_atime = obst->st_atime; - nbst->st_atimensec = obst->st_atimensec; - nbst->st_mtime = obst->st_mtime; - nbst->st_mtimensec = obst->st_mtimensec; - nbst->st_ctime = obst->st_ctime; - nbst->st_ctimensec = obst->st_ctimensec; -#endif - nbst->st_size = obst->st_size; - nbst->st_blocks = obst->st_blocks; - nbst->st_blksize = obst->st_blksize; - nbst->st_flags = obst->st_flags; - nbst->st_gen = obst->st_gen; - bcopy(obst->st_qspare, nbst->st_qspare, sizeof(obst->st_qspare)); -} - -/* - * Get file status; this version follows links. - */ -/* ARGSUSED */ -int -netbsd_sys___stat13(p, v, retval) - struct proc *p; - void *v; - register_t *retval; -{ - register struct netbsd_sys___stat13_args /* { - syscallarg(char *) path; - syscallarg(struct netbsd_stat *) nsb; - } */ *uap = v; - struct netbsd_stat nsb; - struct stat sb; - int error; - struct nameidata nd; - caddr_t sg = stackgap_init(p->p_emul); - - NETBSD_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path)); - NDINIT(&nd, LOOKUP, FOLLOW | LOCKLEAF, UIO_USERSPACE, - SCARG(uap, path), p); - if ((error = namei(&nd)) != 0) - return (error); - error = vn_stat(nd.ni_vp, &sb, p); - vput(nd.ni_vp); - if (error) - return (error); - /* Don't let non-root see generation numbers (for NFS security) */ - if (suser(p, 0)) - sb.st_gen = 0; - openbsd_to_netbsd_stat(&sb, &nsb); - error = copyout(&nsb, SCARG(uap, ub), sizeof(nsb)); - return (error); -} - -/* - * Get file status; this version does not follow links. - */ -/* ARGSUSED */ -int -netbsd_sys___lstat13(p, v, retval) - struct proc *p; - void *v; - register_t *retval; -{ - register struct netbsd_sys___lstat13_args /* { - syscallarg(char *) path; - syscallarg(struct netbsd_stat *) ub; - } */ *uap = v; - struct netbsd_stat nsb; - struct stat sb; - int error; - struct nameidata nd; - caddr_t sg = stackgap_init(p->p_emul); - - NETBSD_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path)); - NDINIT(&nd, LOOKUP, NOFOLLOW | LOCKLEAF, UIO_USERSPACE, - SCARG(uap, path), p); - if ((error = namei(&nd)) != 0) - return (error); - error = vn_stat(nd.ni_vp, &sb, p); - vput(nd.ni_vp); - if (error) - return (error); - /* Don't let non-root see generation numbers (for NFS security) */ - if (suser(p, 0)) - sb.st_gen = 0; - openbsd_to_netbsd_stat(&sb, &nsb); - error = copyout(&nsb, SCARG(uap, ub), sizeof(nsb)); - return (error); -} - -/* - * Return status information about a file descriptor. - */ -/* ARGSUSED */ -int -netbsd_sys___fstat13(p, v, retval) - struct proc *p; - void *v; - register_t *retval; -{ - register struct netbsd_sys___fstat13_args /* { - syscallarg(int) fd; - syscallarg(struct netbsd_stat *) ub; - } */ *uap = v; - int fd = SCARG(uap, fd); - register struct filedesc *fdp = p->p_fd; - register struct file *fp; - struct netbsd_stat nsb; - struct stat sb; - int error; - - if ((fp = fd_getfile(fdp, fd)) == NULL) - return (EBADF); - - FREF(fp); - error = (*fp->f_ops->fo_stat)(fp, &sb, p); - FRELE(fp); - if (error) - return (error); - openbsd_to_netbsd_stat(&sb, &nsb); - error = copyout(&nsb, SCARG(uap, ub), sizeof(nsb)); - return (error); -} - -int -compat_43_netbsd_sys_stat(p, v, retval) - struct proc *p; - void *v; - register_t *retval; -{ - struct compat_43_netbsd_sys_stat_args /* { - syscallarg(char *) path; - syscallarg(struct stat43 *) ub; - } */ *uap = v; - caddr_t sg = stackgap_init(p->p_emul); - - NETBSD_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path)); - return compat_43_sys_stat(p, uap, retval); -} - -int -compat_43_netbsd_sys_lstat(p, v, retval) - struct proc *p; - void *v; - register_t *retval; -{ - struct compat_43_netbsd_sys_lstat_args /* { - syscallarg(char *) path; - syscallarg(struct stat43 *) ub; - } */ *uap = v; - caddr_t sg = stackgap_init(p->p_emul); - - NETBSD_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path)); - return compat_43_sys_lstat(p, uap, retval); -} - -int -netbsd_sys_stat(p, v, retval) - struct proc *p; - void *v; - register_t *retval; -{ - struct netbsd_sys_stat_args /* { - syscallarg(char *) path; - syscallarg(struct stat *) ub; - } */ *uap = v; - caddr_t sg = stackgap_init(p->p_emul); - - NETBSD_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path)); - return sys_stat(p, uap, retval); -} - -int -netbsd_sys_lstat(p, v, retval) - struct proc *p; - void *v; - register_t *retval; -{ - struct netbsd_sys_lstat_args /* { - syscallarg(char *) path; - syscallarg(struct stat *) ub; - } */ *uap = v; - caddr_t sg = stackgap_init(p->p_emul); - - NETBSD_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path)); - return sys_lstat(p, uap, retval); -} diff --git a/sys/compat/netbsd/netbsd_stat.h b/sys/compat/netbsd/netbsd_stat.h deleted file mode 100644 index a21f66a15de..00000000000 --- a/sys/compat/netbsd/netbsd_stat.h +++ /dev/null @@ -1,94 +0,0 @@ -/* $OpenBSD: netbsd_stat.h,v 1.6 2005/11/09 14:14:06 martin Exp $ */ - -/*- - * 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. - * - * @(#)stat.h 8.12 (Berkeley) 8/17/94 - */ - -/* - * On systems with 8 byte longs and 4 byte time_ts, padding the time_ts - * is required in order to have a consistent ABI. This is because the - * stat structure used to contain timespecs, which had different - * alignment constraints than a time_t and a long alone. The padding - * should be removed the next time the stat structure ABI is changed. - * (This will happen whenever we change to 8 byte time_t.) - */ -#if defined(__alpha__) /* XXX XXX XXX */ -#define __STATPAD(x) int x; -#else -#define __STATPAD(x) /* nothing */ -#endif - -struct netbsd_stat { - dev_t st_dev; /* inode's device */ - ino_t st_ino; /* inode's number */ - netbsd_mode_t st_mode; /* inode protection mode */ - netbsd_nlink_t st_nlink; /* number of hard links */ - uid_t st_uid; /* user ID of the file's owner */ - gid_t st_gid; /* group ID of the file's group */ - dev_t st_rdev; /* device type */ -#if !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE) - struct timespec st_atimespec;/* time of last access */ - struct timespec st_mtimespec;/* time of last data modification */ - struct timespec st_ctimespec;/* time of last file status change */ -#else - __STATPAD(__pad0) - time_t st_atime; /* time of last access */ - __STATPAD(__pad1) - long st_atimensec; /* nsec of last access */ - time_t st_mtime; /* time of last data modification */ - __STATPAD(__pad2) - long st_mtimensec; /* nsec of last data modification */ - time_t st_ctime; /* time of last file status change */ - __STATPAD(__pad3) - long st_ctimensec; /* nsec of last file status change */ -#endif - off_t st_size; /* file size, in bytes */ - netbsd_blkcnt_t st_blocks; /* blocks allocated for file */ - netbsd_blksize_t st_blksize; /* optimal blocksize for I/O */ - u_int32_t st_flags; /* user defined flags for file */ - u_int32_t st_gen; /* file generation number */ - int64_t st_qspare[2]; -}; - -#undef __STATPAD - -#if !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE) -#define st_atime st_atimespec.tv_sec -#define st_atimensec st_atimespec.tv_nsec -#define st_mtime st_mtimespec.tv_sec -#define st_mtimensec st_mtimespec.tv_nsec -#define st_ctime st_ctimespec.tv_sec -#define st_ctimensec st_ctimespec.tv_nsec -#endif diff --git a/sys/compat/netbsd/netbsd_syscall.h b/sys/compat/netbsd/netbsd_syscall.h deleted file mode 100644 index 529acbf5042..00000000000 --- a/sys/compat/netbsd/netbsd_syscall.h +++ /dev/null @@ -1,668 +0,0 @@ -/* $OpenBSD: netbsd_syscall.h,v 1.27 2006/09/22 15:30:44 pedro Exp $ */ - -/* - * System call numbers. - * - * DO NOT EDIT-- this file is automatically generated. - * created from; OpenBSD: syscalls.master,v 1.26 2006/09/22 15:29:57 pedro Exp - */ - -/* syscall: "syscall" ret: "int" args: "int" "..." */ -#define NETBSD_SYS_syscall 0 - -/* syscall: "exit" ret: "void" args: "int" */ -#define NETBSD_SYS_exit 1 - -/* syscall: "fork" ret: "int" args: */ -#define NETBSD_SYS_fork 2 - -/* syscall: "read" ret: "ssize_t" args: "int" "void *" "size_t" */ -#define NETBSD_SYS_read 3 - -/* syscall: "write" ret: "ssize_t" args: "int" "const void *" "size_t" */ -#define NETBSD_SYS_write 4 - -/* syscall: "open" ret: "int" args: "char *" "int" "..." */ -#define NETBSD_SYS_open 5 - -/* syscall: "close" ret: "int" args: "int" */ -#define NETBSD_SYS_close 6 - -/* syscall: "wait4" ret: "int" args: "int" "int *" "int" "struct rusage *" */ -#define NETBSD_SYS_wait4 7 - -/* syscall: "ocreat" ret: "int" args: "char *" "int" */ -#define NETBSD_SYS_ocreat 8 - -/* syscall: "link" ret: "int" args: "char *" "char *" */ -#define NETBSD_SYS_link 9 - -/* syscall: "unlink" ret: "int" args: "char *" */ -#define NETBSD_SYS_unlink 10 - - /* 11 is obsolete execv */ -/* syscall: "chdir" ret: "int" args: "char *" */ -#define NETBSD_SYS_chdir 12 - -/* syscall: "fchdir" ret: "int" args: "int" */ -#define NETBSD_SYS_fchdir 13 - -/* syscall: "mknod" ret: "int" args: "char *" "int" "dev_t" */ -#define NETBSD_SYS_mknod 14 - -/* syscall: "chmod" ret: "int" args: "char *" "int" */ -#define NETBSD_SYS_chmod 15 - -/* syscall: "chown" ret: "int" args: "char *" "uid_t" "gid_t" */ -#define NETBSD_SYS_chown 16 - -/* syscall: "break" ret: "int" args: "char *" */ -#define NETBSD_SYS_break 17 - -/* syscall: "getfsstat" ret: "int" args: "struct ostatfs *" "long" "int" */ -#define NETBSD_SYS_getfsstat 18 - -/* syscall: "olseek" ret: "long" args: "int" "long" "int" */ -#define NETBSD_SYS_olseek 19 - -/* syscall: "getpid" ret: "pid_t" args: */ -#define NETBSD_SYS_getpid 20 - -/* syscall: "mount" ret: "int" args: "const char *" "const char *" "int" "void *" */ -#define NETBSD_SYS_mount 21 - -/* syscall: "unmount" ret: "int" args: "char *" "int" */ -#define NETBSD_SYS_unmount 22 - -/* syscall: "setuid" ret: "int" args: "uid_t" */ -#define NETBSD_SYS_setuid 23 - -/* syscall: "getuid" ret: "uid_t" args: */ -#define NETBSD_SYS_getuid 24 - -/* syscall: "geteuid" ret: "uid_t" args: */ -#define NETBSD_SYS_geteuid 25 - -/* syscall: "ptrace" ret: "int" args: "int" "pid_t" "caddr_t" "int" */ -#define NETBSD_SYS_ptrace 26 - -/* syscall: "recvmsg" ret: "ssize_t" args: "int" "struct msghdr *" "int" */ -#define NETBSD_SYS_recvmsg 27 - -/* syscall: "sendmsg" ret: "ssize_t" args: "int" "const struct msghdr *" "int" */ -#define NETBSD_SYS_sendmsg 28 - -/* syscall: "recvfrom" ret: "ssize_t" args: "int" "void *" "size_t" "int" "struct sockaddr *" "socklen_t *" */ -#define NETBSD_SYS_recvfrom 29 - -/* syscall: "accept" ret: "int" args: "int" "struct sockaddr *" "socklen_t *" */ -#define NETBSD_SYS_accept 30 - -/* syscall: "getpeername" ret: "int" args: "int" "struct sockaddr *" "int *" */ -#define NETBSD_SYS_getpeername 31 - -/* syscall: "getsockname" ret: "int" args: "int" "struct sockaddr *" "socklen_t *" */ -#define NETBSD_SYS_getsockname 32 - -/* syscall: "access" ret: "int" args: "char *" "int" */ -#define NETBSD_SYS_access 33 - -/* syscall: "chflags" ret: "int" args: "char *" "u_int" */ -#define NETBSD_SYS_chflags 34 - -/* syscall: "fchflags" ret: "int" args: "int" "u_int" */ -#define NETBSD_SYS_fchflags 35 - -/* syscall: "sync" ret: "void" args: */ -#define NETBSD_SYS_sync 36 - -/* syscall: "kill" ret: "int" args: "int" "int" */ -#define NETBSD_SYS_kill 37 - -/* syscall: "stat43" ret: "int" args: "char *" "struct stat43 *" */ -#define NETBSD_SYS_stat43 38 - -/* syscall: "getppid" ret: "pid_t" args: */ -#define NETBSD_SYS_getppid 39 - -/* syscall: "lstat43" ret: "int" args: "char *" "struct stat43 *" */ -#define NETBSD_SYS_lstat43 40 - -/* syscall: "dup" ret: "int" args: "int" */ -#define NETBSD_SYS_dup 41 - -/* syscall: "opipe" ret: "int" args: */ -#define NETBSD_SYS_opipe 42 - -/* syscall: "getegid" ret: "gid_t" args: */ -#define NETBSD_SYS_getegid 43 - -/* syscall: "profil" ret: "int" args: "caddr_t" "size_t" "u_long" "u_int" */ -#define NETBSD_SYS_profil 44 - -/* syscall: "ktrace" ret: "int" args: "const char *" "int" "int" "pid_t" */ -#define NETBSD_SYS_ktrace 45 - -/* syscall: "sigaction" ret: "int" args: "int" "const struct sigaction *" "struct sigaction *" */ -#define NETBSD_SYS_sigaction 46 - -/* syscall: "getgid" ret: "gid_t" args: */ -#define NETBSD_SYS_getgid 47 - -/* syscall: "sigprocmask" ret: "int" args: "int" "sigset_t" */ -#define NETBSD_SYS_sigprocmask 48 - -/* syscall: "getlogin" ret: "int" args: "char *" "u_int" */ -#define NETBSD_SYS_getlogin 49 - -/* syscall: "setlogin" ret: "int" args: "const char *" */ -#define NETBSD_SYS_setlogin 50 - -/* syscall: "acct" ret: "int" args: "const char *" */ -#define NETBSD_SYS_acct 51 - -/* syscall: "sigpending" ret: "int" args: */ -#define NETBSD_SYS_sigpending 52 - -/* syscall: "osigaltstack" ret: "int" args: "const struct osigaltstack *" "struct osigaltstack *" */ -#define NETBSD_SYS_osigaltstack 53 - -/* syscall: "ioctl" ret: "int" args: "int" "u_long" "..." */ -#define NETBSD_SYS_ioctl 54 - -/* syscall: "reboot" ret: "int" args: "int" */ -#define NETBSD_SYS_reboot 55 - -/* syscall: "revoke" ret: "int" args: "char *" */ -#define NETBSD_SYS_revoke 56 - -/* syscall: "symlink" ret: "int" args: "char *" "char *" */ -#define NETBSD_SYS_symlink 57 - -/* syscall: "readlink" ret: "int" args: "char *" "char *" "size_t" */ -#define NETBSD_SYS_readlink 58 - -/* syscall: "execve" ret: "int" args: "char *" "char **" "char **" */ -#define NETBSD_SYS_execve 59 - -/* syscall: "umask" ret: "int" args: "int" */ -#define NETBSD_SYS_umask 60 - -/* syscall: "chroot" ret: "int" args: "char *" */ -#define NETBSD_SYS_chroot 61 - -/* syscall: "fstat43" ret: "int" args: "int" "struct stat43 *" */ -#define NETBSD_SYS_fstat43 62 - -/* syscall: "ogetkerninfo" ret: "int" args: "int" "char *" "int *" "int" */ -#define NETBSD_SYS_ogetkerninfo 63 - -/* syscall: "ogetpagesize" ret: "int" args: */ -#define NETBSD_SYS_ogetpagesize 64 - -/* syscall: "omsync" ret: "int" args: "caddr_t" "size_t" */ -#define NETBSD_SYS_omsync 65 - -/* syscall: "vfork" ret: "int" args: */ -#define NETBSD_SYS_vfork 66 - - /* 67 is obsolete vread */ - /* 68 is obsolete vwrite */ -/* syscall: "sbrk" ret: "int" args: "int" */ -#define NETBSD_SYS_sbrk 69 - -/* syscall: "sstk" ret: "int" args: "int" */ -#define NETBSD_SYS_sstk 70 - -/* syscall: "ommap" ret: "int" args: "caddr_t" "size_t" "int" "int" "int" "long" */ -#define NETBSD_SYS_ommap 71 - -/* syscall: "vadvise" ret: "int" args: "int" */ -#define NETBSD_SYS_vadvise 72 - -/* syscall: "munmap" ret: "int" args: "void *" "size_t" */ -#define NETBSD_SYS_munmap 73 - -/* syscall: "mprotect" ret: "int" args: "void *" "size_t" "int" */ -#define NETBSD_SYS_mprotect 74 - -/* syscall: "madvise" ret: "int" args: "void *" "size_t" "int" */ -#define NETBSD_SYS_madvise 75 - - /* 76 is obsolete vhangup */ - /* 77 is obsolete vlimit */ -/* syscall: "mincore" ret: "int" args: "void *" "size_t" "char *" */ -#define NETBSD_SYS_mincore 78 - -/* syscall: "getgroups" ret: "int" args: "int" "gid_t *" */ -#define NETBSD_SYS_getgroups 79 - -/* syscall: "setgroups" ret: "int" args: "int" "const gid_t *" */ -#define NETBSD_SYS_setgroups 80 - -/* syscall: "getpgrp" ret: "int" args: */ -#define NETBSD_SYS_getpgrp 81 - -/* syscall: "setpgid" ret: "int" args: "pid_t" "int" */ -#define NETBSD_SYS_setpgid 82 - -/* syscall: "setitimer" ret: "int" args: "int" "const struct itimerval *" "struct itimerval *" */ -#define NETBSD_SYS_setitimer 83 - -/* syscall: "owait" ret: "int" args: */ -#define NETBSD_SYS_owait 84 - -/* syscall: "swapon" ret: "int" args: "const char *" */ -#define NETBSD_SYS_swapon 85 - -/* syscall: "getitimer" ret: "int" args: "int" "struct itimerval *" */ -#define NETBSD_SYS_getitimer 86 - -/* syscall: "ogethostname" ret: "int" args: "char *" "u_int" */ -#define NETBSD_SYS_ogethostname 87 - -/* syscall: "osethostname" ret: "int" args: "char *" "u_int" */ -#define NETBSD_SYS_osethostname 88 - -/* syscall: "ogetdtablesize" ret: "int" args: */ -#define NETBSD_SYS_ogetdtablesize 89 - -/* syscall: "dup2" ret: "int" args: "int" "int" */ -#define NETBSD_SYS_dup2 90 - -/* syscall: "fcntl" ret: "int" args: "int" "int" "..." */ -#define NETBSD_SYS_fcntl 92 - -/* syscall: "select" ret: "int" args: "int" "fd_set *" "fd_set *" "fd_set *" "struct timeval *" */ -#define NETBSD_SYS_select 93 - -/* syscall: "fsync" ret: "int" args: "int" */ -#define NETBSD_SYS_fsync 95 - -/* syscall: "setpriority" ret: "int" args: "int" "int" "int" */ -#define NETBSD_SYS_setpriority 96 - -/* syscall: "socket" ret: "int" args: "int" "int" "int" */ -#define NETBSD_SYS_socket 97 - -/* syscall: "connect" ret: "int" args: "int" "const struct sockaddr *" "socklen_t" */ -#define NETBSD_SYS_connect 98 - -/* syscall: "oaccept" ret: "int" args: "int" "caddr_t" "int *" */ -#define NETBSD_SYS_oaccept 99 - -/* syscall: "getpriority" ret: "int" args: "int" "int" */ -#define NETBSD_SYS_getpriority 100 - -/* syscall: "osend" ret: "int" args: "int" "caddr_t" "int" "int" */ -#define NETBSD_SYS_osend 101 - -/* syscall: "orecv" ret: "int" args: "int" "caddr_t" "int" "int" */ -#define NETBSD_SYS_orecv 102 - -/* syscall: "sigreturn" ret: "int" args: "struct sigcontext *" */ -#define NETBSD_SYS_sigreturn 103 - -/* syscall: "bind" ret: "int" args: "int" "const struct sockaddr *" "socklen_t" */ -#define NETBSD_SYS_bind 104 - -/* syscall: "setsockopt" ret: "int" args: "int" "int" "int" "const void *" "socklen_t" */ -#define NETBSD_SYS_setsockopt 105 - -/* syscall: "listen" ret: "int" args: "int" "int" */ -#define NETBSD_SYS_listen 106 - - /* 107 is obsolete vtimes */ -/* syscall: "osigvec" ret: "int" args: "int" "struct sigvec *" "struct sigvec *" */ -#define NETBSD_SYS_osigvec 108 - -/* syscall: "osigblock" ret: "int" args: "int" */ -#define NETBSD_SYS_osigblock 109 - -/* syscall: "osigsetmask" ret: "int" args: "int" */ -#define NETBSD_SYS_osigsetmask 110 - -/* syscall: "sigsuspend" ret: "int" args: "int" */ -#define NETBSD_SYS_sigsuspend 111 - -/* syscall: "osigstack" ret: "int" args: "struct sigstack *" "struct sigstack *" */ -#define NETBSD_SYS_osigstack 112 - -/* syscall: "orecvmsg" ret: "int" args: "int" "struct omsghdr *" "int" */ -#define NETBSD_SYS_orecvmsg 113 - - /* 113 is obsolete orecvmsg */ -/* syscall: "osendmsg" ret: "int" args: "int" "caddr_t" "int" */ -#define NETBSD_SYS_osendmsg 114 - - /* 114 is obsolete orecvmsg */ - /* 115 is obsolete vtrace */ -/* syscall: "gettimeofday" ret: "int" args: "struct timeval *" "struct timezone *" */ -#define NETBSD_SYS_gettimeofday 116 - -/* syscall: "getrusage" ret: "int" args: "int" "struct rusage *" */ -#define NETBSD_SYS_getrusage 117 - -/* syscall: "getsockopt" ret: "int" args: "int" "int" "int" "void *" "socklen_t *" */ -#define NETBSD_SYS_getsockopt 118 - - /* 119 is obsolete resuba */ -/* syscall: "readv" ret: "ssize_t" args: "int" "const struct iovec *" "int" */ -#define NETBSD_SYS_readv 120 - -/* syscall: "writev" ret: "ssize_t" args: "int" "const struct iovec *" "int" */ -#define NETBSD_SYS_writev 121 - -/* syscall: "settimeofday" ret: "int" args: "const struct timeval *" "const struct timezone *" */ -#define NETBSD_SYS_settimeofday 122 - -/* syscall: "fchown" ret: "int" args: "int" "uid_t" "gid_t" */ -#define NETBSD_SYS_fchown 123 - -/* syscall: "fchmod" ret: "int" args: "int" "int" */ -#define NETBSD_SYS_fchmod 124 - -/* syscall: "orecvfrom" ret: "int" args: "int" "caddr_t" "size_t" "int" "caddr_t" "int *" */ -#define NETBSD_SYS_orecvfrom 125 - - /* 125 is obsolete orecvfrom */ -/* syscall: "setreuid" ret: "int" args: "uid_t" "uid_t" */ -#define NETBSD_SYS_setreuid 126 - -/* syscall: "setregid" ret: "int" args: "gid_t" "gid_t" */ -#define NETBSD_SYS_setregid 127 - -/* syscall: "rename" ret: "int" args: "char *" "char *" */ -#define NETBSD_SYS_rename 128 - -/* syscall: "otruncate" ret: "int" args: "char *" "long" */ -#define NETBSD_SYS_otruncate 129 - -/* syscall: "oftruncate" ret: "int" args: "int" "long" */ -#define NETBSD_SYS_oftruncate 130 - -/* syscall: "flock" ret: "int" args: "int" "int" */ -#define NETBSD_SYS_flock 131 - -/* syscall: "mkfifo" ret: "int" args: "char *" "int" */ -#define NETBSD_SYS_mkfifo 132 - -/* syscall: "sendto" ret: "ssize_t" args: "int" "const void *" "size_t" "int" "const struct sockaddr *" "socklen_t" */ -#define NETBSD_SYS_sendto 133 - -/* syscall: "shutdown" ret: "int" args: "int" "int" */ -#define NETBSD_SYS_shutdown 134 - -/* syscall: "socketpair" ret: "int" args: "int" "int" "int" "int *" */ -#define NETBSD_SYS_socketpair 135 - -/* syscall: "mkdir" ret: "int" args: "char *" "int" */ -#define NETBSD_SYS_mkdir 136 - -/* syscall: "rmdir" ret: "int" args: "char *" */ -#define NETBSD_SYS_rmdir 137 - -/* syscall: "utimes" ret: "int" args: "const char *" "const struct timeval *" */ -#define NETBSD_SYS_utimes 138 - - /* 139 is obsolete 4.2 sigreturn */ -/* syscall: "adjtime" ret: "int" args: "const struct timeval *" "struct timeval *" */ -#define NETBSD_SYS_adjtime 140 - -/* syscall: "ogetpeername" ret: "int" args: "int" "caddr_t" "int *" */ -#define NETBSD_SYS_ogetpeername 141 - -/* syscall: "ogethostid" ret: "int32_t" args: */ -#define NETBSD_SYS_ogethostid 142 - -/* syscall: "osethostid" ret: "int" args: "int32_t" */ -#define NETBSD_SYS_osethostid 143 - -/* syscall: "ogetrlimit" ret: "int" args: "u_int" "struct ogetrlimit *" */ -#define NETBSD_SYS_ogetrlimit 144 - -/* syscall: "osetrlimit" ret: "int" args: "u_int" "struct ogetrlimit *" */ -#define NETBSD_SYS_osetrlimit 145 - -/* syscall: "okillpg" ret: "int" args: "int" "int" */ -#define NETBSD_SYS_okillpg 146 - -/* syscall: "setsid" ret: "int" args: */ -#define NETBSD_SYS_setsid 147 - -/* syscall: "quotactl" ret: "int" args: "const char *" "int" "int" "char *" */ -#define NETBSD_SYS_quotactl 148 - -/* syscall: "oquota" ret: "int" args: */ -#define NETBSD_SYS_oquota 149 - -/* syscall: "ogetsockname" ret: "int" args: "int" "caddr_t" "int *" */ -#define NETBSD_SYS_ogetsockname 150 - -/* syscall: "nfssvc" ret: "int" args: "int" "void *" */ -#define NETBSD_SYS_nfssvc 155 - -/* syscall: "ogetdirentries" ret: "int" args: "int" "char *" "u_int" "long *" */ -#define NETBSD_SYS_ogetdirentries 156 - -/* syscall: "statfs" ret: "int" args: "char *" "struct ostatfs *" */ -#define NETBSD_SYS_statfs 157 - -/* syscall: "fstatfs" ret: "int" args: "int" "struct ostatfs *" */ -#define NETBSD_SYS_fstatfs 158 - -/* syscall: "getfh" ret: "int" args: "const char *" "fhandle_t *" */ -#define NETBSD_SYS_getfh 161 - -/* syscall: "ogetdomainname" ret: "int" args: "char *" "int" */ -#define NETBSD_SYS_ogetdomainname 162 - -/* syscall: "osetdomainname" ret: "int" args: "char *" "int" */ -#define NETBSD_SYS_osetdomainname 163 - -/* syscall: "ouname" ret: "int" args: "struct outsname *" */ -#define NETBSD_SYS_ouname 164 - -/* syscall: "sysarch" ret: "int" args: "int" "char *" */ -#define NETBSD_SYS_sysarch 165 - -/* syscall: "osemsys" ret: "int" args: "int" "int" "int" "int" "int" */ -#define NETBSD_SYS_osemsys 169 - -/* syscall: "omsgsys" ret: "int" args: "int" "int" "int" "int" "int" "int" */ -#define NETBSD_SYS_omsgsys 170 - -/* syscall: "shmsys" ret: "int" args: "int" "int" "int" "int" */ -#define NETBSD_SYS_shmsys 171 - -/* syscall: "pread" ret: "ssize_t" args: "int" "void *" "size_t" "int" "off_t" */ -#define NETBSD_SYS_pread 173 - -/* syscall: "pwrite" ret: "ssize_t" args: "int" "const void *" "size_t" "int" "off_t" */ -#define NETBSD_SYS_pwrite 174 - -/* syscall: "setgid" ret: "int" args: "gid_t" */ -#define NETBSD_SYS_setgid 181 - -/* syscall: "setegid" ret: "int" args: "gid_t" */ -#define NETBSD_SYS_setegid 182 - -/* syscall: "seteuid" ret: "int" args: "uid_t" */ -#define NETBSD_SYS_seteuid 183 - -/* syscall: "stat" ret: "int" args: "char *" "struct stat35 *" */ -#define NETBSD_SYS_stat 188 - -/* syscall: "fstat" ret: "int" args: "int" "struct stat35 *" */ -#define NETBSD_SYS_fstat 189 - -/* syscall: "lstat" ret: "int" args: "char *" "struct stat35 *" */ -#define NETBSD_SYS_lstat 190 - -/* syscall: "pathconf" ret: "long" args: "char *" "int" */ -#define NETBSD_SYS_pathconf 191 - -/* syscall: "fpathconf" ret: "long" args: "int" "int" */ -#define NETBSD_SYS_fpathconf 192 - -/* syscall: "swapctl" ret: "int" args: "int" "const void *" "int" */ -#define NETBSD_SYS_swapctl 193 - -/* syscall: "getrlimit" ret: "int" args: "int" "struct rlimit *" */ -#define NETBSD_SYS_getrlimit 194 - -/* syscall: "setrlimit" ret: "int" args: "int" "const struct rlimit *" */ -#define NETBSD_SYS_setrlimit 195 - -/* syscall: "getdirentries" ret: "int" args: "int" "char *" "int" "long *" */ -#define NETBSD_SYS_getdirentries 196 - -/* syscall: "mmap" ret: "void *" args: "void *" "size_t" "int" "int" "int" "long" "off_t" */ -#define NETBSD_SYS_mmap 197 - -/* syscall: "__syscall" ret: "quad_t" args: "quad_t" "..." */ -#define NETBSD_SYS___syscall 198 - -/* syscall: "lseek" ret: "off_t" args: "int" "int" "off_t" "int" */ -#define NETBSD_SYS_lseek 199 - -/* syscall: "truncate" ret: "int" args: "char *" "int" "off_t" */ -#define NETBSD_SYS_truncate 200 - -/* syscall: "ftruncate" ret: "int" args: "int" "int" "off_t" */ -#define NETBSD_SYS_ftruncate 201 - -/* syscall: "__sysctl" ret: "int" args: "int *" "u_int" "void *" "size_t *" "void *" "size_t" */ -#define NETBSD_SYS___sysctl 202 - -/* syscall: "mlock" ret: "int" args: "const void *" "size_t" */ -#define NETBSD_SYS_mlock 203 - -/* syscall: "munlock" ret: "int" args: "const void *" "size_t" */ -#define NETBSD_SYS_munlock 204 - -/* syscall: "futimes" ret: "int" args: "int" "const struct timeval *" */ -#define NETBSD_SYS_futimes 206 - -/* syscall: "getpgid" ret: "int" args: "pid_t" */ -#define NETBSD_SYS_getpgid 207 - -/* syscall: "xfspioctl" ret: "int" args: "int" "char *" "int" "struct ViceIoctl *" "int" */ -#define NETBSD_SYS_xfspioctl 208 - -/* syscall: "poll" ret: "int" args: "struct pollfd *" "unsigned long" "int" */ -#define NETBSD_SYS_poll 209 - -/* syscall: "__osemctl" ret: "int" args: "int" "int" "int" "union semun *" */ -#define NETBSD_SYS___osemctl 220 - -/* syscall: "semget" ret: "int" args: "key_t" "int" "int" */ -#define NETBSD_SYS_semget 221 - -/* syscall: "semop" ret: "int" args: "int" "struct sembuf *" "u_int" */ -#define NETBSD_SYS_semop 222 - - /* 223 is obsolete sys_semconfig */ -/* syscall: "omsgctl" ret: "int" args: "int" "int" "struct omsqid_ds *" */ -#define NETBSD_SYS_omsgctl 224 - -/* syscall: "msgget" ret: "int" args: "key_t" "int" */ -#define NETBSD_SYS_msgget 225 - -/* syscall: "msgsnd" ret: "int" args: "int" "const void *" "size_t" "int" */ -#define NETBSD_SYS_msgsnd 226 - -/* syscall: "msgrcv" ret: "int" args: "int" "void *" "size_t" "long" "int" */ -#define NETBSD_SYS_msgrcv 227 - -/* syscall: "shmat" ret: "void *" args: "int" "const void *" "int" */ -#define NETBSD_SYS_shmat 228 - -/* syscall: "oshmctl" ret: "int" args: "int" "int" "struct oshmid_ds *" */ -#define NETBSD_SYS_oshmctl 229 - -/* syscall: "shmdt" ret: "int" args: "const void *" */ -#define NETBSD_SYS_shmdt 230 - -/* syscall: "shmget" ret: "int" args: "key_t" "int" "int" */ -#define NETBSD_SYS_shmget 231 - -/* syscall: "clock_gettime" ret: "int" args: "clockid_t" "struct timespec *" */ -#define NETBSD_SYS_clock_gettime 232 - -/* syscall: "clock_settime" ret: "int" args: "clockid_t" "const struct timespec *" */ -#define NETBSD_SYS_clock_settime 233 - -/* syscall: "clock_getres" ret: "int" args: "clockid_t" "struct timespec *" */ -#define NETBSD_SYS_clock_getres 234 - -/* syscall: "nanosleep" ret: "int" args: "const struct timespec *" "struct timespec *" */ -#define NETBSD_SYS_nanosleep 240 - -/* syscall: "fdatasync" ret: "int" args: "int" */ -#define NETBSD_SYS_fdatasync 241 - -/* syscall: "getdents" ret: "int" args: "int" "char *" "size_t" */ -#define NETBSD_SYS_getdents 272 - -/* syscall: "minherit" ret: "int" args: "void *" "size_t" "int" */ -#define NETBSD_SYS_minherit 273 - -/* syscall: "lchmod" ret: "int" args: "const char *" "netbsd_mode_t" */ -#define NETBSD_SYS_lchmod 274 - -/* syscall: "lchown" ret: "int" args: "const char *" "uid_t" "gid_t" */ -#define NETBSD_SYS_lchown 275 - -/* syscall: "lutimes" ret: "int" args: "const char *" "const struct timeval *" */ -#define NETBSD_SYS_lutimes 276 - -/* syscall: "msync" ret: "int" args: "void *" "size_t" "int" */ -#define NETBSD_SYS_msync 277 - -/* syscall: "__stat13" ret: "int" args: "char *" "struct netbsd_stat *" */ -#define NETBSD_SYS___stat13 278 - -/* syscall: "__fstat13" ret: "int" args: "int" "struct netbsd_stat *" */ -#define NETBSD_SYS___fstat13 279 - -/* syscall: "__lstat13" ret: "int" args: "char *" "struct netbsd_stat *" */ -#define NETBSD_SYS___lstat13 280 - -/* syscall: "sigaltstack" ret: "int" args: "const struct sigaltstack *" "struct sigaltstack *" */ -#define NETBSD_SYS_sigaltstack 281 - -/* syscall: "__vfork14" ret: "int" args: */ -#define NETBSD_SYS___vfork14 282 - -/* syscall: "getsid" ret: "int" args: "pid_t" */ -#define NETBSD_SYS_getsid 286 - -/* syscall: "preadv" ret: "ssize_t" args: "int" "const struct iovec *" "int" "int" "off_t" */ -#define NETBSD_SYS_preadv 289 - -/* syscall: "pwritev" ret: "ssize_t" args: "int" "const struct iovec *" "int" "int" "off_t" */ -#define NETBSD_SYS_pwritev 290 - -/* syscall: "__sigaction14" ret: "int" args: "int" "const struct netbsd_sigaction *" "struct netbsd_sigaction *" */ -#define NETBSD_SYS___sigaction14 291 - -/* syscall: "__sigpending14" ret: "int" args: "netbsd_sigset_t *" */ -#define NETBSD_SYS___sigpending14 292 - -/* syscall: "__sigprocmask14" ret: "int" args: "int" "const netbsd_sigset_t *" "netbsd_sigset_t *" */ -#define NETBSD_SYS___sigprocmask14 293 - -/* syscall: "__sigsuspend14" ret: "int" args: "const netbsd_sigset_t *" */ -#define NETBSD_SYS___sigsuspend14 294 - -/* syscall: "__sigreturn14" ret: "int" args: "struct netbsd_sigcontext *" */ -#define NETBSD_SYS___sigreturn14 295 - -/* syscall: "__getcwd" ret: "int" args: "char *" "size_t" */ -#define NETBSD_SYS___getcwd 296 - -/* syscall: "issetugid" ret: "int" args: */ -#define NETBSD_SYS_issetugid 305 - -#define NETBSD_SYS_MAXSYSCALL 306 diff --git a/sys/compat/netbsd/netbsd_syscallargs.h b/sys/compat/netbsd/netbsd_syscallargs.h deleted file mode 100644 index f25dad23555..00000000000 --- a/sys/compat/netbsd/netbsd_syscallargs.h +++ /dev/null @@ -1,500 +0,0 @@ -/* $OpenBSD: netbsd_syscallargs.h,v 1.28 2006/09/22 15:30:44 pedro Exp $ */ - -/* - * System call argument lists. - * - * DO NOT EDIT-- this file is automatically generated. - * created from; OpenBSD: syscalls.master,v 1.26 2006/09/22 15:29:57 pedro 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 netbsd_sys_open_args { - syscallarg(char *) path; - syscallarg(int) flags; - syscallarg(int) mode; -}; - -struct compat_43_netbsd_sys_creat_args { - syscallarg(char *) path; - syscallarg(int) mode; -}; - -struct netbsd_sys_link_args { - syscallarg(char *) path; - syscallarg(char *) link; -}; - -struct netbsd_sys_unlink_args { - syscallarg(char *) path; -}; - -struct netbsd_sys_chdir_args { - syscallarg(char *) path; -}; - -struct netbsd_sys_mknod_args { - syscallarg(char *) path; - syscallarg(int) mode; - syscallarg(dev_t) dev; -}; - -struct netbsd_sys_chmod_args { - syscallarg(char *) path; - syscallarg(int) mode; -}; - -struct netbsd_sys_chown_args { - syscallarg(char *) path; - syscallarg(uid_t) uid; - syscallarg(gid_t) gid; -}; - -struct netbsd_sys_unmount_args { - syscallarg(char *) path; - syscallarg(int) flags; -}; - -struct netbsd_sys_access_args { - syscallarg(char *) path; - syscallarg(int) flags; -}; - -struct netbsd_sys_chflags_args { - syscallarg(char *) path; - syscallarg(u_int) flags; -}; - -struct compat_43_netbsd_sys_stat_args { - syscallarg(char *) path; - syscallarg(struct stat43 *) ub; -}; - -struct compat_43_netbsd_sys_lstat_args { - syscallarg(char *) path; - syscallarg(struct stat43 *) ub; -}; - -struct netbsd_sys_revoke_args { - syscallarg(char *) path; -}; - -struct netbsd_sys_symlink_args { - syscallarg(char *) path; - syscallarg(char *) link; -}; - -struct netbsd_sys_readlink_args { - syscallarg(char *) path; - syscallarg(char *) buf; - syscallarg(size_t) count; -}; - -struct netbsd_sys_execve_args { - syscallarg(char *) path; - syscallarg(char **) argp; - syscallarg(char **) envp; -}; - -struct netbsd_sys_chroot_args { - syscallarg(char *) path; -}; - -struct netbsd_sys_rename_args { - syscallarg(char *) from; - syscallarg(char *) to; -}; - -struct compat_43_netbsd_sys_truncate_args { - syscallarg(char *) path; - syscallarg(long) length; -}; - -struct netbsd_sys_mkfifo_args { - syscallarg(char *) path; - syscallarg(int) mode; -}; - -struct netbsd_sys_mkdir_args { - syscallarg(char *) path; - syscallarg(int) mode; -}; - -struct netbsd_sys_rmdir_args { - syscallarg(char *) path; -}; - -struct netbsd_sys_stat_args { - syscallarg(char *) path; - syscallarg(struct stat35 *) ub; -}; - -struct netbsd_sys_lstat_args { - syscallarg(char *) path; - syscallarg(struct stat35 *) ub; -}; - -struct netbsd_sys_pathconf_args { - syscallarg(char *) path; - syscallarg(int) name; -}; - -struct netbsd_sys_truncate_args { - syscallarg(char *) path; - syscallarg(int) pad; - syscallarg(off_t) length; -}; - -struct netbsd_sys_fdatasync_args { - syscallarg(int) fd; -}; - -struct netbsd_sys_getdents_args { - syscallarg(int) fd; - syscallarg(char *) buf; - syscallarg(size_t) count; -}; - -struct netbsd_sys_lchmod_args { - syscallarg(const char *) path; - syscallarg(netbsd_mode_t) mode; -}; - -struct netbsd_sys_lutimes_args { - syscallarg(const char *) path; - syscallarg(const struct timeval *) tptr; -}; - -struct netbsd_sys___stat13_args { - syscallarg(char *) path; - syscallarg(struct netbsd_stat *) ub; -}; - -struct netbsd_sys___fstat13_args { - syscallarg(int) fd; - syscallarg(struct netbsd_stat *) ub; -}; - -struct netbsd_sys___lstat13_args { - syscallarg(char *) path; - syscallarg(struct netbsd_stat *) ub; -}; - -struct netbsd_sys___sigaction14_args { - syscallarg(int) signum; - syscallarg(const struct netbsd_sigaction *) nsa; - syscallarg(struct netbsd_sigaction *) osa; -}; - -struct netbsd_sys___sigpending14_args { - syscallarg(netbsd_sigset_t *) set; -}; - -struct netbsd_sys___sigprocmask14_args { - syscallarg(int) how; - syscallarg(const netbsd_sigset_t *) set; - syscallarg(netbsd_sigset_t *) oset; -}; - -struct netbsd_sys___sigsuspend14_args { - syscallarg(const netbsd_sigset_t *) set; -}; - -struct netbsd_sys___sigreturn14_args { - syscallarg(struct netbsd_sigcontext *) sigcntxp; -}; - -struct netbsd_sys___getcwd_args { - syscallarg(char *) bufp; - syscallarg(size_t) length; -}; - -/* - * System call prototypes. - */ - -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 netbsd_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_netbsd_sys_creat(struct proc *, void *, register_t *); -int netbsd_sys_link(struct proc *, void *, register_t *); -int netbsd_sys_unlink(struct proc *, void *, register_t *); -int netbsd_sys_chdir(struct proc *, void *, register_t *); -int sys_fchdir(struct proc *, void *, register_t *); -int netbsd_sys_mknod(struct proc *, void *, register_t *); -int netbsd_sys_chmod(struct proc *, void *, register_t *); -int netbsd_sys_chown(struct proc *, void *, register_t *); -int sys_obreak(struct proc *, void *, register_t *); -int compat_25_sys_getfsstat(struct proc *, void *, register_t *); -int sys_lseek(struct proc *, void *, register_t *); -int sys_getpid(struct proc *, void *, register_t *); -int sys_mount(struct proc *, void *, register_t *); -int netbsd_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 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 netbsd_sys_access(struct proc *, void *, register_t *); -int netbsd_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_netbsd_sys_stat(struct proc *, void *, register_t *); -int sys_getppid(struct proc *, void *, register_t *); -int compat_43_netbsd_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_osigaltstack(struct proc *, void *, register_t *); -int sys_ioctl(struct proc *, void *, register_t *); -int sys_reboot(struct proc *, void *, register_t *); -int netbsd_sys_revoke(struct proc *, void *, register_t *); -int netbsd_sys_symlink(struct proc *, void *, register_t *); -int netbsd_sys_readlink(struct proc *, void *, register_t *); -int netbsd_sys_execve(struct proc *, void *, register_t *); -int sys_umask(struct proc *, void *, register_t *); -int netbsd_sys_chroot(struct proc *, void *, register_t *); -int 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 compat_25_sys_omsync(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 sys_mmap(struct proc *, void *, register_t *); -int sys_ovadvise(struct proc *, void *, register_t *); -int sys_munmap(struct proc *, void *, register_t *); -int sys_mprotect(struct proc *, void *, register_t *); -int 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 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 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 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 *); -#ifdef MSG_COMPAT -int compat_43_sys_recvmsg(struct proc *, void *, register_t *); -#else -#endif -#ifdef MSG_COMPAT -int compat_43_sys_sendmsg(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 *); -#ifdef MSG_COMPAT -int compat_43_sys_recvfrom(struct proc *, void *, register_t *); -#else -#endif -int sys_setreuid(struct proc *, void *, register_t *); -int sys_setregid(struct proc *, void *, register_t *); -int netbsd_sys_rename(struct proc *, void *, register_t *); -int compat_43_netbsd_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 netbsd_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 netbsd_sys_mkdir(struct proc *, void *, register_t *); -int netbsd_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 compat_25_sys_statfs(struct proc *, void *, register_t *); -int compat_25_sys_fstatfs(struct proc *, void *, register_t *); -#if defined(NFSCLIENT) || defined(NFSSERVER) -int 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_09_sys_uname(struct proc *, void *, register_t *); -int sys_sysarch(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 netbsd_sys_stat(struct proc *, void *, register_t *); -int sys_fstat(struct proc *, void *, register_t *); -int netbsd_sys_lstat(struct proc *, void *, register_t *); -int netbsd_sys_pathconf(struct proc *, void *, register_t *); -int sys_fpathconf(struct proc *, void *, register_t *); -int sys_swapctl(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 sys_mmap(struct proc *, void *, register_t *); -int sys_lseek(struct proc *, void *, register_t *); -int netbsd_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_futimes(struct proc *, void *, register_t *); -int sys_getpgid(struct proc *, void *, register_t *); -int sys_xfspioctl(struct proc *, void *, register_t *); -int sys_poll(struct proc *, void *, register_t *); -#ifdef LKM -int sys_lkmnosys(struct proc *, void *, register_t *); -int sys_lkmnosys(struct proc *, void *, register_t *); -int sys_lkmnosys(struct proc *, void *, register_t *); -int sys_lkmnosys(struct proc *, void *, register_t *); -int sys_lkmnosys(struct proc *, void *, register_t *); -int sys_lkmnosys(struct proc *, void *, register_t *); -int sys_lkmnosys(struct proc *, void *, register_t *); -int sys_lkmnosys(struct proc *, void *, register_t *); -int sys_lkmnosys(struct proc *, void *, register_t *); -int sys_lkmnosys(struct proc *, void *, register_t *); -#else /* !LKM */ -#endif /* !LKM */ -#ifdef SYSVSEM -int compat_23_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 compat_23_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 compat_23_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_clock_settime(struct proc *, void *, register_t *); -int sys_clock_getres(struct proc *, void *, register_t *); -int sys_nanosleep(struct proc *, void *, register_t *); -int netbsd_sys_fdatasync(struct proc *, void *, register_t *); -int netbsd_sys_getdents(struct proc *, void *, register_t *); -int sys_minherit(struct proc *, void *, register_t *); -int netbsd_sys_lchmod(struct proc *, void *, register_t *); -int sys_lchown(struct proc *, void *, register_t *); -int netbsd_sys_lutimes(struct proc *, void *, register_t *); -int sys_msync(struct proc *, void *, register_t *); -int netbsd_sys___stat13(struct proc *, void *, register_t *); -int netbsd_sys___fstat13(struct proc *, void *, register_t *); -int netbsd_sys___lstat13(struct proc *, void *, register_t *); -int sys_sigaltstack(struct proc *, void *, register_t *); -int netbsd_sys___vfork14(struct proc *, void *, register_t *); -int sys_getsid(struct proc *, void *, register_t *); -#ifdef KTRACE -#else -#endif -int sys_preadv(struct proc *, void *, register_t *); -int sys_pwritev(struct proc *, void *, register_t *); -int netbsd_sys___sigaction14(struct proc *, void *, register_t *); -int netbsd_sys___sigpending14(struct proc *, void *, register_t *); -int netbsd_sys___sigprocmask14(struct proc *, void *, register_t *); -int netbsd_sys___sigsuspend14(struct proc *, void *, register_t *); -int netbsd_sys___sigreturn14(struct proc *, void *, register_t *); -int netbsd_sys___getcwd(struct proc *, void *, register_t *); -int sys_issetugid(struct proc *, void *, register_t *); diff --git a/sys/compat/netbsd/netbsd_syscalls.c b/sys/compat/netbsd/netbsd_syscalls.c deleted file mode 100644 index 1a2bd72b50c..00000000000 --- a/sys/compat/netbsd/netbsd_syscalls.c +++ /dev/null @@ -1,399 +0,0 @@ -/* $OpenBSD: netbsd_syscalls.c,v 1.27 2006/09/22 15:30:44 pedro Exp $ */ - -/* - * System call names. - * - * DO NOT EDIT-- this file is automatically generated. - * created from; OpenBSD: syscalls.master,v 1.26 2006/09/22 15:29:57 pedro Exp - */ - -char *netbsd_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 */ - "osigaltstack", /* 53 = osigaltstack */ - "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 */ - "omsync", /* 65 = omsync */ - "vfork", /* 66 = vfork */ - "#67 (obsolete vread)", /* 67 = obsolete vread */ - "#68 (obsolete vwrite)", /* 68 = obsolete vwrite */ - "sbrk", /* 69 = sbrk */ - "sstk", /* 70 = sstk */ - "ommap", /* 71 = ommap */ - "vadvise", /* 72 = 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 */ -#ifdef MSG_COMPAT - "orecvmsg", /* 113 = orecvmsg */ -#else - "#113 (obsolete orecvmsg)", /* 113 = obsolete orecvmsg */ -#endif -#ifdef MSG_COMPAT - "osendmsg", /* 114 = osendmsg */ -#else - "#114 (obsolete orecvmsg)", /* 114 = obsolete orecvmsg */ -#endif - "#115 (obsolete vtrace)", /* 115 = obsolete vtrace */ - "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 */ -#ifdef MSG_COMPAT - "orecvfrom", /* 125 = orecvfrom */ -#else - "#125 (obsolete orecvfrom)", /* 125 = obsolete orecvfrom */ -#endif - "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)", /* 151 = unimplemented */ - "#152 (unimplemented)", /* 152 = unimplemented */ - "#153 (unimplemented)", /* 153 = unimplemented */ - "#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 */ -#if defined(NFSCLIENT) || defined(NFSSERVER) - "getfh", /* 161 = getfh */ -#else - "#161 (unimplemented getfh)", /* 161 = unimplemented getfh */ -#endif - "ogetdomainname", /* 162 = ogetdomainname */ - "osetdomainname", /* 163 = osetdomainname */ - "ouname", /* 164 = ouname */ - "sysarch", /* 165 = sysarch */ - "#166 (unimplemented)", /* 166 = unimplemented */ - "#167 (unimplemented)", /* 167 = unimplemented */ - "#168 (unimplemented)", /* 168 = unimplemented */ -#if defined(SYSVSEM) && !defined(alpha) - "osemsys", /* 169 = osemsys */ -#else - "#169 (unimplemented 1.0 semsys)", /* 169 = unimplemented 1.0 semsys */ -#endif -#if defined(SYSVMSG) && !defined(alpha) - "omsgsys", /* 170 = omsgsys */ -#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 ntp_gettime)", /* 175 = unimplemented ntp_gettime */ - "#176 (unimplemented ntp_adjtime)", /* 176 = unimplemented ntp_adjtime */ - "#177 (unimplemented)", /* 177 = unimplemented */ - "#178 (unimplemented)", /* 178 = unimplemented */ - "#179 (unimplemented)", /* 179 = unimplemented */ - "#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 */ - "swapctl", /* 193 = swapctl */ - "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 */ - "futimes", /* 206 = futimes */ - "getpgid", /* 207 = getpgid */ - "xfspioctl", /* 208 = xfspioctl */ - "poll", /* 209 = poll */ -#ifdef LKM - "lkmnosys", /* 210 = lkmnosys */ - "lkmnosys", /* 211 = lkmnosys */ - "lkmnosys", /* 212 = lkmnosys */ - "lkmnosys", /* 213 = lkmnosys */ - "lkmnosys", /* 214 = lkmnosys */ - "lkmnosys", /* 215 = lkmnosys */ - "lkmnosys", /* 216 = lkmnosys */ - "lkmnosys", /* 217 = lkmnosys */ - "lkmnosys", /* 218 = lkmnosys */ - "lkmnosys", /* 219 = lkmnosys */ -#else /* !LKM */ - "#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 */ -#endif /* !LKM */ -#ifdef SYSVSEM - "__osemctl", /* 220 = __osemctl */ - "semget", /* 221 = semget */ - "semop", /* 222 = semop */ - "#223 (obsolete sys_semconfig)", /* 223 = obsolete sys_semconfig */ -#else - "#220 (unimplemented semctl)", /* 220 = unimplemented semctl */ - "#221 (unimplemented semget)", /* 221 = unimplemented semget */ - "#222 (unimplemented semop)", /* 222 = unimplemented semop */ - "#223 (unimplemented semconfig)", /* 223 = unimplemented semconfig */ -#endif -#ifdef SYSVMSG - "omsgctl", /* 224 = omsgctl */ - "msgget", /* 225 = msgget */ - "msgsnd", /* 226 = msgsnd */ - "msgrcv", /* 227 = msgrcv */ -#else - "#224 (unimplemented msgctl)", /* 224 = unimplemented msgctl */ - "#225 (unimplemented msgget)", /* 225 = unimplemented msgget */ - "#226 (unimplemented msgsnd)", /* 226 = unimplemented msgsnd */ - "#227 (unimplemented msgrcv)", /* 227 = unimplemented msgrcv */ -#endif -#ifdef SYSVSHM - "shmat", /* 228 = shmat */ - "oshmctl", /* 229 = oshmctl */ - "shmdt", /* 230 = shmdt */ - "shmget", /* 231 = shmget */ -#else - "#228 (unimplemented shmat)", /* 228 = unimplemented shmat */ - "#229 (unimplemented shmctl)", /* 229 = unimplemented shmctl */ - "#230 (unimplemented shmdt)", /* 230 = unimplemented shmdt */ - "#231 (unimplemented shmget)", /* 231 = unimplemented shmget */ -#endif - "clock_gettime", /* 232 = clock_gettime */ - "clock_settime", /* 233 = clock_settime */ - "clock_getres", /* 234 = clock_getres */ - "#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 */ - "fdatasync", /* 241 = fdatasync */ - "#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 */ - "#250 (unimplemented)", /* 250 = unimplemented */ - "#251 (unimplemented)", /* 251 = unimplemented */ - "#252 (unimplemented)", /* 252 = unimplemented */ - "#253 (unimplemented)", /* 253 = unimplemented */ - "#254 (unimplemented)", /* 254 = unimplemented */ - "#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 */ - "minherit", /* 273 = minherit */ - "lchmod", /* 274 = lchmod */ - "lchown", /* 275 = lchown */ - "lutimes", /* 276 = lutimes */ - "msync", /* 277 = msync */ - "__stat13", /* 278 = __stat13 */ - "__fstat13", /* 279 = __fstat13 */ - "__lstat13", /* 280 = __lstat13 */ - "sigaltstack", /* 281 = sigaltstack */ - "__vfork14", /* 282 = __vfork14 */ - "#283 (unimplemented)", /* 283 = unimplemented */ - "#284 (unimplemented)", /* 284 = unimplemented */ - "#285 (unimplemented)", /* 285 = unimplemented */ - "getsid", /* 286 = getsid */ - "#287 (unimplemented)", /* 287 = unimplemented */ -#ifdef KTRACE - "#288 (unimplemented)", /* 288 = unimplemented */ -#else - "#288 (unimplemented)", /* 288 = unimplemented */ -#endif - "preadv", /* 289 = preadv */ - "pwritev", /* 290 = pwritev */ - "__sigaction14", /* 291 = __sigaction14 */ - "__sigpending14", /* 292 = __sigpending14 */ - "__sigprocmask14", /* 293 = __sigprocmask14 */ - "__sigsuspend14", /* 294 = __sigsuspend14 */ - "__sigreturn14", /* 295 = __sigreturn14 */ - "__getcwd", /* 296 = __getcwd */ - "#297 (unimplemented)", /* 297 = unimplemented */ - "#298 (unimplemented)", /* 298 = unimplemented */ - "#299 (unimplemented)", /* 299 = unimplemented */ - "#300 (unimplemented)", /* 300 = unimplemented */ - "#301 (unimplemented)", /* 301 = unimplemented */ - "#302 (unimplemented)", /* 302 = unimplemented */ - "#303 (unimplemented)", /* 303 = unimplemented */ - "#304 (unimplemented)", /* 304 = unimplemented */ - "issetugid", /* 305 = issetugid */ -}; diff --git a/sys/compat/netbsd/netbsd_sysent.c b/sys/compat/netbsd/netbsd_sysent.c deleted file mode 100644 index 22c070b327e..00000000000 --- a/sys/compat/netbsd/netbsd_sysent.c +++ /dev/null @@ -1,754 +0,0 @@ -/* $OpenBSD: netbsd_sysent.c,v 1.27 2006/09/22 15:30:44 pedro Exp $ */ - -/* - * System call switch table. - * - * DO NOT EDIT-- this file is automatically generated. - * created from; OpenBSD: syscalls.master,v 1.26 2006/09/22 15:29:57 pedro Exp - */ - -#include <sys/param.h> -#include <sys/systm.h> -#include <sys/signal.h> -#include <sys/mount.h> -#include <sys/syscallargs.h> -#include <sys/poll.h> -#include <compat/netbsd/netbsd_types.h> -#include <compat/netbsd/netbsd_stat.h> -#include <compat/netbsd/netbsd_signal.h> -#include <compat/netbsd/netbsd_syscallargs.h> -#include <machine/netbsd_machdep.h> - -#define s(type) sizeof(type) - -struct sysent netbsd_sysent[] = { - { 0, 0, - sys_nosys }, /* 0 = syscall (indir) */ - { 1, s(struct sys_exit_args), - sys_exit }, /* 1 = exit */ - { 0, 0, - sys_fork }, /* 2 = fork */ - { 3, s(struct sys_read_args), - sys_read }, /* 3 = read */ - { 3, s(struct sys_write_args), - sys_write }, /* 4 = write */ - { 3, s(struct netbsd_sys_open_args), - netbsd_sys_open }, /* 5 = open */ - { 1, s(struct sys_close_args), - sys_close }, /* 6 = close */ - { 4, s(struct sys_wait4_args), - sys_wait4 }, /* 7 = wait4 */ - { 2, s(struct compat_43_netbsd_sys_creat_args), - compat_43_netbsd_sys_creat }, /* 8 = ocreat */ - { 2, s(struct netbsd_sys_link_args), - netbsd_sys_link }, /* 9 = link */ - { 1, s(struct netbsd_sys_unlink_args), - netbsd_sys_unlink }, /* 10 = unlink */ - { 0, 0, - sys_nosys }, /* 11 = obsolete execv */ - { 1, s(struct netbsd_sys_chdir_args), - netbsd_sys_chdir }, /* 12 = chdir */ - { 1, s(struct sys_fchdir_args), - sys_fchdir }, /* 13 = fchdir */ - { 3, s(struct netbsd_sys_mknod_args), - netbsd_sys_mknod }, /* 14 = mknod */ - { 2, s(struct netbsd_sys_chmod_args), - netbsd_sys_chmod }, /* 15 = chmod */ - { 3, s(struct netbsd_sys_chown_args), - netbsd_sys_chown }, /* 16 = chown */ - { 1, s(struct sys_obreak_args), - sys_obreak }, /* 17 = break */ - { 3, s(struct compat_25_sys_getfsstat_args), - compat_25_sys_getfsstat }, /* 18 = getfsstat */ - { 3, s(struct sys_lseek_args), - sys_lseek }, /* 19 = olseek */ - { 0, 0, - sys_getpid }, /* 20 = getpid */ - { 4, s(struct sys_mount_args), - sys_mount }, /* 21 = mount */ - { 2, s(struct netbsd_sys_unmount_args), - netbsd_sys_unmount }, /* 22 = unmount */ - { 1, s(struct sys_setuid_args), - sys_setuid }, /* 23 = setuid */ - { 0, 0, - sys_getuid }, /* 24 = getuid */ - { 0, 0, - sys_geteuid }, /* 25 = geteuid */ -#ifdef PTRACE - { 4, s(struct sys_ptrace_args), - sys_ptrace }, /* 26 = ptrace */ -#else - { 0, 0, - sys_nosys }, /* 26 = unimplemented ptrace */ -#endif - { 3, s(struct sys_recvmsg_args), - sys_recvmsg }, /* 27 = recvmsg */ - { 3, s(struct sys_sendmsg_args), - sys_sendmsg }, /* 28 = sendmsg */ - { 6, s(struct sys_recvfrom_args), - sys_recvfrom }, /* 29 = recvfrom */ - { 3, s(struct sys_accept_args), - sys_accept }, /* 30 = accept */ - { 3, s(struct sys_getpeername_args), - sys_getpeername }, /* 31 = getpeername */ - { 3, s(struct sys_getsockname_args), - sys_getsockname }, /* 32 = getsockname */ - { 2, s(struct netbsd_sys_access_args), - netbsd_sys_access }, /* 33 = access */ - { 2, s(struct netbsd_sys_chflags_args), - netbsd_sys_chflags }, /* 34 = chflags */ - { 2, s(struct sys_fchflags_args), - sys_fchflags }, /* 35 = fchflags */ - { 0, 0, - sys_sync }, /* 36 = sync */ - { 2, s(struct sys_kill_args), - sys_kill }, /* 37 = kill */ - { 2, s(struct compat_43_netbsd_sys_stat_args), - compat_43_netbsd_sys_stat }, /* 38 = stat43 */ - { 0, 0, - sys_getppid }, /* 39 = getppid */ - { 2, s(struct compat_43_netbsd_sys_lstat_args), - compat_43_netbsd_sys_lstat }, /* 40 = lstat43 */ - { 1, s(struct sys_dup_args), - sys_dup }, /* 41 = dup */ - { 0, 0, - sys_opipe }, /* 42 = opipe */ - { 0, 0, - sys_getegid }, /* 43 = getegid */ - { 4, s(struct sys_profil_args), - sys_profil }, /* 44 = profil */ -#ifdef KTRACE - { 4, s(struct sys_ktrace_args), - sys_ktrace }, /* 45 = ktrace */ -#else - { 0, 0, - sys_nosys }, /* 45 = unimplemented ktrace */ -#endif - { 3, s(struct sys_sigaction_args), - sys_sigaction }, /* 46 = sigaction */ - { 0, 0, - sys_getgid }, /* 47 = getgid */ - { 2, s(struct sys_sigprocmask_args), - sys_sigprocmask }, /* 48 = sigprocmask */ - { 2, s(struct sys_getlogin_args), - sys_getlogin }, /* 49 = getlogin */ - { 1, s(struct sys_setlogin_args), - sys_setlogin }, /* 50 = setlogin */ -#ifdef ACCOUNTING - { 1, s(struct sys_acct_args), - sys_acct }, /* 51 = acct */ -#else - { 0, 0, - sys_nosys }, /* 51 = unimplemented acct */ -#endif - { 0, 0, - sys_sigpending }, /* 52 = sigpending */ - { 2, s(struct sys_osigaltstack_args), - sys_osigaltstack }, /* 53 = osigaltstack */ - { 3, s(struct sys_ioctl_args), - sys_ioctl }, /* 54 = ioctl */ - { 1, s(struct sys_reboot_args), - sys_reboot }, /* 55 = reboot */ - { 1, s(struct netbsd_sys_revoke_args), - netbsd_sys_revoke }, /* 56 = revoke */ - { 2, s(struct netbsd_sys_symlink_args), - netbsd_sys_symlink }, /* 57 = symlink */ - { 3, s(struct netbsd_sys_readlink_args), - netbsd_sys_readlink }, /* 58 = readlink */ - { 3, s(struct netbsd_sys_execve_args), - netbsd_sys_execve }, /* 59 = execve */ - { 1, s(struct sys_umask_args), - sys_umask }, /* 60 = umask */ - { 1, s(struct netbsd_sys_chroot_args), - netbsd_sys_chroot }, /* 61 = chroot */ - { 2, s(struct sys_fstat_args), - sys_fstat }, /* 62 = fstat43 */ - { 4, s(struct compat_43_sys_getkerninfo_args), - compat_43_sys_getkerninfo }, /* 63 = ogetkerninfo */ - { 0, 0, - compat_43_sys_getpagesize }, /* 64 = ogetpagesize */ - { 2, s(struct compat_25_sys_omsync_args), - compat_25_sys_omsync }, /* 65 = omsync */ - { 0, 0, - sys_vfork }, /* 66 = vfork */ - { 0, 0, - sys_nosys }, /* 67 = obsolete vread */ - { 0, 0, - sys_nosys }, /* 68 = obsolete vwrite */ - { 1, s(struct sys_sbrk_args), - sys_sbrk }, /* 69 = sbrk */ - { 1, s(struct sys_sstk_args), - sys_sstk }, /* 70 = sstk */ - { 6, s(struct sys_mmap_args), - sys_mmap }, /* 71 = ommap */ - { 1, s(struct sys_ovadvise_args), - sys_ovadvise }, /* 72 = vadvise */ - { 2, s(struct sys_munmap_args), - sys_munmap }, /* 73 = munmap */ - { 3, s(struct sys_mprotect_args), - sys_mprotect }, /* 74 = mprotect */ - { 3, s(struct sys_madvise_args), - sys_madvise }, /* 75 = madvise */ - { 0, 0, - sys_nosys }, /* 76 = obsolete vhangup */ - { 0, 0, - sys_nosys }, /* 77 = obsolete vlimit */ - { 3, s(struct sys_mincore_args), - sys_mincore }, /* 78 = mincore */ - { 2, s(struct sys_getgroups_args), - sys_getgroups }, /* 79 = getgroups */ - { 2, s(struct sys_setgroups_args), - sys_setgroups }, /* 80 = setgroups */ - { 0, 0, - sys_getpgrp }, /* 81 = getpgrp */ - { 2, s(struct sys_setpgid_args), - sys_setpgid }, /* 82 = setpgid */ - { 3, s(struct sys_setitimer_args), - sys_setitimer }, /* 83 = setitimer */ - { 0, 0, - compat_43_sys_wait }, /* 84 = owait */ - { 1, s(struct compat_25_sys_swapon_args), - compat_25_sys_swapon }, /* 85 = swapon */ - { 2, s(struct sys_getitimer_args), - sys_getitimer }, /* 86 = getitimer */ - { 2, s(struct compat_43_sys_gethostname_args), - compat_43_sys_gethostname }, /* 87 = ogethostname */ - { 2, s(struct compat_43_sys_sethostname_args), - compat_43_sys_sethostname }, /* 88 = osethostname */ - { 0, 0, - compat_43_sys_getdtablesize }, /* 89 = ogetdtablesize */ - { 2, s(struct sys_dup2_args), - sys_dup2 }, /* 90 = dup2 */ - { 0, 0, - sys_nosys }, /* 91 = unimplemented getdopt */ - { 3, s(struct sys_fcntl_args), - sys_fcntl }, /* 92 = fcntl */ - { 5, s(struct sys_select_args), - sys_select }, /* 93 = select */ - { 0, 0, - sys_nosys }, /* 94 = unimplemented setdopt */ - { 1, s(struct sys_fsync_args), - sys_fsync }, /* 95 = fsync */ - { 3, s(struct sys_setpriority_args), - sys_setpriority }, /* 96 = setpriority */ - { 3, s(struct sys_socket_args), - sys_socket }, /* 97 = socket */ - { 3, s(struct sys_connect_args), - sys_connect }, /* 98 = connect */ - { 3, s(struct sys_accept_args), - sys_accept }, /* 99 = oaccept */ - { 2, s(struct sys_getpriority_args), - sys_getpriority }, /* 100 = getpriority */ - { 4, s(struct compat_43_sys_send_args), - compat_43_sys_send }, /* 101 = osend */ - { 4, s(struct compat_43_sys_recv_args), - compat_43_sys_recv }, /* 102 = orecv */ - { 1, s(struct sys_sigreturn_args), - sys_sigreturn }, /* 103 = sigreturn */ - { 3, s(struct sys_bind_args), - sys_bind }, /* 104 = bind */ - { 5, s(struct sys_setsockopt_args), - sys_setsockopt }, /* 105 = setsockopt */ - { 2, s(struct sys_listen_args), - sys_listen }, /* 106 = listen */ - { 0, 0, - sys_nosys }, /* 107 = obsolete vtimes */ - { 3, s(struct compat_43_sys_sigvec_args), - compat_43_sys_sigvec }, /* 108 = osigvec */ - { 1, s(struct compat_43_sys_sigblock_args), - compat_43_sys_sigblock }, /* 109 = osigblock */ - { 1, s(struct compat_43_sys_sigsetmask_args), - compat_43_sys_sigsetmask }, /* 110 = osigsetmask */ - { 1, s(struct sys_sigsuspend_args), - sys_sigsuspend }, /* 111 = sigsuspend */ - { 2, s(struct compat_43_sys_sigstack_args), - compat_43_sys_sigstack }, /* 112 = osigstack */ -#ifdef MSG_COMPAT - { 3, s(struct compat_43_sys_recvmsg_args), - compat_43_sys_recvmsg }, /* 113 = orecvmsg */ -#else - { 0, 0, - sys_nosys }, /* 113 = obsolete orecvmsg */ -#endif -#ifdef MSG_COMPAT - { 3, s(struct compat_43_sys_sendmsg_args), - compat_43_sys_sendmsg }, /* 114 = osendmsg */ -#else - { 0, 0, - sys_nosys }, /* 114 = obsolete orecvmsg */ -#endif - { 0, 0, - sys_nosys }, /* 115 = obsolete vtrace */ - { 2, s(struct sys_gettimeofday_args), - sys_gettimeofday }, /* 116 = gettimeofday */ - { 2, s(struct sys_getrusage_args), - sys_getrusage }, /* 117 = getrusage */ - { 5, s(struct sys_getsockopt_args), - sys_getsockopt }, /* 118 = getsockopt */ - { 0, 0, - sys_nosys }, /* 119 = obsolete resuba */ - { 3, s(struct sys_readv_args), - sys_readv }, /* 120 = readv */ - { 3, s(struct sys_writev_args), - sys_writev }, /* 121 = writev */ - { 2, s(struct sys_settimeofday_args), - sys_settimeofday }, /* 122 = settimeofday */ - { 3, s(struct sys_fchown_args), - sys_fchown }, /* 123 = fchown */ - { 2, s(struct sys_fchmod_args), - sys_fchmod }, /* 124 = fchmod */ -#ifdef MSG_COMPAT - { 6, s(struct compat_43_sys_recvfrom_args), - compat_43_sys_recvfrom }, /* 125 = orecvfrom */ -#else - { 0, 0, - sys_nosys }, /* 125 = obsolete orecvfrom */ -#endif - { 2, s(struct sys_setreuid_args), - sys_setreuid }, /* 126 = setreuid */ - { 2, s(struct sys_setregid_args), - sys_setregid }, /* 127 = setregid */ - { 2, s(struct netbsd_sys_rename_args), - netbsd_sys_rename }, /* 128 = rename */ - { 2, s(struct compat_43_netbsd_sys_truncate_args), - compat_43_netbsd_sys_truncate }, /* 129 = otruncate */ - { 2, s(struct compat_43_sys_ftruncate_args), - compat_43_sys_ftruncate }, /* 130 = oftruncate */ - { 2, s(struct sys_flock_args), - sys_flock }, /* 131 = flock */ - { 2, s(struct netbsd_sys_mkfifo_args), - netbsd_sys_mkfifo }, /* 132 = mkfifo */ - { 6, s(struct sys_sendto_args), - sys_sendto }, /* 133 = sendto */ - { 2, s(struct sys_shutdown_args), - sys_shutdown }, /* 134 = shutdown */ - { 4, s(struct sys_socketpair_args), - sys_socketpair }, /* 135 = socketpair */ - { 2, s(struct netbsd_sys_mkdir_args), - netbsd_sys_mkdir }, /* 136 = mkdir */ - { 1, s(struct netbsd_sys_rmdir_args), - netbsd_sys_rmdir }, /* 137 = rmdir */ - { 2, s(struct sys_utimes_args), - sys_utimes }, /* 138 = utimes */ - { 0, 0, - sys_nosys }, /* 139 = obsolete 4.2 sigreturn */ - { 2, s(struct sys_adjtime_args), - sys_adjtime }, /* 140 = adjtime */ - { 3, s(struct compat_43_sys_getpeername_args), - compat_43_sys_getpeername }, /* 141 = ogetpeername */ - { 0, 0, - compat_43_sys_gethostid }, /* 142 = ogethostid */ - { 1, s(struct compat_43_sys_sethostid_args), - compat_43_sys_sethostid }, /* 143 = osethostid */ - { 2, s(struct compat_43_sys_getrlimit_args), - compat_43_sys_getrlimit }, /* 144 = ogetrlimit */ - { 2, s(struct compat_43_sys_setrlimit_args), - compat_43_sys_setrlimit }, /* 145 = osetrlimit */ - { 2, s(struct compat_43_sys_killpg_args), - compat_43_sys_killpg }, /* 146 = okillpg */ - { 0, 0, - sys_setsid }, /* 147 = setsid */ - { 4, s(struct sys_quotactl_args), - sys_quotactl }, /* 148 = quotactl */ - { 0, 0, - compat_43_sys_quota }, /* 149 = oquota */ - { 3, s(struct compat_43_sys_getsockname_args), - compat_43_sys_getsockname }, /* 150 = ogetsockname */ - { 0, 0, - sys_nosys }, /* 151 = unimplemented */ - { 0, 0, - sys_nosys }, /* 152 = unimplemented */ - { 0, 0, - sys_nosys }, /* 153 = unimplemented */ - { 0, 0, - sys_nosys }, /* 154 = unimplemented */ -#if defined(NFSCLIENT) || defined(NFSSERVER) - { 2, s(struct sys_nfssvc_args), - sys_nfssvc }, /* 155 = nfssvc */ -#else - { 0, 0, - sys_nosys }, /* 155 = unimplemented */ -#endif - { 4, s(struct compat_43_sys_getdirentries_args), - compat_43_sys_getdirentries }, /* 156 = ogetdirentries */ - { 2, s(struct compat_25_sys_statfs_args), - compat_25_sys_statfs }, /* 157 = statfs */ - { 2, s(struct compat_25_sys_fstatfs_args), - compat_25_sys_fstatfs }, /* 158 = fstatfs */ - { 0, 0, - sys_nosys }, /* 159 = unimplemented */ - { 0, 0, - sys_nosys }, /* 160 = unimplemented */ -#if defined(NFSCLIENT) || defined(NFSSERVER) - { 2, s(struct sys_getfh_args), - sys_getfh }, /* 161 = getfh */ -#else - { 0, 0, - sys_nosys }, /* 161 = unimplemented getfh */ -#endif - { 2, s(struct compat_09_sys_getdomainname_args), - compat_09_sys_getdomainname }, /* 162 = ogetdomainname */ - { 2, s(struct compat_09_sys_setdomainname_args), - compat_09_sys_setdomainname }, /* 163 = osetdomainname */ - { 1, s(struct compat_09_sys_uname_args), - compat_09_sys_uname }, /* 164 = ouname */ - { 2, s(struct sys_sysarch_args), - sys_sysarch }, /* 165 = sysarch */ - { 0, 0, - sys_nosys }, /* 166 = unimplemented */ - { 0, 0, - sys_nosys }, /* 167 = unimplemented */ - { 0, 0, - sys_nosys }, /* 168 = unimplemented */ -#if defined(SYSVSEM) && !defined(alpha) - { 5, s(struct compat_10_sys_semsys_args), - compat_10_sys_semsys }, /* 169 = osemsys */ -#else - { 0, 0, - sys_nosys }, /* 169 = unimplemented 1.0 semsys */ -#endif -#if defined(SYSVMSG) && !defined(alpha) - { 6, s(struct compat_10_sys_msgsys_args), - compat_10_sys_msgsys }, /* 170 = omsgsys */ -#else - { 0, 0, - sys_nosys }, /* 170 = unimplemented 1.0 msgsys */ -#endif -#if defined(SYSVSHM) && !defined(alpha) - { 4, s(struct compat_10_sys_shmsys_args), - compat_10_sys_shmsys }, /* 171 = shmsys */ -#else - { 0, 0, - sys_nosys }, /* 171 = unimplemented 1.0 shmsys */ -#endif - { 0, 0, - sys_nosys }, /* 172 = unimplemented */ - { 5, s(struct sys_pread_args), - sys_pread }, /* 173 = pread */ - { 5, s(struct sys_pwrite_args), - sys_pwrite }, /* 174 = pwrite */ - { 0, 0, - sys_nosys }, /* 175 = unimplemented ntp_gettime */ - { 0, 0, - sys_nosys }, /* 176 = unimplemented ntp_adjtime */ - { 0, 0, - sys_nosys }, /* 177 = unimplemented */ - { 0, 0, - sys_nosys }, /* 178 = unimplemented */ - { 0, 0, - sys_nosys }, /* 179 = unimplemented */ - { 0, 0, - sys_nosys }, /* 180 = unimplemented */ - { 1, s(struct sys_setgid_args), - sys_setgid }, /* 181 = setgid */ - { 1, s(struct sys_setegid_args), - sys_setegid }, /* 182 = setegid */ - { 1, s(struct sys_seteuid_args), - sys_seteuid }, /* 183 = seteuid */ - { 0, 0, - sys_nosys }, /* 184 = unimplemented */ - { 0, 0, - sys_nosys }, /* 185 = unimplemented */ - { 0, 0, - sys_nosys }, /* 186 = unimplemented */ - { 0, 0, - sys_nosys }, /* 187 = unimplemented */ - { 2, s(struct netbsd_sys_stat_args), - netbsd_sys_stat }, /* 188 = stat */ - { 2, s(struct sys_fstat_args), - sys_fstat }, /* 189 = fstat */ - { 2, s(struct netbsd_sys_lstat_args), - netbsd_sys_lstat }, /* 190 = lstat */ - { 2, s(struct netbsd_sys_pathconf_args), - netbsd_sys_pathconf }, /* 191 = pathconf */ - { 2, s(struct sys_fpathconf_args), - sys_fpathconf }, /* 192 = fpathconf */ - { 3, s(struct sys_swapctl_args), - sys_swapctl }, /* 193 = swapctl */ - { 2, s(struct sys_getrlimit_args), - sys_getrlimit }, /* 194 = getrlimit */ - { 2, s(struct sys_setrlimit_args), - sys_setrlimit }, /* 195 = setrlimit */ - { 4, s(struct sys_getdirentries_args), - sys_getdirentries }, /* 196 = getdirentries */ - { 7, s(struct sys_mmap_args), - sys_mmap }, /* 197 = mmap */ - { 0, 0, - sys_nosys }, /* 198 = __syscall (indir) */ - { 4, s(struct sys_lseek_args), - sys_lseek }, /* 199 = lseek */ - { 3, s(struct netbsd_sys_truncate_args), - netbsd_sys_truncate }, /* 200 = truncate */ - { 3, s(struct sys_ftruncate_args), - sys_ftruncate }, /* 201 = ftruncate */ - { 6, s(struct sys___sysctl_args), - sys___sysctl }, /* 202 = __sysctl */ - { 2, s(struct sys_mlock_args), - sys_mlock }, /* 203 = mlock */ - { 2, s(struct sys_munlock_args), - sys_munlock }, /* 204 = munlock */ - { 0, 0, - sys_nosys }, /* 205 = unimplemented sys_undelete */ - { 2, s(struct sys_futimes_args), - sys_futimes }, /* 206 = futimes */ - { 1, s(struct sys_getpgid_args), - sys_getpgid }, /* 207 = getpgid */ - { 5, s(struct sys_xfspioctl_args), - sys_xfspioctl }, /* 208 = xfspioctl */ - { 3, s(struct sys_poll_args), - sys_poll }, /* 209 = poll */ -#ifdef LKM - { 0, 0, - sys_lkmnosys }, /* 210 = lkmnosys */ - { 0, 0, - sys_lkmnosys }, /* 211 = lkmnosys */ - { 0, 0, - sys_lkmnosys }, /* 212 = lkmnosys */ - { 0, 0, - sys_lkmnosys }, /* 213 = lkmnosys */ - { 0, 0, - sys_lkmnosys }, /* 214 = lkmnosys */ - { 0, 0, - sys_lkmnosys }, /* 215 = lkmnosys */ - { 0, 0, - sys_lkmnosys }, /* 216 = lkmnosys */ - { 0, 0, - sys_lkmnosys }, /* 217 = lkmnosys */ - { 0, 0, - sys_lkmnosys }, /* 218 = lkmnosys */ - { 0, 0, - sys_lkmnosys }, /* 219 = lkmnosys */ -#else /* !LKM */ - { 0, 0, - sys_nosys }, /* 210 = unimplemented */ - { 0, 0, - sys_nosys }, /* 211 = unimplemented */ - { 0, 0, - sys_nosys }, /* 212 = unimplemented */ - { 0, 0, - sys_nosys }, /* 213 = unimplemented */ - { 0, 0, - sys_nosys }, /* 214 = unimplemented */ - { 0, 0, - sys_nosys }, /* 215 = unimplemented */ - { 0, 0, - sys_nosys }, /* 216 = unimplemented */ - { 0, 0, - sys_nosys }, /* 217 = unimplemented */ - { 0, 0, - sys_nosys }, /* 218 = unimplemented */ - { 0, 0, - sys_nosys }, /* 219 = unimplemented */ -#endif /* !LKM */ -#ifdef SYSVSEM - { 4, s(struct compat_23_sys___semctl_args), - compat_23_sys___semctl }, /* 220 = __osemctl */ - { 3, s(struct sys_semget_args), - sys_semget }, /* 221 = semget */ - { 3, s(struct sys_semop_args), - sys_semop }, /* 222 = semop */ - { 0, 0, - sys_nosys }, /* 223 = obsolete sys_semconfig */ -#else - { 0, 0, - sys_nosys }, /* 220 = unimplemented semctl */ - { 0, 0, - sys_nosys }, /* 221 = unimplemented semget */ - { 0, 0, - sys_nosys }, /* 222 = unimplemented semop */ - { 0, 0, - sys_nosys }, /* 223 = unimplemented semconfig */ -#endif -#ifdef SYSVMSG - { 3, s(struct compat_23_sys_msgctl_args), - compat_23_sys_msgctl }, /* 224 = omsgctl */ - { 2, s(struct sys_msgget_args), - sys_msgget }, /* 225 = msgget */ - { 4, s(struct sys_msgsnd_args), - sys_msgsnd }, /* 226 = msgsnd */ - { 5, s(struct sys_msgrcv_args), - sys_msgrcv }, /* 227 = msgrcv */ -#else - { 0, 0, - sys_nosys }, /* 224 = unimplemented msgctl */ - { 0, 0, - sys_nosys }, /* 225 = unimplemented msgget */ - { 0, 0, - sys_nosys }, /* 226 = unimplemented msgsnd */ - { 0, 0, - sys_nosys }, /* 227 = unimplemented msgrcv */ -#endif -#ifdef SYSVSHM - { 3, s(struct sys_shmat_args), - sys_shmat }, /* 228 = shmat */ - { 3, s(struct compat_23_sys_shmctl_args), - compat_23_sys_shmctl }, /* 229 = oshmctl */ - { 1, s(struct sys_shmdt_args), - sys_shmdt }, /* 230 = shmdt */ - { 3, s(struct sys_shmget_args), - sys_shmget }, /* 231 = shmget */ -#else - { 0, 0, - sys_nosys }, /* 228 = unimplemented shmat */ - { 0, 0, - sys_nosys }, /* 229 = unimplemented shmctl */ - { 0, 0, - sys_nosys }, /* 230 = unimplemented shmdt */ - { 0, 0, - sys_nosys }, /* 231 = unimplemented shmget */ -#endif - { 2, s(struct sys_clock_gettime_args), - sys_clock_gettime }, /* 232 = clock_gettime */ - { 2, s(struct sys_clock_settime_args), - sys_clock_settime }, /* 233 = clock_settime */ - { 2, s(struct sys_clock_getres_args), - sys_clock_getres }, /* 234 = clock_getres */ - { 0, 0, - sys_nosys }, /* 235 = unimplemented timer_create */ - { 0, 0, - sys_nosys }, /* 236 = unimplemented timer_delete */ - { 0, 0, - sys_nosys }, /* 237 = unimplemented timer_settime */ - { 0, 0, - sys_nosys }, /* 238 = unimplemented timer_gettime */ - { 0, 0, - sys_nosys }, /* 239 = unimplemented timer_getoverrun */ - { 2, s(struct sys_nanosleep_args), - sys_nanosleep }, /* 240 = nanosleep */ - { 1, s(struct netbsd_sys_fdatasync_args), - netbsd_sys_fdatasync }, /* 241 = fdatasync */ - { 0, 0, - sys_nosys }, /* 242 = unimplemented */ - { 0, 0, - sys_nosys }, /* 243 = unimplemented */ - { 0, 0, - sys_nosys }, /* 244 = unimplemented */ - { 0, 0, - sys_nosys }, /* 245 = unimplemented */ - { 0, 0, - sys_nosys }, /* 246 = unimplemented */ - { 0, 0, - sys_nosys }, /* 247 = unimplemented */ - { 0, 0, - sys_nosys }, /* 248 = unimplemented */ - { 0, 0, - sys_nosys }, /* 249 = unimplemented */ - { 0, 0, - sys_nosys }, /* 250 = unimplemented */ - { 0, 0, - sys_nosys }, /* 251 = unimplemented */ - { 0, 0, - sys_nosys }, /* 252 = unimplemented */ - { 0, 0, - sys_nosys }, /* 253 = unimplemented */ - { 0, 0, - sys_nosys }, /* 254 = unimplemented */ - { 0, 0, - sys_nosys }, /* 255 = unimplemented */ - { 0, 0, - sys_nosys }, /* 256 = unimplemented */ - { 0, 0, - sys_nosys }, /* 257 = unimplemented */ - { 0, 0, - sys_nosys }, /* 258 = unimplemented */ - { 0, 0, - sys_nosys }, /* 259 = unimplemented */ - { 0, 0, - sys_nosys }, /* 260 = unimplemented */ - { 0, 0, - sys_nosys }, /* 261 = unimplemented */ - { 0, 0, - sys_nosys }, /* 262 = unimplemented */ - { 0, 0, - sys_nosys }, /* 263 = unimplemented */ - { 0, 0, - sys_nosys }, /* 264 = unimplemented */ - { 0, 0, - sys_nosys }, /* 265 = unimplemented */ - { 0, 0, - sys_nosys }, /* 266 = unimplemented */ - { 0, 0, - sys_nosys }, /* 267 = unimplemented */ - { 0, 0, - sys_nosys }, /* 268 = unimplemented */ - { 0, 0, - sys_nosys }, /* 269 = unimplemented */ - { 0, 0, - sys_nosys }, /* 270 = unimplemented */ - { 0, 0, - sys_nosys }, /* 271 = unimplemented */ - { 3, s(struct netbsd_sys_getdents_args), - netbsd_sys_getdents }, /* 272 = getdents */ - { 3, s(struct sys_minherit_args), - sys_minherit }, /* 273 = minherit */ - { 2, s(struct netbsd_sys_lchmod_args), - netbsd_sys_lchmod }, /* 274 = lchmod */ - { 3, s(struct sys_lchown_args), - sys_lchown }, /* 275 = lchown */ - { 2, s(struct netbsd_sys_lutimes_args), - netbsd_sys_lutimes }, /* 276 = lutimes */ - { 3, s(struct sys_msync_args), - sys_msync }, /* 277 = msync */ - { 2, s(struct netbsd_sys___stat13_args), - netbsd_sys___stat13 }, /* 278 = __stat13 */ - { 2, s(struct netbsd_sys___fstat13_args), - netbsd_sys___fstat13 }, /* 279 = __fstat13 */ - { 2, s(struct netbsd_sys___lstat13_args), - netbsd_sys___lstat13 }, /* 280 = __lstat13 */ - { 2, s(struct sys_sigaltstack_args), - sys_sigaltstack }, /* 281 = sigaltstack */ - { 0, 0, - netbsd_sys___vfork14 }, /* 282 = __vfork14 */ - { 0, 0, - sys_nosys }, /* 283 = unimplemented */ - { 0, 0, - sys_nosys }, /* 284 = unimplemented */ - { 0, 0, - sys_nosys }, /* 285 = unimplemented */ - { 1, s(struct sys_getsid_args), - sys_getsid }, /* 286 = getsid */ - { 0, 0, - sys_nosys }, /* 287 = unimplemented */ -#ifdef KTRACE - { 0, 0, - sys_nosys }, /* 288 = unimplemented */ -#else - { 0, 0, - sys_nosys }, /* 288 = unimplemented */ -#endif - { 5, s(struct sys_preadv_args), - sys_preadv }, /* 289 = preadv */ - { 5, s(struct sys_pwritev_args), - sys_pwritev }, /* 290 = pwritev */ - { 3, s(struct netbsd_sys___sigaction14_args), - netbsd_sys___sigaction14 }, /* 291 = __sigaction14 */ - { 1, s(struct netbsd_sys___sigpending14_args), - netbsd_sys___sigpending14 }, /* 292 = __sigpending14 */ - { 3, s(struct netbsd_sys___sigprocmask14_args), - netbsd_sys___sigprocmask14 }, /* 293 = __sigprocmask14 */ - { 1, s(struct netbsd_sys___sigsuspend14_args), - netbsd_sys___sigsuspend14 }, /* 294 = __sigsuspend14 */ - { 1, s(struct netbsd_sys___sigreturn14_args), - netbsd_sys___sigreturn14 }, /* 295 = __sigreturn14 */ - { 2, s(struct netbsd_sys___getcwd_args), - netbsd_sys___getcwd }, /* 296 = __getcwd */ - { 0, 0, - sys_nosys }, /* 297 = unimplemented */ - { 0, 0, - sys_nosys }, /* 298 = unimplemented */ - { 0, 0, - sys_nosys }, /* 299 = unimplemented */ - { 0, 0, - sys_nosys }, /* 300 = unimplemented */ - { 0, 0, - sys_nosys }, /* 301 = unimplemented */ - { 0, 0, - sys_nosys }, /* 302 = unimplemented */ - { 0, 0, - sys_nosys }, /* 303 = unimplemented */ - { 0, 0, - sys_nosys }, /* 304 = unimplemented */ - { 0, 0, - sys_issetugid }, /* 305 = issetugid */ -}; - diff --git a/sys/compat/netbsd/netbsd_types.h b/sys/compat/netbsd/netbsd_types.h deleted file mode 100644 index ba12228fc98..00000000000 --- a/sys/compat/netbsd/netbsd_types.h +++ /dev/null @@ -1,42 +0,0 @@ -/* $OpenBSD: netbsd_types.h,v 1.4 2003/06/02 23:28:00 millert Exp $ */ - -/*- - * Copyright (c) 1982, 1986, 1991, 1993, 1994 - * 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. - * - * @(#)types.h 8.4 (Berkeley) 1/21/94 - */ - -typedef int64_t netbsd_blkcnt_t; /* fs block count */ -typedef u_int32_t netbsd_blksize_t; /* fs optimal block size */ -typedef u_int32_t netbsd_nlink_t; /* link count */ -typedef u_int32_t netbsd_mode_t; /* permissions */ diff --git a/sys/compat/netbsd/netbsd_util.h b/sys/compat/netbsd/netbsd_util.h deleted file mode 100644 index a486d203adb..00000000000 --- a/sys/compat/netbsd/netbsd_util.h +++ /dev/null @@ -1,54 +0,0 @@ -/* $OpenBSD: netbsd_util.h,v 1.1 1999/09/12 14:15:17 kstailey 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 _NETBSD_UTIL_H_ -#define _NETBSD_UTIL_H_ - -#include <compat/common/compat_util.h> - -extern const char netbsd_emul_path[]; - -#define NETBSD_CHECK_ALT_EXIST(p, sgp, path) \ - CHECK_ALT_EXIST(p, sgp, netbsd_emul_path, path) - -#define NETBSD_CHECK_ALT_CREAT(p, sgp, path) \ - CHECK_ALT_CREAT(p, sgp, netbsd_emul_path, path) - -#endif /* !_NETBSD_UTIL_H_ */ diff --git a/sys/compat/netbsd/syscalls.conf b/sys/compat/netbsd/syscalls.conf deleted file mode 100644 index 9bf218ccdb2..00000000000 --- a/sys/compat/netbsd/syscalls.conf +++ /dev/null @@ -1,12 +0,0 @@ -# $OpenBSD: syscalls.conf,v 1.1 1999/09/12 14:15:17 kstailey Exp $ - -sysnames="netbsd_syscalls.c" -sysnumhdr="netbsd_syscall.h" -syssw="netbsd_sysent.c" -sysarghdr="netbsd_syscallargs.h" -compatopts="" -libcompatopts="" - -switchname="netbsd_sysent" -namesname="netbsd_syscallnames" -constprefix="NETBSD_SYS_" diff --git a/sys/compat/netbsd/syscalls.master b/sys/compat/netbsd/syscalls.master deleted file mode 100644 index acead8d84ac..00000000000 --- a/sys/compat/netbsd/syscalls.master +++ /dev/null @@ -1,610 +0,0 @@ -; $OpenBSD: syscalls.master,v 1.26 2006/09/22 15:29:57 pedro Exp $ - -; @(#)syscalls.master 8.2 (Berkeley) 1/13/94 - -; OpenBSD COMPAT_NETBSD 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 -; INDIR included, but don't define the syscall args structure, -; and allow it to be "really" varargs. -; -; 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 <sys/poll.h> - -#include <compat/netbsd/netbsd_types.h> -#include <compat/netbsd/netbsd_stat.h> -#include <compat/netbsd/netbsd_signal.h> -#include <compat/netbsd/netbsd_syscallargs.h> - -#include <machine/netbsd_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 INDIR { int sys_syscall(int number, ...); } -1 NOARGS { void sys_exit(int rval); } -2 NOARGS { int sys_fork(void); } -3 NOARGS { ssize_t sys_read(int fd, void *buf, size_t nbyte); } -4 NOARGS { ssize_t sys_write(int fd, const void *buf, \ - size_t nbyte); } -; XXX int mode vs. mode_t mode -5 STD { int netbsd_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); } -; XXX int mode vs. mode_t mode -8 STD { int compat_43_netbsd_sys_creat(char *path, \ - int mode); } ocreat -9 STD { int netbsd_sys_link(char *path, char *link); } -10 STD { int netbsd_sys_unlink(char *path); } -11 OBSOL execv -12 STD { int netbsd_sys_chdir(char *path); } -13 NOARGS { int sys_fchdir(int fd); } -; XXX int mode vs. mode_t mode -14 STD { int netbsd_sys_mknod(char *path, int mode, \ - dev_t dev); } -; XXX int mode vs. mode_t mode -15 STD { int netbsd_sys_chmod(char *path, int mode); } -16 STD { int netbsd_sys_chown(char *path, uid_t uid, \ - gid_t gid); } -17 NOARGS { int sys_obreak(char *nsize); } break -18 NOARGS { int compat_25_sys_getfsstat(struct ostatfs *buf, \ - long bufsize, int flags); } -19 NOARGS { long sys_lseek(int fd, long offset, int whence); } \ - olseek -20 NOARGS { pid_t sys_getpid(void); } -21 NOARGS { int sys_mount(const char *type, const char *path, \ - int flags, void *data); } -22 STD { int netbsd_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 NOARGS { int sys_ptrace(int req, pid_t pid, caddr_t addr, \ - int data); } -#else -26 UNIMPL ptrace -#endif -27 NOARGS { ssize_t sys_recvmsg(int s, struct msghdr *msg, \ - int flags); } -28 NOARGS { ssize_t sys_sendmsg(int s, \ - const struct msghdr *msg, int flags); } -; XXX unsigned int *fromlenaddr vs. socklen_t *fromlenaddr -29 NOARGS { ssize_t sys_recvfrom(int s, void *buf, size_t len, \ - int flags, struct sockaddr *from, \ - socklen_t *fromlenaddr); } -; XXX unsigned int *fromlenaddr vs. socklen_t *fromlenaddr -30 NOARGS { int sys_accept(int s, struct sockaddr *name, \ - socklen_t *anamelen); } -; XXX unsigned int *alen vs. int *alen -31 NOARGS { int sys_getpeername(int fdes, struct sockaddr *asa, \ - int *alen); } -32 NOARGS { int sys_getsockname(int fdes, struct sockaddr *asa, \ - socklen_t *alen); } -33 STD { int netbsd_sys_access(char *path, int flags); } -; XXX u_long flags vs. u_int flags -34 STD { int netbsd_sys_chflags(char *path, u_int flags); } -; XXX u_long flags vs. u_int flags -35 NOARGS { int sys_fchflags(int fd, u_int flags); } -36 NOARGS { void sys_sync(void); } -37 NOARGS { int sys_kill(int pid, int signum); } -38 STD { int compat_43_netbsd_sys_stat(char *path, \ - struct stat43 *ub); } stat43 -39 NOARGS { pid_t sys_getppid(void); } -40 STD { int compat_43_netbsd_sys_lstat(char *path, \ - struct stat43 *ub); } lstat43 -41 NOARGS { int sys_dup(int fd); } -42 NOARGS { int sys_opipe(void); } -43 NOARGS { gid_t sys_getegid(void); } -44 NOARGS { int sys_profil(caddr_t samples, size_t size, \ - u_long offset, u_int scale); } -#ifdef KTRACE -45 NOARGS { int sys_ktrace(const char *fname, int ops, \ - int facs, pid_t pid); } -#else -45 UNIMPL ktrace -#endif -46 NOARGS { int sys_sigaction(int signum, \ - const 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(const char *namebuf); } -#ifdef ACCOUNTING -51 NOARGS { int sys_acct(const char *path); } -#else -51 UNIMPL acct -#endif -52 NOARGS { int sys_sigpending(void); } -53 NOARGS { int sys_osigaltstack(const struct osigaltstack *nss, \ - struct osigaltstack *oss); } -54 NOARGS { int sys_ioctl(int fd, \ - u_long com, ... void *data); } -55 NOARGS { int sys_reboot(int opt); } -56 STD { int netbsd_sys_revoke(char *path); } -57 STD { int netbsd_sys_symlink(char *path, char *link); } -58 STD { int netbsd_sys_readlink(char *path, char *buf, \ - size_t count); } -59 STD { int netbsd_sys_execve(char *path, \ - char **argp, char **envp); } -60 NOARGS { int sys_umask(int newmask); } -61 STD { int netbsd_sys_chroot(char *path); } -62 NOARGS { int 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 compat_25_sys_omsync(caddr_t addr, size_t len); } -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 sys_mmap(caddr_t addr, size_t len, int prot, \ - int flags, int fd, long pos); } ommap -72 NOARGS { int sys_ovadvise(int anom); } vadvise -73 NOARGS { int sys_munmap(void *addr, size_t len); } -74 NOARGS { int sys_mprotect(void *addr, size_t len, \ - int prot); } -75 NOARGS { int sys_madvise(void *addr, size_t len, \ - int behav); } -76 OBSOL vhangup -77 OBSOL vlimit -78 NOARGS { int sys_mincore(void *addr, size_t len, \ - char *vec); } -79 NOARGS { int sys_getgroups(int gidsetsize, \ - gid_t *gidset); } -80 NOARGS { int sys_setgroups(int gidsetsize, \ - const gid_t *gidset); } -81 NOARGS { int sys_getpgrp(void); } -82 NOARGS { int sys_setpgid(pid_t pid, int pgid); } -83 NOARGS { int sys_setitimer(int which, \ - const struct itimerval *itv, \ - struct itimerval *oitv); } -84 NOARGS { int compat_43_sys_wait(void); } owait -85 NOARGS { int compat_25_sys_swapon(const char *name); } -86 NOARGS { int sys_getitimer(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(int from, int to); } -91 UNIMPL getdopt -92 NOARGS { int sys_fcntl(int fd, int cmd, ... void *arg); } -93 NOARGS { int sys_select(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, const struct sockaddr *name, \ - socklen_t namelen); } -99 NOARGS { int 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 NOARGS { int sys_sigreturn(struct sigcontext *sigcntxp); } -104 NOARGS { int sys_bind(int s, const struct sockaddr *name, \ - socklen_t namelen); } -105 NOARGS { int sys_setsockopt(int s, int level, int name, \ - const void *val, socklen_t 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 -#ifdef MSG_COMPAT -113 NOARGS { int compat_43_sys_recvmsg(int s, \ - struct omsghdr *msg, int flags); } orecvmsg -#else -113 OBSOL orecvmsg -#endif -#ifdef MSG_COMPAT -114 NOARGS { int compat_43_sys_sendmsg(int s, caddr_t msg, \ - int flags); } osendmsg -#else -114 OBSOL orecvmsg -#endif -115 OBSOL vtrace -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, \ - void *val, socklen_t *avalsize); } -119 OBSOL resuba -120 NOARGS { ssize_t sys_readv(int fd, \ - const struct iovec *iovp, int iovcnt); } -121 NOARGS { ssize_t sys_writev(int fd, \ - const struct iovec *iovp, int iovcnt); } -122 NOARGS { int sys_settimeofday(const struct timeval *tv, \ - const struct timezone *tzp); } -123 NOARGS { int sys_fchown(int fd, uid_t uid, gid_t gid); } -124 NOARGS { int sys_fchmod(int fd, int mode); } -#ifdef MSG_COMPAT -125 NOARGS { int compat_43_sys_recvfrom(int s, caddr_t buf, \ - size_t len, int flags, caddr_t from, \ - int *fromlenaddr); } orecvfrom -#else -125 OBSOL orecvfrom -#endif -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 netbsd_sys_rename(char *from, char *to); } -129 STD { int compat_43_netbsd_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 netbsd_sys_mkfifo(char *path, int mode); } -133 NOARGS { ssize_t sys_sendto(int s, const void *buf, \ - size_t len, int flags, const struct sockaddr *to, \ - socklen_t 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 netbsd_sys_mkdir(char *path, int mode); } -137 STD { int netbsd_sys_rmdir(char *path); } -138 NOARGS { int sys_utimes(const char *path, \ - const struct timeval *tptr); } -139 OBSOL 4.2 sigreturn -140 NOARGS { int sys_adjtime(const 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(const char *path, int cmd, \ - int uid, char *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 -152 UNIMPL -153 UNIMPL -154 UNIMPL -#if defined(NFSCLIENT) || defined(NFSSERVER) -155 NOARGS { int sys_nfssvc(int flag, void *argp); } -#else -155 UNIMPL -#endif -156 NOARGS { int compat_43_sys_getdirentries(int fd, char *buf, \ - u_int count, long *basep); } ogetdirentries -157 NOARGS { int compat_25_sys_statfs(char *path, \ - struct ostatfs *buf); } -158 NOARGS { int compat_25_sys_fstatfs(int fd, \ - struct ostatfs *buf); } -159 UNIMPL -160 UNIMPL -#if defined(NFSCLIENT) || defined(NFSSERVER) -161 NOARGS { int sys_getfh(const char *fname, fhandle_t *fhp); } -#else -161 UNIMPL getfh -#endif -162 NOARGS { int compat_09_sys_getdomainname(char *domainname, \ - int len); } ogetdomainname -163 NOARGS { int compat_09_sys_setdomainname(char *domainname, \ - int len); } osetdomainname -164 NOARGS { int compat_09_sys_uname(struct outsname *name); } \ - ouname -165 NOARGS { int sys_sysarch(int op, char *parms); } -166 UNIMPL -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); } osemsys -#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); } omsgsys -#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 ntp_gettime -176 UNIMPL ntp_adjtime -177 UNIMPL -178 UNIMPL -179 UNIMPL -180 UNIMPL - -; Syscalls 181-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 netbsd_sys_stat(char *path, struct stat35 *ub); } -189 NOARGS { int sys_fstat(int fd, struct stat35 *sb); } -190 STD { int netbsd_sys_lstat(char *path, struct stat35 *ub); } -191 STD { long netbsd_sys_pathconf(char *path, int name); } -192 NOARGS { long sys_fpathconf(int fd, int name); } -193 NOARGS { int sys_swapctl(int cmd, const void *arg, int misc); } -194 NOARGS { int sys_getrlimit(int which, \ - struct rlimit *rlp); } -195 NOARGS { int sys_setrlimit(int which, \ - const struct rlimit *rlp); } -196 NOARGS { int sys_getdirentries(int fd, char *buf, \ - int count, long *basep); } -197 NOARGS { void *sys_mmap(void *addr, size_t len, int prot, \ - int flags, int fd, long pad, off_t pos); } -198 INDIR { quad_t sys___syscall(quad_t num, ...); } -199 NOARGS { off_t sys_lseek(int fd, int pad, off_t offset, \ - int whence); } -200 STD { int netbsd_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(const void *addr, size_t len); } -204 NOARGS { int sys_munlock(const void *addr, size_t len); } -205 UNIMPL sys_undelete -206 NOARGS { int sys_futimes(int fd, \ - const struct timeval *tptr); } -207 NOARGS { int sys_getpgid(pid_t pid); } -208 NOARGS { int sys_xfspioctl(int operation, char *a_pathP, \ - int a_opcode, struct ViceIoctl *a_paramsP, \ - int a_followSymlinks); } -; XXX u_int nfds vs. unsigned long nfds -209 NOARGS { int sys_poll(struct pollfd *fds, \ - unsigned long nfds, int timeout); } -; -; Syscalls 210-219 are reserved for dynamically loaded syscalls -; -#ifdef LKM -210 NODEF { int sys_lkmnosys(void); } -211 NODEF { int sys_lkmnosys(void); } -212 NODEF { int sys_lkmnosys(void); } -213 NODEF { int sys_lkmnosys(void); } -214 NODEF { int sys_lkmnosys(void); } -215 NODEF { int sys_lkmnosys(void); } -216 NODEF { int sys_lkmnosys(void); } -217 NODEF { int sys_lkmnosys(void); } -218 NODEF { int sys_lkmnosys(void); } -219 NODEF { int sys_lkmnosys(void); } -#else /* !LKM */ -210 UNIMPL -211 UNIMPL -212 UNIMPL -213 UNIMPL -214 UNIMPL -215 UNIMPL -216 UNIMPL -217 UNIMPL -218 UNIMPL -219 UNIMPL -#endif /* !LKM */ -; System calls 220-240 are reserved for use by OpenBSD -#ifdef SYSVSEM -220 NOARGS { int compat_23_sys___semctl(int semid, int semnum, \ - int cmd, union semun *arg); } __osemctl -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 semctl -221 UNIMPL semget -222 UNIMPL semop -223 UNIMPL semconfig -#endif -#ifdef SYSVMSG -224 NOARGS { int compat_23_sys_msgctl(int msqid, int cmd, \ - struct omsqid_ds *buf); } omsgctl -225 NOARGS { int sys_msgget(key_t key, int msgflg); } -226 NOARGS { int sys_msgsnd(int msqid, const 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 msgctl -225 UNIMPL msgget -226 UNIMPL msgsnd -227 UNIMPL msgrcv -#endif -#ifdef SYSVSHM -228 NOARGS { void *sys_shmat(int shmid, const void *shmaddr, \ - int shmflg); } -229 NOARGS { int compat_23_sys_shmctl(int shmid, int cmd, \ - struct oshmid_ds *buf); } oshmctl -230 NOARGS { int sys_shmdt(const void *shmaddr); } -231 NOARGS { int sys_shmget(key_t key, int size, int shmflg); } -#else -228 UNIMPL shmat -229 UNIMPL shmctl -230 UNIMPL shmdt -231 UNIMPL shmget -#endif -232 NOARGS { int sys_clock_gettime(clockid_t clock_id, \ - struct timespec *tp); } -233 NOARGS { int sys_clock_settime(clockid_t clock_id, \ - const struct timespec *tp); } -234 NOARGS { int sys_clock_getres(clockid_t clock_id, \ - struct timespec *tp); } -235 UNIMPL timer_create -236 UNIMPL timer_delete -237 UNIMPL timer_settime -238 UNIMPL timer_gettime -239 UNIMPL timer_getoverrun -; -; System calls 240-249 are reserved for other IEEE Std1003.1b syscalls -; -240 NOARGS { int sys_nanosleep(const struct timespec *rqtp, \ - struct timespec *rmtp); } -241 STD { int netbsd_sys_fdatasync(int fd); } -242 UNIMPL -243 UNIMPL -244 UNIMPL -245 UNIMPL -246 UNIMPL -247 UNIMPL -248 UNIMPL -249 UNIMPL -250 UNIMPL -251 UNIMPL -252 UNIMPL -253 UNIMPL -254 UNIMPL -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 -;270 STD { int netbsd_sys___posix_rename(const char *from, \ -; const char *to); } -271 UNIMPL -;271 STD { int netbsd_sys_swapctl(int cmd, const void *arg, -; int misc); } -272 STD { int netbsd_sys_getdents(int fd, char *buf, \ - size_t count); } -273 NOARGS { int sys_minherit(void *addr, size_t len, \ - int inherit); } -274 STD { int netbsd_sys_lchmod(const char *path, \ - netbsd_mode_t mode); } -275 NOARGS { int sys_lchown(const char *path, uid_t uid, \ - gid_t gid); } -276 STD { int netbsd_sys_lutimes(const char *path, \ - const struct timeval *tptr); } -277 NOARGS { int sys_msync(void *addr, size_t len, int flags); } -278 STD { int netbsd_sys___stat13(char *path, \ - struct netbsd_stat *ub); } -279 STD { int netbsd_sys___fstat13(int fd, \ - struct netbsd_stat *ub); } -280 STD { int netbsd_sys___lstat13(char *path, \ - struct netbsd_stat *ub); } -281 NOARGS { int sys_sigaltstack( \ - const struct sigaltstack *nss, \ - struct sigaltstack *oss); } -282 STD { int netbsd_sys___vfork14(void); } -283 UNIMPL -;283 STD { int netbsd_sys___posix_chown(const char *path, \ -; uid_t uid, gid_t gid); } -284 UNIMPL -;284 STD { int netbsd_sys___posix_fchown(int fd, uid_t uid, \ -; gid_t gid); } -285 UNIMPL -;285 STD { int netbsd_sys___posix_lchown(const char *path, \ -; uid_t uid, gid_t gid); } -286 NOARGS { int sys_getsid(pid_t pid); } -287 UNIMPL -#ifdef KTRACE -288 UNIMPL -;288 STD { int netbsd_sys_fktrace(const int fd, int ops, \ -; int facs, int pid); } -#else -288 UNIMPL -#endif -289 NOARGS { ssize_t sys_preadv(int fd, \ - const struct iovec *iovp, int iovcnt, \ - int pad, off_t offset); } -290 NOARGS { ssize_t sys_pwritev(int fd, \ - const struct iovec *iovp, int iovcnt, \ - int pad, off_t offset); } -291 STD { int netbsd_sys___sigaction14(int signum, \ - const struct netbsd_sigaction *nsa, \ - struct netbsd_sigaction *osa); } -292 STD { int netbsd_sys___sigpending14(netbsd_sigset_t \ - *set); } -293 STD { int netbsd_sys___sigprocmask14(int how, \ - const netbsd_sigset_t *set, \ - netbsd_sigset_t *oset); } -294 STD { int netbsd_sys___sigsuspend14(const netbsd_sigset_t \ - *set); } -295 STD { int netbsd_sys___sigreturn14(struct \ - netbsd_sigcontext *sigcntxp); } -296 STD { int netbsd_sys___getcwd(char *bufp, size_t length); } -297 UNIMPL -;297 STD { int netbsd_sys_fchroot(int fd); } -298 UNIMPL -299 UNIMPL -300 UNIMPL -301 UNIMPL -302 UNIMPL -303 UNIMPL -304 UNIMPL -305 STD { int sys_issetugid(void); } |