diff options
| author | christos <christos@NetBSD.org> | 1998-10-03 18:50:20 +0000 |
|---|---|---|
| committer | christos <christos@NetBSD.org> | 1998-10-03 18:50:20 +0000 |
| commit | 49b61257dce331b75e35a7e4f732995177bb5d08 (patch) | |
| tree | 186ddc1a135c756f118a7a86258ccdbdaa2ac377 /sys/compat/linux | |
| parent | 5bc85e96b4636dcc0e7fe6cbc5e1e3cc6c740fd3 (diff) | |
Moved via repository copy.
Diffstat (limited to 'sys/compat/linux')
26 files changed, 0 insertions, 2804 deletions
diff --git a/sys/compat/linux/multiarch/linux_break.c b/sys/compat/linux/multiarch/linux_break.c deleted file mode 100644 index e9eb97d6e46..00000000000 --- a/sys/compat/linux/multiarch/linux_break.c +++ /dev/null @@ -1,105 +0,0 @@ -/* $NetBSD: linux_break.c,v 1.47 1998/10/01 04:05:55 erh Exp $ */ - -/*- - * Copyright (c) 1998 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Eric Haszlakiewicz. - * - * 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. - */ - -/* - * Copyright (c) 1995 Frank van der Linden - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed for the NetBSD Project - * by Frank van der Linden - * 4. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include <sys/param.h> -#include <sys/systm.h> -#include <sys/mount.h> - -#include <sys/syscallargs.h> - -#include <compat/linux/linux_types.h> -#include <compat/linux/linux_signal.h> -#include <compat/linux/linux_syscallargs.h> - - -/* Used on: arm, (i386), ppc */ -/* Not used on: alpha, m68k, mips, sparc, sparc64 */ - -/* Defined as "not implemented" on arm and ppc */ -/* Not defined on i386 */ -/* XXXERH: maybe this should just go away. */ - -/* - * This is the old brk(2) call. I don't think anything in the Linux - * world uses this anymore - */ -int -linux_sys_break(p, v, retval) - struct proc *p; - void *v; - register_t *retval; -{ -#if 0 - struct linux_sys_brk_args /* { - syscallarg(char *) nsize; - } */ *uap = v; -#endif - - return ENOSYS; -} diff --git a/sys/compat/linux/multiarch/linux_ipccall.c b/sys/compat/linux/multiarch/linux_ipccall.c deleted file mode 100644 index 65a6c77d795..00000000000 --- a/sys/compat/linux/multiarch/linux_ipccall.c +++ /dev/null @@ -1,364 +0,0 @@ -/* $NetBSD: linux_ipccall.c,v 1.14 1998/10/01 03:27:38 erh Exp $ */ - -/*- - * Copyright (c) 1998 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Eric Haszlakiewicz. - * - * 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. - */ - -/* - * Copyright (c) 1995 Frank van der Linden - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed for the NetBSD Project - * by Frank van der Linden - * 4. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include <sys/types.h> -#include <sys/param.h> -#include <sys/shm.h> -#include <sys/sem.h> -#include <sys/msg.h> -#include <sys/proc.h> -#include <sys/systm.h> - -/* real syscalls */ -#include <sys/mount.h> -#include <sys/syscallargs.h> - - -/* sys_ipc + args prototype */ -#include <compat/linux/linux_types.h> -#include <compat/linux/linux_signal.h> -#include <compat/linux/linux_syscallargs.h> -#include <compat/linux/linux_syscall.h> - -/* general ipc defines */ -#include <compat/linux/linux_ipc.h> - -/* prototypes for real/normal linux-emul syscalls */ -#include <compat/linux/linux_msg.h> -#include <compat/linux/linux_shm.h> -#include <compat/linux/linux_sem.h> - -/* prototypes for sys_ipc stuff */ -#include <compat/linux/linux_ipccall.h> - -/* Used on: arm, i386, m68k, mips, ppc, sparc, sparc64 */ -/* Not used on: alpha */ - -/* - * Stuff to deal with the SysV ipc/shm/semaphore interface in Linux. - * The main difference is, that Linux handles it all via one - * system call, which has the usual maximum amount of 5 arguments. - * This results in a kludge for calls that take 6 of them. - * - * The SYSV??? options have to be enabled to get the appropriate - * functions to work. - */ - -int -linux_sys_ipc(p, v, retval) - struct proc *p; - void *v; - register_t *retval; -{ - struct linux_sys_ipc_args /* { - syscallarg(int) what; - syscallarg(int) a1; - syscallarg(int) a2; - syscallarg(int) a3; - syscallarg(caddr_t) ptr; - } */ *uap = v; - - switch (SCARG(uap, what)) { -#ifdef SYSVSEM - case LINUX_SYS_semop: - return linux_semop(p, uap, retval); - case LINUX_SYS_semget: - return linux_semget(p, uap, retval); - case LINUX_SYS_semctl: { - struct linux_sys_semctl_args bsa; - union linux_semun arg; - int error; - - SCARG(&bsa, semid) = SCARG(uap, a1); - SCARG(&bsa, semnum) = SCARG(uap, a2); - SCARG(&bsa, cmd) = SCARG(uap, a3); - /* Convert from (union linux_semun *) to (union linux_semun) */ - if ((error = copyin(SCARG(uap, ptr), &arg, sizeof arg))) - return error; - SCARG(&bsa, arg) = arg; - - return linux_sys_semctl(p, &bsa, retval); - } -#endif -#ifdef SYSVMSG - case LINUX_SYS_msgsnd: - return linux_msgsnd(p, uap, retval); - case LINUX_SYS_msgrcv: - return linux_msgrcv(p, uap, retval); - case LINUX_SYS_msgget: - return linux_msgget(p, uap, retval); - case LINUX_SYS_msgctl: { - struct linux_sys_msgctl_args bsa; - - SCARG(&bsa, msqid) = SCARG(uap, a1); - SCARG(&bsa, cmd) = SCARG(uap, a2); - SCARG(&bsa, buf) = (struct linux_msqid_ds *)SCARG(uap, ptr); - - return linux_sys_msgctl(p, &bsa, retval); - } -#endif -#ifdef SYSVSHM - case LINUX_SYS_shmat: { - struct linux_sys_shmat_args bsa; - - SCARG(&bsa, shmid) = SCARG(uap, a1); - SCARG(&bsa, shmaddr) = (void *)SCARG(uap, ptr); - SCARG(&bsa, shmflg) = SCARG(uap, a2); - /* XXX passing pointer inside int here */ - SCARG(&bsa, raddr) = (u_long *)SCARG(uap, a3); - - return linux_sys_shmat(p, &bsa, retval); - } - case LINUX_SYS_shmdt: - return linux_shmdt(p, uap, retval); - case LINUX_SYS_shmget: - return linux_shmget(p, uap, retval); - case LINUX_SYS_shmctl: { - struct linux_sys_shmctl_args bsa; - - SCARG(&bsa, shmid) = SCARG(uap, a1); - SCARG(&bsa, cmd) = SCARG(uap, a2); - SCARG(&bsa, buf) = (struct linux_shmid_ds *)SCARG(uap, ptr); - - return linux_sys_shmctl(p, &bsa, retval); - } -#endif - default: - return ENOSYS; - } -} - -#ifdef SYSVSEM -inline int -linux_semop(p, uap, retval) - struct proc *p; - struct linux_sys_ipc_args /* { - syscallarg(int) what; - syscallarg(int) a1; - syscallarg(int) a2; - syscallarg(int) a3; - syscallarg(caddr_t) ptr; - } */ *uap; - register_t *retval; -{ - struct sys_semop_args bsa; - - SCARG(&bsa, semid) = SCARG(uap, a1); - SCARG(&bsa, sops) = (struct sembuf *)SCARG(uap, ptr); - SCARG(&bsa, nsops) = SCARG(uap, a2); - - return sys_semop(p, &bsa, retval); -} - -inline int -linux_semget(p, uap, retval) - struct proc *p; - struct linux_sys_ipc_args /* { - syscallarg(int) what; - syscallarg(int) a1; - syscallarg(int) a2; - syscallarg(int) a3; - syscallarg(caddr_t) ptr; - } */ *uap; - register_t *retval; -{ - struct sys_semget_args bsa; - - SCARG(&bsa, key) = (key_t)SCARG(uap, a1); - SCARG(&bsa, nsems) = SCARG(uap, a2); - SCARG(&bsa, semflg) = SCARG(uap, a3); - - return sys_semget(p, &bsa, retval); -} - -#endif /* SYSVSEM */ - -#ifdef SYSVMSG - -inline int -linux_msgsnd(p, uap, retval) - struct proc *p; - struct linux_sys_ipc_args /* { - syscallarg(int) what; - syscallarg(int) a1; - syscallarg(int) a2; - syscallarg(int) a3; - syscallarg(caddr_t) ptr; - } */ *uap; - register_t *retval; -{ - struct sys_msgsnd_args bma; - - SCARG(&bma, msqid) = SCARG(uap, a1); - SCARG(&bma, msgp) = SCARG(uap, ptr); - SCARG(&bma, msgsz) = SCARG(uap, a2); - SCARG(&bma, msgflg) = SCARG(uap, a3); - - return sys_msgsnd(p, &bma, retval); -} - -inline int -linux_msgrcv(p, uap, retval) - struct proc *p; - struct linux_sys_ipc_args /* { - syscallarg(int) what; - syscallarg(int) a1; - syscallarg(int) a2; - syscallarg(int) a3; - syscallarg(caddr_t) ptr; - } */ *uap; - register_t *retval; -{ - struct sys_msgrcv_args bma; - struct linux_msgrcv_msgarg kluge; - int error; - - if ((error = copyin(SCARG(uap, ptr), &kluge, sizeof kluge))) - return error; - - SCARG(&bma, msqid) = SCARG(uap, a1); - SCARG(&bma, msgp) = kluge.msg; - SCARG(&bma, msgsz) = SCARG(uap, a2); - SCARG(&bma, msgtyp) = kluge.type; - SCARG(&bma, msgflg) = SCARG(uap, a3); - - return sys_msgrcv(p, &bma, retval); -} - -inline int -linux_msgget(p, uap, retval) - struct proc *p; - struct linux_sys_ipc_args /* { - syscallarg(int) what; - syscallarg(int) a1; - syscallarg(int) a2; - syscallarg(int) a3; - syscallarg(caddr_t) ptr; - } */ *uap; - register_t *retval; -{ - struct sys_msgget_args bma; - - SCARG(&bma, key) = (key_t)SCARG(uap, a1); - SCARG(&bma, msgflg) = SCARG(uap, a2); - - return sys_msgget(p, &bma, retval); -} - -#endif /* SYSVMSG */ - -#ifdef SYSVSHM -/* - * shmdt(): this could have been mapped directly, if it wasn't for - * the extra indirection by the linux_ipc system call. - */ -inline int -linux_shmdt(p, uap, retval) - struct proc *p; - struct linux_sys_ipc_args /* { - syscallarg(int) what; - syscallarg(int) a1; - syscallarg(int) a2; - syscallarg(int) a3; - syscallarg(caddr_t) ptr; - } */ *uap; - register_t *retval; -{ - struct sys_shmdt_args bsa; - - SCARG(&bsa, shmaddr) = SCARG(uap, ptr); - - return sys_shmdt(p, &bsa, retval); -} - -/* - * Same story as shmdt. - */ -inline int -linux_shmget(p, uap, retval) - struct proc *p; - struct linux_sys_ipc_args /* { - syscallarg(int) what; - syscallarg(int) a1; - syscallarg(int) a2; - syscallarg(int) a3; - syscallarg(caddr_t) ptr; - } */ *uap; - register_t *retval; -{ - struct sys_shmget_args bsa; - - SCARG(&bsa, key) = SCARG(uap, a1); - SCARG(&bsa, size) = SCARG(uap, a2); - SCARG(&bsa, shmflg) = SCARG(uap, a3); - - return sys_shmget(p, &bsa, retval); -} - -#endif /* SYSVSHM */ diff --git a/sys/compat/linux/multiarch/linux_ipccall.h b/sys/compat/linux/multiarch/linux_ipccall.h deleted file mode 100644 index fff50e7faa5..00000000000 --- a/sys/compat/linux/multiarch/linux_ipccall.h +++ /dev/null @@ -1,119 +0,0 @@ -/* $NetBSD: linux_ipccall.h,v 1.3 1998/10/01 03:29:46 erh Exp $ */ - -/*- - * Copyright (c) 1998 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Eric Haszlakiewicz. - * - * 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. - */ - -/* - * Copyright (c) 1995 Frank van der Linden - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed for the NetBSD Project - * by Frank van der Linden - * 4. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef _MULTIARCH_LINUX_IPCCALL_H -#define _MULTIARCH_LINUX_IPCCALL_H - -/* Used on: arm, i386, m68k, mips, ppc, sparc, sparc64 */ -/* Not used on: alpha */ - -/* - * Defines for the numbers passes as the first argument to the - * linux_ipc() call, and based on which the actual system calls - * are made. - */ -#define LINUX_SYS_semop 1 -#define LINUX_SYS_semget 2 -#define LINUX_SYS_semctl 3 -#define LINUX_SYS_msgsnd 11 -#define LINUX_SYS_msgrcv 12 -#define LINUX_SYS_msgget 13 -#define LINUX_SYS_msgctl 14 -#define LINUX_SYS_shmat 21 -#define LINUX_SYS_shmdt 22 -#define LINUX_SYS_shmget 23 -#define LINUX_SYS_shmctl 24 - - -#ifdef SYSVSEM -inline int linux_semop __P((struct proc *, struct linux_sys_ipc_args *, - register_t *)); -inline int linux_semget __P((struct proc *, struct linux_sys_ipc_args *, - register_t *)); -#endif - - -#ifdef SYSVMSG -inline int linux_msgsnd __P((struct proc *, struct linux_sys_ipc_args *, - register_t *)); -inline int linux_msgrcv __P((struct proc *, struct linux_sys_ipc_args *, - register_t *)); -inline int linux_msgget __P((struct proc *, struct linux_sys_ipc_args *, - register_t *)); -#endif - - -#ifdef SYSVSHM -inline int linux_shmdt __P((struct proc *, struct linux_sys_ipc_args *, - register_t *)); -inline int linux_shmget __P((struct proc *, struct linux_sys_ipc_args *, - register_t *)); -#endif - -#endif /* !_MULTIARCH_LINUX_IPCCALL_H */ diff --git a/sys/compat/linux/multiarch/linux_llseek.c b/sys/compat/linux/multiarch/linux_llseek.c deleted file mode 100644 index 1a8f592f825..00000000000 --- a/sys/compat/linux/multiarch/linux_llseek.c +++ /dev/null @@ -1,122 +0,0 @@ -/* $NetBSD: linux_llseek.c,v 1.23 1998/10/01 03:22:11 erh Exp $ */ - -/*- - * Copyright (c) 1998 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Eric Haszlakiewicz. - * - * 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. - */ - -/* - * Copyright (c) 1995 Frank van der Linden - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed for the NetBSD Project - * by Frank van der Linden - * 4. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include <sys/param.h> -#include <sys/systm.h> -#include <sys/kernel.h> -#include <sys/mount.h> -#include <sys/malloc.h> -#include <sys/conf.h> - -#include <sys/syscallargs.h> - -#include <compat/linux/linux_types.h> -#include <compat/linux/linux_signal.h> -#include <compat/linux/linux_syscallargs.h> -#include <compat/linux/linux_fcntl.h> -#include <compat/linux/linux_util.h> - -/* Used on: arm, i386, m68k, mips, ppc, sparc */ -/* Not used on: alpha, sparc64 */ - -/* - * This appears to be part of a Linux attempt to switch to 64 bits file sizes. - */ -int -linux_sys_llseek(p, v, retval) - struct proc *p; - void *v; - register_t *retval; -{ - struct linux_sys_llseek_args /* { - syscallarg(int) fd; - syscallarg(uint32_t) ohigh; - syscallarg(uint32_t) olow; - syscallarg(caddr_t) res; - syscallarg(int) whence; - } */ *uap = v; - struct sys_lseek_args bla; - int error; - off_t off; - - off = SCARG(uap, olow) | (((off_t) SCARG(uap, ohigh)) << 32); - - SCARG(&bla, fd) = SCARG(uap, fd); - SCARG(&bla, offset) = off; - SCARG(&bla, whence) = SCARG(uap, whence); - - if ((error = sys_lseek(p, &bla, retval))) - return error; - - if ((error = copyout(retval, SCARG(uap, res), sizeof (off_t)))) - return error; - - retval[0] = 0; - return 0; -} diff --git a/sys/compat/linux/multiarch/linux_misc_notalpha.c b/sys/compat/linux/multiarch/linux_misc_notalpha.c deleted file mode 100644 index 43afd8bd2b0..00000000000 --- a/sys/compat/linux/multiarch/linux_misc_notalpha.c +++ /dev/null @@ -1,323 +0,0 @@ -/* $NetBSD: linux_misc_notalpha.c,v 1.47 1998/10/01 04:05:55 erh Exp $ */ - -/*- - * Copyright (c) 1998 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Eric Haszlakiewicz. - * - * 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. - */ - -/* - * Copyright (c) 1995 Frank van der Linden - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed for the NetBSD Project - * by Frank van der Linden - * 4. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include <sys/param.h> -#include <sys/systm.h> -#include <sys/kernel.h> -#include <sys/mman.h> -#include <sys/mount.h> -#include <sys/malloc.h> -#include <sys/mbuf.h> -#include <sys/namei.h> -#include <sys/ptrace.h> -#include <sys/resource.h> -#include <sys/resourcevar.h> -#include <sys/wait.h> - -#include <sys/syscallargs.h> - -#include <vm/vm.h> -#include <vm/vm_param.h> - -#include <compat/linux/linux_types.h> -#include <compat/linux/linux_fcntl.h> -#include <compat/linux/linux_misc.h> -#include <compat/linux/linux_mmap.h> -#include <compat/linux/linux_signal.h> -#include <compat/linux/linux_syscallargs.h> -#include <compat/linux/linux_util.h> - -/* - * This file contains routines which are used - * on every linux architechture except the Alpha. - */ - -/* Used on: arm, i386, m68k, mips, ppc, sparc, sparc64 */ -/* Not used on: alpha */ - -/* - * Alarm. This is a libc call which uses setitimer(2) in NetBSD. - * Fiddle with the timers to make it work. - */ -int -linux_sys_alarm(p, v, retval) - struct proc *p; - void *v; - register_t *retval; -{ - struct linux_sys_alarm_args /* { - syscallarg(unsigned int) secs; - } */ *uap = v; - int s; - struct itimerval *itp, it; - - itp = &p->p_realtimer; - s = splclock(); - /* - * Clear any pending timer alarms. - */ - untimeout(realitexpire, p); - timerclear(&itp->it_interval); - if (timerisset(&itp->it_value) && - timercmp(&itp->it_value, &time, >)) - timersub(&itp->it_value, &time, &itp->it_value); - /* - * Return how many seconds were left (rounded up) - */ - retval[0] = itp->it_value.tv_sec; - if (itp->it_value.tv_usec) - retval[0]++; - - /* - * alarm(0) just resets the timer. - */ - if (SCARG(uap, secs) == 0) { - timerclear(&itp->it_value); - splx(s); - return 0; - } - - /* - * Check the new alarm time for sanity, and set it. - */ - timerclear(&it.it_interval); - it.it_value.tv_sec = SCARG(uap, secs); - it.it_value.tv_usec = 0; - if (itimerfix(&it.it_value) || itimerfix(&it.it_interval)) { - splx(s); - return (EINVAL); - } - - if (timerisset(&it.it_value)) { - timeradd(&it.it_value, &time, &it.it_value); - timeout(realitexpire, p, hzto(&it.it_value)); - } - p->p_realtimer = it; - splx(s); - - return 0; -} - -int -linux_sys_nice(p, v, retval) - struct proc *p; - void *v; - register_t *retval; -{ - struct linux_sys_nice_args /* { - syscallarg(int) incr; - } */ *uap = v; - struct sys_setpriority_args bsa; - - SCARG(&bsa, which) = PRIO_PROCESS; - SCARG(&bsa, who) = 0; - SCARG(&bsa, prio) = SCARG(uap, incr); - return sys_setpriority(p, &bsa, retval); -} - -/* - * The old Linux readdir was only able to read one entry at a time, - * even though it had a 'count' argument. In fact, the emulation - * of the old call was better than the original, because it did handle - * the count arg properly. Don't bother with it anymore now, and use - * it to distinguish between old and new. The difference is that the - * newer one actually does multiple entries, and the reclen field - * really is the reclen, not the namelength. - */ -int -linux_sys_readdir(p, v, retval) - struct proc *p; - void *v; - register_t *retval; -{ - struct linux_sys_readdir_args /* { - syscallarg(int) fd; - syscallarg(struct linux_dirent *) dent; - syscallarg(unsigned int) count; - } */ *uap = v; - - SCARG(uap, count) = 1; - return linux_sys_getdents(p, uap, retval); -} - -/* - * I wonder why Linux has gettimeofday() _and_ time().. Still, we - * need to deal with it. - */ -int -linux_sys_time(p, v, retval) - struct proc *p; - void *v; - register_t *retval; -{ - struct linux_sys_time_args /* { - linux_time_t *t; - } */ *uap = v; - struct timeval atv; - linux_time_t tt; - int error; - - microtime(&atv); - - tt = atv.tv_sec; - if (SCARG(uap, t) && (error = copyout(&tt, SCARG(uap, t), sizeof tt))) - return error; - - retval[0] = tt; - return 0; -} - -/* - * utime(). Do conversion to things that utimes() understands, - * and pass it on. - */ -int -linux_sys_utime(p, v, retval) - struct proc *p; - void *v; - register_t *retval; -{ - struct linux_sys_utime_args /* { - syscallarg(char *) path; - syscallarg(struct linux_utimbuf *)times; - } */ *uap = v; - caddr_t sg; - int error; - struct sys_utimes_args ua; - struct timeval tv[2], *tvp; - struct linux_utimbuf lut; - - sg = stackgap_init(p->p_emul); - LINUX_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path)); - - SCARG(&ua, path) = SCARG(uap, path); - - if (SCARG(uap, times) != NULL) { - if ((error = copyin(SCARG(uap, times), &lut, sizeof lut))) - return error; - tv[0].tv_usec = tv[1].tv_usec = 0; - tv[0].tv_sec = lut.l_actime; - tv[1].tv_sec = lut.l_modtime; - tvp = (struct timeval *) stackgap_alloc(&sg, sizeof(tv)); - if ((error = copyout(tv, tvp, sizeof tv))) - return error; - SCARG(&ua, tptr) = tvp; - } - else - SCARG(&ua, tptr) = NULL; - - return sys_utimes(p, &ua, retval); -} - -/* - * waitpid(2). Passed on to the NetBSD call, surrounded by code to - * reserve some space for a NetBSD-style wait status, and converting - * it to what Linux wants. - */ -int -linux_sys_waitpid(p, v, retval) - struct proc *p; - void *v; - register_t *retval; -{ - struct linux_sys_waitpid_args /* { - syscallarg(int) pid; - syscallarg(int *) status; - syscallarg(int) options; - } */ *uap = v; - struct sys_wait4_args w4a; - int error, *status, tstat; - caddr_t sg; - - if (SCARG(uap, status) != NULL) { - sg = stackgap_init(p->p_emul); - status = (int *) stackgap_alloc(&sg, sizeof status); - } else - status = NULL; - - SCARG(&w4a, pid) = SCARG(uap, pid); - SCARG(&w4a, status) = status; - SCARG(&w4a, options) = SCARG(uap, options); - SCARG(&w4a, rusage) = NULL; - - if ((error = sys_wait4(p, &w4a, retval))) - return error; - - sigdelset(&p->p_siglist, SIGCHLD); - - if (status != NULL) { - if ((error = copyin(status, &tstat, sizeof tstat))) - return error; - - bsd_to_linux_wstat(&tstat); - return copyout(&tstat, SCARG(uap, status), sizeof tstat); - } - - return 0; -} diff --git a/sys/compat/linux/multiarch/linux_oldmmap.c b/sys/compat/linux/multiarch/linux_oldmmap.c deleted file mode 100644 index df26e740c59..00000000000 --- a/sys/compat/linux/multiarch/linux_oldmmap.c +++ /dev/null @@ -1,118 +0,0 @@ -/* $NetBSD: linux_oldmmap.c,v 1.47 1998/10/01 04:05:55 erh Exp $ */ - -/*- - * Copyright (c) 1998 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Eric Haszlakiewicz. - * - * 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. - */ - -/* - * Copyright (c) 1995 Frank van der Linden - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed for the NetBSD Project - * by Frank van der Linden - * 4. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - - -#include <sys/param.h> -#include <sys/systm.h> -#include <sys/mount.h> - -#include <sys/syscallargs.h> - -#include <vm/vm.h> -#include <vm/vm_param.h> - -#include <compat/linux/linux_types.h> -#include <compat/linux/linux_mmap.h> -#include <compat/linux/linux_signal.h> -#include <compat/linux/linux_syscallargs.h> - -/* Used on: arm, i386, m68k */ -/* Not used on: alpha, mips, pcc, sparc, sparc64 */ - -/* - * Linux wants to pass everything to a syscall in registers. - * However mmap() has 6 of them. Oops: out of register error. - * They just pass everything in a structure. - */ -int -linux_sys_old_mmap(p, v, retval) - struct proc *p; - void *v; - register_t *retval; -{ - struct linux_sys_old_mmap_args /* { - syscallarg(struct linux_oldmmap *) lmp; - } */ *uap = v; - struct linux_oldmmap lmap; - struct linux_sys_mmap_args nlmap; - int error; - - if ((error = copyin(SCARG(uap, lmp), &lmap, sizeof lmap))) - return error; - - SCARG(&nlmap,addr) = (unsigned long)lmap.lm_addr; - SCARG(&nlmap,len) = lmap.lm_len; - SCARG(&nlmap,prot) = lmap.lm_prot; - SCARG(&nlmap,flags) = lmap.lm_flags; - SCARG(&nlmap,fd) = lmap.lm_fd; - SCARG(&nlmap,offset) = lmap.lm_pos; - - return linux_sys_mmap(p, &nlmap, retval); -} - diff --git a/sys/compat/linux/multiarch/linux_oldmmap.h b/sys/compat/linux/multiarch/linux_oldmmap.h deleted file mode 100644 index 488c1e1f412..00000000000 --- a/sys/compat/linux/multiarch/linux_oldmmap.h +++ /dev/null @@ -1,80 +0,0 @@ -/* $NetBSD: linux_oldmmap.h,v 1.1 1998/10/01 04:00:20 erh Exp $ */ - -/*- - * Copyright (c) 1998 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Eric Haszlakiewicz. - * - * 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. - */ - -#ifndef _MULTIARCH_LINUX_OLDMMAP_H -#define _MULTIARCH_LINUX_OLDMMAP_H - -/* - * Note: This file should not be included on architectures - * where the linux_sys_mmap syscall is defined - */ - -/* Used on: arm, i386, m68k */ -/* Not used on: alpha, mips, ppc, sparc, sparc64 */ - -/* - * Passed to the mmap() system call - */ -struct linux_oldmmap { - caddr_t lm_addr; - int lm_len; - int lm_prot; - int lm_flags; - int lm_fd; - int lm_pos; -}; - -/* - * Pretend the linux_sys_mmap syscall exists: - */ -struct linux_sys_mmap_args { - syscallarg(unsigned long) addr; - syscallarg(size_t) len; - syscallarg(int) prot; - syscallarg(int) flags; - syscallarg(int) fd; - syscallarg(off_t) offset; -}; - -#ifdef _KERNEL -__BEGIN_DECLS -int linux_sys_mmap __P((struct proc *p, void *v, register_t *retval)); -__END_DECLS -#endif /* !_KERNEL */ - -#endif /* !_MULTIARCH_LINUX_OLDMMAP_H */ diff --git a/sys/compat/linux/multiarch/linux_oldolduname.c b/sys/compat/linux/multiarch/linux_oldolduname.c deleted file mode 100644 index 3d26e4803d3..00000000000 --- a/sys/compat/linux/multiarch/linux_oldolduname.c +++ /dev/null @@ -1,121 +0,0 @@ -/* $NetBSD: linux_oldolduname.c,v 1.48 1998/10/01 18:58:28 perry Exp $ */ - -/*- - * Copyright (c) 1998 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Eric Haszlakiewicz. - * - * 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. - */ - -/* - * Copyright (c) 1995 Frank van der Linden - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed for the NetBSD Project - * by Frank van der Linden - * 4. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - - -#include <sys/param.h> -#include <sys/systm.h> -#include <sys/mount.h> - -#include <sys/syscallargs.h> - -#include <vm/vm.h> -#include <vm/vm_param.h> - -#include <compat/linux/linux_types.h> -#include <compat/linux/linux_mmap.h> -#include <compat/linux/linux_signal.h> -#include <compat/linux/linux_syscallargs.h> - -/* Used on: arm, i386, mips, ppc */ -/* Not used on: alpha, m68k, sparc, sparc64 */ - -int -linux_sys_oldolduname(p, v, retval) - struct proc *p; - void *v; - register_t *retval; -{ - struct linux_sys_uname_args /* { - syscallarg(struct linux_oldoldutsname *) up; - } */ *uap = v; - extern char ostype[], hostname[], osrelease[], version[], machine[]; - struct linux_oldoldutsname luts; - int len; - char *cp; - - strncpy(luts.l_sysname, ostype, sizeof(luts.l_sysname)); - strncpy(luts.l_nodename, hostname, sizeof(luts.l_nodename)); - strncpy(luts.l_release, osrelease, sizeof(luts.l_release)); - strncpy(luts.l_version, version, sizeof(luts.l_version)); - strncpy(luts.l_machine, machine, sizeof(luts.l_machine)); - - /* This part taken from the the uname() in libc */ - len = sizeof(luts.l_version); - for (cp = luts.l_version; len--; ++cp) { - if (*cp == '\n' || *cp == '\t') { - if (len > 1) - *cp = ' '; - else - *cp = '\0'; - } - } - - return copyout(&luts, SCARG(uap, up), sizeof(luts)); -} - diff --git a/sys/compat/linux/multiarch/linux_oldolduname.h b/sys/compat/linux/multiarch/linux_oldolduname.h deleted file mode 100644 index 85f35060a44..00000000000 --- a/sys/compat/linux/multiarch/linux_oldolduname.h +++ /dev/null @@ -1,53 +0,0 @@ -/* $NetBSD: linux_oldolduname.h,v 1.1 1998/10/01 04:00:20 erh Exp $ */ - -/*- - * Copyright (c) 1998 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Eric Haszlakiewicz. - * - * 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. - */ - -#ifndef _MULTIARCH_LINUX_OLDOLDUNAME_H -#define _MULTIARCH_LINUX_OLDOLDUNAME_H - -/* Used on: arm, i386, mips, ppc */ -/* Not used on: alpha, m68k, sparc, sparc64 */ - -struct linux_oldoldutsname { - char l_sysname[9]; - char l_nodename[9]; - char l_release[9]; - char l_version[9]; - char l_machine[9]; -}; - -#endif /* !_MULTIARCH_LINUX_OLDOLDUNAME_H */ diff --git a/sys/compat/linux/multiarch/linux_oldselect.c b/sys/compat/linux/multiarch/linux_oldselect.c deleted file mode 100644 index 6320637692f..00000000000 --- a/sys/compat/linux/multiarch/linux_oldselect.c +++ /dev/null @@ -1,112 +0,0 @@ -/* $NetBSD: linux_oldselect.c,v 1.47 1998/10/01 04:05:55 erh Exp $ */ - -/*- - * Copyright (c) 1998 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Eric Haszlakiewicz. - * - * 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. - */ - -/* - * Copyright (c) 1995 Frank van der Linden - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed for the NetBSD Project - * by Frank van der Linden - * 4. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - - -#include <sys/param.h> -#include <sys/systm.h> -#include <sys/mount.h> - -#include <sys/syscallargs.h> - -#include <vm/vm.h> -#include <vm/vm_param.h> - -#include <compat/linux/linux_types.h> -#include <compat/linux/linux_misc.h> -#include <compat/linux/linux_mmap.h> -#include <compat/linux/linux_signal.h> -#include <compat/linux/linux_syscallargs.h> - -/* Used on: arm, i386, m68k */ -/* Not used on: alpha, mips, ppc, sparc, sparc64 */ - -/* - * Not sure why the arguments to this older version of select() were put - * into a structure, because there are 5, and that can all be handled - * in registers on the i386 like Linux wants to. - */ -int -linux_sys_oldselect(p, v, retval) - struct proc *p; - void *v; - register_t *retval; -{ - struct linux_sys_oldselect_args /* { - syscallarg(struct linux_oldselect *) lsp; - } */ *uap = v; - struct linux_oldselect ls; - int error; - - if ((error = copyin(SCARG(uap, lsp), &ls, sizeof(ls)))) - return error; - - return linux_select1(p, retval, ls.nfds, ls.readfds, ls.writefds, - ls.exceptfds, ls.timeout); -} - diff --git a/sys/compat/linux/multiarch/linux_oldselect.h b/sys/compat/linux/multiarch/linux_oldselect.h deleted file mode 100644 index c24bd1eda76..00000000000 --- a/sys/compat/linux/multiarch/linux_oldselect.h +++ /dev/null @@ -1,56 +0,0 @@ -/* $NetBSD: linux_oldselect.h,v 1.1 1998/10/01 04:00:20 erh Exp $ */ - -/*- - * Copyright (c) 1998 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Eric Haszlakiewicz. - * - * 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. - */ - -#ifndef _MULTIARCH_LINUX_OLDSELECT_H -#define _MULTIARCH_LINUX_OLDSELECT_H - -/* Used on: arm, i386, m68k */ -/* Not used on: alpha, mips, ppc, sparc, sparc64 */ - -/* - * Passed to the old select() system call - */ -struct linux_oldselect { - int nfds; - fd_set *readfds; - fd_set *writefds; - fd_set *exceptfds; - struct timeval *timeout; -}; - -#endif /* !_MULTIARCH_LINUX_OLDSELECT_H */ diff --git a/sys/compat/linux/multiarch/linux_olduname.c b/sys/compat/linux/multiarch/linux_olduname.c deleted file mode 100644 index 01392155534..00000000000 --- a/sys/compat/linux/multiarch/linux_olduname.c +++ /dev/null @@ -1,123 +0,0 @@ -/* $NetBSD: linux_olduname.c,v 1.48 1998/10/01 18:57:05 perry Exp $ */ - -/*- - * Copyright (c) 1998 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Eric Haszlakiewicz. - * - * 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. - */ - -/* - * Copyright (c) 1995 Frank van der Linden - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed for the NetBSD Project - * by Frank van der Linden - * 4. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include <sys/param.h> -#include <sys/systm.h> -#include <sys/kernel.h> -#include <sys/mbuf.h> -#include <sys/mman.h> -#include <sys/mount.h> - -#include <sys/syscallargs.h> - -#include <vm/vm.h> -#include <vm/vm_param.h> - -#include <compat/linux/linux_types.h> -#include <compat/linux/linux_mmap.h> -#include <compat/linux/linux_signal.h> -#include <compat/linux/linux_syscallargs.h> - -/* Used on: (alpha), arm, i386, mips, ppc */ -/* Not used on: sparc */ -/* Alpha: XXX Only if we assume osf_utsname is used by Linux programs. */ - -int -linux_sys_olduname(p, v, retval) - struct proc *p; - void *v; - register_t *retval; -{ - struct linux_sys_uname_args /* { - syscallarg(struct linux_oldutsname *) up; - } */ *uap = v; - extern char ostype[], hostname[], osrelease[], version[], machine[]; - struct linux_oldutsname luts; - int len; - char *cp; - - strncpy(luts.l_sysname, ostype, sizeof(luts.l_sysname)); - strncpy(luts.l_nodename, hostname, sizeof(luts.l_nodename)); - strncpy(luts.l_release, osrelease, sizeof(luts.l_release)); - strncpy(luts.l_version, version, sizeof(luts.l_version)); - strncpy(luts.l_machine, machine, sizeof(luts.l_machine)); - - /* This part taken from the the uname() in libc */ - len = sizeof(luts.l_version); - for (cp = luts.l_version; len--; ++cp) { - if (*cp == '\n' || *cp == '\t') { - if (len > 1) - *cp = ' '; - else - *cp = '\0'; - } - } - - return copyout(&luts, SCARG(uap, up), sizeof(luts)); -} diff --git a/sys/compat/linux/multiarch/linux_olduname.h b/sys/compat/linux/multiarch/linux_olduname.h deleted file mode 100644 index da87168195a..00000000000 --- a/sys/compat/linux/multiarch/linux_olduname.h +++ /dev/null @@ -1,85 +0,0 @@ -/* $NetBSD: linux_olduname.h,v 1.6 1998/10/01 01:31:11 erh Exp $ */ - -/*- - * Copyright (c) 1998 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Eric Haszlakiewicz. - * - * 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. - */ - -/* - * Copyright (c) 1995 Frank van der Linden - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed for the NetBSD Project - * by Frank van der Linden - * 4. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef _MULTIARCH_LINUX_OLDUNAME_H -#define _MULTIARCH_LINUX_OLDUNAME_H - -/* Used on: (alpha), arm, i386, mips, ppc */ -/* Not used on: sparc */ -/* Alpha: XXX Only if we assume osf_utsname is used by Linux programs */ - -struct linux_oldutsname { - char l_sysname[65]; - char l_nodename[65]; - char l_release[65]; - char l_version[65]; - char l_machine[65]; -}; - -#endif /* !_MULTIARCH_LINUX_OLDUNAME_H */ diff --git a/sys/compat/linux/multiarch/linux_pipe.c b/sys/compat/linux/multiarch/linux_pipe.c deleted file mode 100644 index 1a4c1172659..00000000000 --- a/sys/compat/linux/multiarch/linux_pipe.c +++ /dev/null @@ -1,116 +0,0 @@ -/* $NetBSD: linux_pipe.c,v 1.47 1998/10/01 04:05:56 erh Exp $ */ - -/*- - * Copyright (c) 1998 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Eric Haszlakiewicz. - * - * 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. - */ - -/* - * Copyright (c) 1995 Frank van der Linden - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed for the NetBSD Project - * by Frank van der Linden - * 4. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include <sys/param.h> -#include <sys/systm.h> -#include <sys/kernel.h> -#include <sys/malloc.h> -#include <sys/mbuf.h> -#include <sys/mman.h> -#include <sys/mount.h> - -#include <sys/syscallargs.h> - -#include <vm/vm.h> -#include <vm/vm_param.h> - -#include <compat/linux/linux_types.h> -#include <compat/linux/linux_mmap.h> -#include <compat/linux/linux_signal.h> -#include <compat/linux/linux_syscallargs.h> - -/* Used on: arm, i386, m68k, ppc */ -/* Not used on: alpha, mips, sparc, sparc64 */ -/* Alpha, mips, sparc and sparc64 pass one of the fds in a register */ - -/* - * NetBSD passes fd[0] in retval[0], and fd[1] in retval[1]. - * Linux directly passes the pointer. - */ -int -linux_sys_pipe(p, v, retval) - struct proc *p; - void *v; - register_t *retval; -{ - struct linux_sys_pipe_args /* { - syscallarg(int *) pfds; - } */ *uap = v; - int error; - - if ((error = sys_pipe(p, 0, retval))) - return error; - - /* Assumes register_t is an int */ - if ((error = copyout(retval, SCARG(uap, pfds), 2 * sizeof (int)))) - return error; - - retval[0] = 0; - return 0; -} diff --git a/sys/compat/linux/multiarch/linux_sig_notalpha.c b/sys/compat/linux/multiarch/linux_sig_notalpha.c deleted file mode 100644 index 4685c17cfde..00000000000 --- a/sys/compat/linux/multiarch/linux_sig_notalpha.c +++ /dev/null @@ -1,182 +0,0 @@ -/* $NetBSD: linux_sig_notalpha.c,v 1.14 1998/10/01 02:27:34 erh Exp $ */ - -/*- - * Copyright (c) 1998 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Eric Haszlakiewicz. - * - * 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. - */ - -/* - * 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. - * - * heavily from: svr4_signal.c,v 1.7 1995/01/09 01:04:21 christos Exp - */ - -#include <sys/param.h> -#include <sys/systm.h> -#include <sys/proc.h> -#include <sys/filedesc.h> -#include <sys/mount.h> -#include <sys/kernel.h> -#include <sys/signal.h> -#include <sys/signalvar.h> - -#include <sys/syscallargs.h> - -#include <compat/linux/linux_types.h> -#include <compat/linux/linux_signal.h> -#include <compat/linux/linux_syscallargs.h> -#include <compat/linux/linux_util.h> - -/* Used on: arm, i386, m68k, mips, sparc, sparc64 */ -/* Not used on: alpha */ - -/* - * The Linux signal() system call. I think that the signal() in the C - * library actually calls sigaction, so I doubt this one is ever used. - * But hey, it can't hurt having it here. The same restrictions as for - * sigaction() apply. - */ -int -linux_sys_signal(p, v, retval) - register struct proc *p; - void *v; - register_t *retval; -{ - struct linux_sys_signal_args /* { - syscallarg(int) sig; - syscallarg(linux_handler_t) handler; - } */ *uap = v; - struct sigaction nbsa, obsa; - int error; - - nbsa.sa_handler = SCARG(uap, handler); - sigemptyset(&nbsa.sa_mask); - nbsa.sa_flags = SA_RESETHAND | SA_NODEFER; - error = sigaction1(p, linux_to_native_sig[SCARG(uap, sig)], - &nbsa, &obsa); - if (error) - return (error); - *retval = (int)obsa.sa_handler; - return (0); -} - - -/* ARGSUSED */ -int -linux_sys_siggetmask(p, v, retval) - register struct proc *p; - void *v; - register_t *retval; -{ - sigset_t bss; - linux_old_sigset_t lss; - int error; - - error = sigprocmask1(p, SIG_SETMASK, 0, &bss); - if (error) - return (error); - native_to_linux_old_sigset(&bss, &lss); - return (0); -} - -/* - * The following three functions fiddle with a process' signal mask. - * Convert the signal masks because of the different signal - * values for Linux. The need for this is the reason why - * they are here, and have not been mapped directly. - */ -int -linux_sys_sigsetmask(p, v, retval) - register struct proc *p; - void *v; - register_t *retval; -{ - struct linux_sys_sigsetmask_args /* { - syscallarg(linux_old_sigset_t) mask; - } */ *uap = v; - sigset_t nbss, obss; - linux_old_sigset_t nlss, olss; - int error; - - nlss = SCARG(uap, mask); - linux_old_to_native_sigset(&nlss, &nbss); - error = sigprocmask1(p, SIG_SETMASK, &nbss, &obss); - if (error) - return (error); - native_to_linux_old_sigset(&obss, &olss); - *retval = olss; - return (0); -} - - -/* - * The deprecated pause(2), which is really just an instance - * of sigsuspend(2). - */ -int -linux_sys_pause(p, v, retval) - register struct proc *p; - void *v; - register_t *retval; -{ - - return (sigsuspend1(p, 0)); -} diff --git a/sys/compat/linux/multiarch/linux_sigaction.c b/sys/compat/linux/multiarch/linux_sigaction.c deleted file mode 100644 index e715bc6f979..00000000000 --- a/sys/compat/linux/multiarch/linux_sigaction.c +++ /dev/null @@ -1,130 +0,0 @@ -/* $NetBSD: linux_sigaction.c,v 1.14 1998/10/01 02:27:34 erh Exp $ */ - -/*- - * Copyright (c) 1998 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Eric Haszlakiewicz. - * - * 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. - */ - -/* - * 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. - * - * heavily from: svr4_signal.c,v 1.7 1995/01/09 01:04:21 christos Exp - */ - -#include <sys/param.h> -#include <sys/systm.h> -#include <sys/proc.h> -#include <sys/filedesc.h> -#include <sys/mount.h> -#include <sys/kernel.h> -#include <sys/signal.h> -#include <sys/signalvar.h> - -#include <sys/syscallargs.h> - -#include <compat/linux/linux_types.h> -#include <compat/linux/linux_signal.h> -#include <compat/linux/linux_syscallargs.h> -#include <compat/linux/linux_util.h> - -/* Used on: arm, i386, m68k, mips, ppc */ -/* Not used on: alpha, sparc, sparc64 */ - -/* - * The Linux sigaction() system call. Do the usual conversions, - * and just call sigaction(). - */ -int -linux_sys_sigaction(p, v, retval) - register struct proc *p; - void *v; - register_t *retval; -{ - struct linux_sys_sigaction_args /* { - syscallarg(int) signum; - syscallarg(const struct linux_old_sigaction *) nsa; - syscallarg(struct linux_old_sigaction *) osa; - } */ *uap = v; - struct linux_old_sigaction nlsa, olsa; - struct sigaction nbsa, obsa; - int error; - - /* XXX XAX handle switch to RT signal handler */ - /* XXX XAX and update emuldata->ps_siginfo. */ - - if (SCARG(uap, nsa)) { - error = copyin(SCARG(uap, nsa), &nlsa, sizeof(nlsa)); - if (error) - return (error); - linux_old_to_native_sigaction(&nlsa, &nbsa); - } - error = sigaction1(p, linux_to_native_sig[SCARG(uap, signum)], - SCARG(uap, nsa) ? &nbsa : 0, SCARG(uap, osa) ? &obsa : 0); - if (error) - return (error); - if (SCARG(uap, osa)) { - native_to_linux_old_sigaction(&obsa, &olsa); - error = copyout(&olsa, SCARG(uap, osa), sizeof(olsa)); - if (error) - return (error); - } - return (0); -} diff --git a/sys/compat/linux/multiarch/linux_socketcall.c b/sys/compat/linux/multiarch/linux_socketcall.c deleted file mode 100644 index 00f58c8c903..00000000000 --- a/sys/compat/linux/multiarch/linux_socketcall.c +++ /dev/null @@ -1,195 +0,0 @@ -/* $NetBSD: linux_socketcall.c,v 1.16 1998/10/01 03:33:18 erh Exp $ */ - -/*- - * Copyright (c) 1998 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Eric Haszlakiewicz. - * - * 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. - */ - -/* - * Copyright (c) 1995 Frank van der Linden - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed for the NetBSD Project - * by Frank van der Linden - * 4. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include <sys/param.h> -#include <sys/kernel.h> -#include <sys/systm.h> -#include <sys/buf.h> -#include <sys/malloc.h> -#include <sys/ioctl.h> -#include <sys/tty.h> -#include <sys/file.h> -#include <sys/filedesc.h> -#include <sys/select.h> -#include <sys/socket.h> -#include <sys/socketvar.h> -#include <net/if.h> -#include <netinet/in.h> -#include <netinet/tcp.h> -#include <sys/mount.h> -#include <sys/proc.h> -#include <sys/vnode.h> -#include <sys/device.h> - -#include <sys/syscallargs.h> - -#include <compat/linux/linux_types.h> -#include <compat/linux/linux_util.h> -#include <compat/linux/linux_signal.h> -#include <compat/linux/linux_syscallargs.h> -#include <compat/linux/linux_ioctl.h> -#include <compat/linux/linux_socket.h> -#include <compat/linux/linux_socketcall.h> -#include <compat/linux/linux_sockio.h> - -/* Used on: arm, i386, m68k, mips, ppc, sparc, sparc64 */ -/* Not used on: alpha */ - -/* - * This file contains the linux_socketcall() multiplexer. Arguments - * for the various socket calls are on the user stack. A pointer - * to them is the only thing that is passed. We copyin the arguments - * here so the individual functions can assume they are normal syscalls. - */ - -/* The sizes of the arguments. Used for copyin. */ -int linux_socketcall_argsize[] = { - -1, - sizeof(struct linux_sys_socket_args), /* 1 */ - sizeof(struct linux_sys_bind_args), - sizeof(struct linux_sys_connect_args), - sizeof(struct linux_sys_listen_args), - sizeof(struct linux_sys_accept_args), /* 5 */ - sizeof(struct linux_sys_getsockname_args), - sizeof(struct linux_sys_getpeername_args), - sizeof(struct linux_sys_socketpair_args), - sizeof(struct linux_sys_send_args), - sizeof(struct linux_sys_recv_args), /* 10 */ - sizeof(struct linux_sys_sendto_args), - sizeof(struct linux_sys_recvfrom_args), - sizeof(struct linux_sys_shutdown_args), - sizeof(struct linux_sys_setsockopt_args), - sizeof(struct linux_sys_getsockopt_args), /* 15 */ - sizeof(struct linux_sys_sendmsg_args), - sizeof(struct linux_sys_recvmsg_args), /* 17 */ -}; - -/* - * Entry point to all Linux socket calls. Just check which call to - * make and take appropriate action. - */ -int -linux_sys_socketcall(p, v, retval) - struct proc *p; - void *v; - register_t *retval; -{ - struct linux_sys_socketcall_args /* { - syscallarg(int) what; - syscallarg(void *) args; - } */ *uap = v; - struct linux_socketcall_dummy_args lda; - int error; - - if (SCARG(uap, what) > LINUX_MAX_SOCKETCALL) - return ENOSYS; - - if ((error = copyin((caddr_t) SCARG(uap, args), (caddr_t) &lda, - linux_socketcall_argsize[SCARG(uap, what)]))) - return error; - - switch (SCARG(uap, what)) { - case LINUX_SYS_socket: - return linux_sys_socket(p, (void *)&lda, retval); - case LINUX_SYS_bind: - return sys_bind(p, (void *)&lda, retval); - case LINUX_SYS_connect: - return sys_connect(p, (void *)&lda, retval); - case LINUX_SYS_listen: - return sys_listen(p, (void *)&lda, retval); - case LINUX_SYS_accept: - return compat_43_sys_accept(p, (void *)&lda, retval); - case LINUX_SYS_getsockname: - return compat_43_sys_getsockname(p, (void *)&lda, retval); - case LINUX_SYS_getpeername: - return compat_43_sys_getpeername(p, (void *)&lda, retval); - case LINUX_SYS_socketpair: - return linux_sys_socketpair(p, (void *)&lda, retval); - case LINUX_SYS_send: - return compat_43_sys_send(p, (void *)&lda, retval); - case LINUX_SYS_recv: - return compat_43_sys_recv(p, (void *)&lda, retval); - case LINUX_SYS_sendto: - return linux_sys_sendto(p, (void *)&lda, retval); - case LINUX_SYS_recvfrom: - return linux_sys_recvfrom(p, (void *)&lda, retval); - case LINUX_SYS_shutdown: - return sys_shutdown(p, (void *)&lda, retval); - case LINUX_SYS_setsockopt: - return linux_sys_setsockopt(p, (void *)&lda, retval); - case LINUX_SYS_getsockopt: - return linux_sys_getsockopt(p, (void *)&lda, retval); - case LINUX_SYS_sendmsg: - return sys_sendmsg(p, (void *)&lda, retval); - case LINUX_SYS_recvmsg: - return sys_recvmsg(p, (void *)&lda, retval); - default: - return ENOSYS; - } -} diff --git a/sys/compat/linux/multiarch/linux_socketcall.h b/sys/compat/linux/multiarch/linux_socketcall.h deleted file mode 100644 index 8ee614304f8..00000000000 --- a/sys/compat/linux/multiarch/linux_socketcall.h +++ /dev/null @@ -1,239 +0,0 @@ -/* $NetBSD: linux_socketcall.h,v 1.2 1998/10/01 03:34:50 erh Exp $ */ - -/*- - * Copyright (c) 1998 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Eric Haszlakiewicz. - * - * 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. - */ - -/* - * Copyright (c) 1995 Frank van der Linden - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed for the NetBSD Project - * by Frank van der Linden - * 4. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef _MULTIARCH_LINUX_SOCKETCALL_H -#define _MULTIARCH_LINUX_SOCKETCALL_H - -/* Used on: arm, i386, m68k, mips, ppc, sparc, sparc64 */ -/* Not used on: alpha */ - -/* - * Values passed to the Linux socketcall() syscall, determining the actual - * action to take. - */ - -#define LINUX_SYS_socket 1 -#define LINUX_SYS_bind 2 -#define LINUX_SYS_connect 3 -#define LINUX_SYS_listen 4 -#define LINUX_SYS_accept 5 -#define LINUX_SYS_getsockname 6 -#define LINUX_SYS_getpeername 7 -#define LINUX_SYS_socketpair 8 -#define LINUX_SYS_send 9 -#define LINUX_SYS_recv 10 -#define LINUX_SYS_sendto 11 -#define LINUX_SYS_recvfrom 12 -#define LINUX_SYS_shutdown 13 -#define LINUX_SYS_setsockopt 14 -#define LINUX_SYS_getsockopt 15 -#define LINUX_SYS_sendmsg 16 -#define LINUX_SYS_recvmsg 17 - -#define LINUX_MAX_SOCKETCALL 17 - - -/* - * Structures for the arguments of the different system calls. This looks - * a little better than copyin() of all values one by one. - */ - -/* !!!: This should be at least as large as any other struct here. */ -struct linux_socketcall_dummy_args { - int dummy_ints[4]; /* Max 4 ints */ - void * dummy_ptrs[3]; /* Max 3 pointers */ -}; - -struct linux_sys_socket_args { - syscallarg(int) domain; - syscallarg(int) type; - syscallarg(int) protocol; -}; - -struct linux_sys_socketpair_args { - syscallarg(int) domain; - syscallarg(int) type; - syscallarg(int) protocol; - syscallarg(int *) rsv; -}; - -struct linux_sys_sendto_args { - syscallarg(int) s; - syscallarg(void *) msg; - syscallarg(int) len; - syscallarg(int) flags; - syscallarg(struct sockaddr *) to; - syscallarg(int) tolen; -}; - -struct linux_sys_recvfrom_args { - syscallarg(int) s; - syscallarg(void *) buf; - syscallarg(int) len; - syscallarg(int) flags; - syscallarg(struct sockaddr *) from; - syscallarg(int *) fromlen; -}; - -struct linux_sys_setsockopt_args { - syscallarg(int) s; - syscallarg(int) level; - syscallarg(int) optname; - syscallarg(void *) optval; - syscallarg(int) optlen; -}; - -struct linux_sys_getsockopt_args { - syscallarg(int) s; - syscallarg(int) level; - syscallarg(int) optname; - syscallarg(void *) optval; - syscallarg(int *) optlen; -}; - -/* These are only used for their size: */ - -struct linux_sys_bind_args { - syscallarg(int) s; - syscallarg(struct sockaddr *) name; - syscallarg(int) namelen; -}; - -struct linux_sys_connect_args { - syscallarg(int) s; - syscallarg(struct sockaddr *) name; - syscallarg(int) namelen; -}; - -struct linux_sys_listen_args { - syscallarg(int) s; - syscallarg(int) backlog; -}; - -struct linux_sys_accept_args { - syscallarg(int) s; - syscallarg(struct sockaddr *) addr; - syscallarg(int *) namelen; -}; - -struct linux_sys_getsockname_args { - syscallarg(int) s; - syscallarg(struct sockaddr *) addr; - syscallarg(int *) namelen; -}; - -struct linux_sys_getpeername_args { - syscallarg(int) s; - syscallarg(struct sockaddr *) addr; - syscallarg(int *) namelen; -}; - -struct linux_sys_send_args { - syscallarg(int) s; - syscallarg(void *) msg; - syscallarg(int) len; - syscallarg(int) flags; -}; - -struct linux_sys_recv_args { - syscallarg(int) s; - syscallarg(void *) msg; - syscallarg(int) len; - syscallarg(int) flags; -}; - -struct linux_sys_shutdown_args { - syscallarg(int) s; - syscallarg(int) how; -}; - -struct linux_sys_sendmsg_args { - syscallarg(int) s; - syscallarg(struct msghdr *) msg; - syscallarg(u_int) flags; -}; - -struct linux_sys_recvmsg_args { - syscallarg(int) s; - syscallarg(struct msghdr *) msg; - syscallarg(u_int) flags; -}; - -#ifdef _KERNEL -__BEGIN_DECLS -int linux_sys_socket __P((struct proc *, void *, register_t *)); -int linux_sys_socketpair __P((struct proc *, void *, register_t *)); -int linux_sys_sendto __P((struct proc *, void *, register_t *)); -int linux_sys_recvfrom __P((struct proc *, void *, register_t *)); -int linux_sys_setsockopt __P((struct proc *, void *, register_t *)); -int linux_sys_getsockopt __P((struct proc *, void *, register_t *)); -__END_DECLS -#endif /* !_KERNEL */ - -#endif /* !_MULTIARCH_LINUX_SOCKETCALL_H */ diff --git a/sys/compat/linux/ppc/Makefile b/sys/compat/linux/ppc/Makefile deleted file mode 100644 index c527f8f1bde..00000000000 --- a/sys/compat/linux/ppc/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -# $NetBSD: Makefile,v 1.1 1998/09/30 21:55:59 erh Exp $ - -.include <../Makefile.inc> diff --git a/sys/compat/linux/ppc/linux_mmap.h b/sys/compat/linux/ppc/linux_mmap.h deleted file mode 100644 index c45ecd00770..00000000000 --- a/sys/compat/linux/ppc/linux_mmap.h +++ /dev/null @@ -1,57 +0,0 @@ -/* $NetBSD: linux_mmap.h,v 1.1 1998/09/30 21:55:59 erh Exp $ */ - -/*- - * Copyright (c) 1998 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Eric Haszlakiewicz. - * - * 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. - */ - -#ifndef _PPC_LINUX_MMAP_H -#define _PPC_LINUX_MMAP_H - -/* LINUX_PROT_* defined in common/linux_mmap.h */ - -/* LINUX_MAP_SHARED/PRIVATE defined in common/linux_mmap.h */ - -#define LINUX_MAP_FIXED 0x0010 -#define LINUX_MAP_ANON 0x0020 - -/* Ignored */ -#define LINUX_MAP_NORESERVE 0x0040 -#define LINUX_MAP_GROWSDOWN 0x0100 -#define LINUX_MAP_DENYWRITE 0x0800 -#define LINUX_MAP_EXECUTABLE 0x1000 - -#define LINUX_MAP_IGNMASK 0x1940 - -#endif /* !_PPC_LINUX_MMAP_H */ diff --git a/sys/compat/linux/ppc/syscalls.conf b/sys/compat/linux/ppc/syscalls.conf deleted file mode 100644 index 40b6fdebf95..00000000000 --- a/sys/compat/linux/ppc/syscalls.conf +++ /dev/null @@ -1,12 +0,0 @@ -# $NetBSD: syscalls.conf,v 1.1 1998/09/30 21:55:59 erh Exp $ - -sysnames="linux_syscalls.c" -sysnumhdr="linux_syscall.h" -syssw="linux_sysent.c" -sysarghdr="linux_syscallargs.h" -compatopts="" -libcompatopts="" - -switchname="linux_sysent" -namesname="linux_syscallnames" -constprefix="LINUX_SYS_" diff --git a/sys/compat/linux/sparc/Makefile b/sys/compat/linux/sparc/Makefile deleted file mode 100644 index c527f8f1bde..00000000000 --- a/sys/compat/linux/sparc/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -# $NetBSD: Makefile,v 1.1 1998/09/30 21:55:59 erh Exp $ - -.include <../Makefile.inc> diff --git a/sys/compat/linux/sparc/linux_mmap.h b/sys/compat/linux/sparc/linux_mmap.h deleted file mode 100644 index 5739220d4c6..00000000000 --- a/sys/compat/linux/sparc/linux_mmap.h +++ /dev/null @@ -1,59 +0,0 @@ -/* $NetBSD: linux_mmap.h,v 1.1 1998/09/30 21:55:59 erh Exp $ */ - -/*- - * Copyright (c) 1998 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Eric Haszlakiewicz. - * - * 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. - */ -#ifndef _SPARC_LINUX_MMAP_H -#define _SPARC_LINUX_MMAP_H - -/* LINUX_PROT_* defined in common/linux_mmap.h */ - -/* LINUX_MAP_SHARED/PRIVATE defined in common/linux_mmap.h */ - -#define LINUX_MAP_FIXED 0x0010 -#define LINUX_MAP_ANON 0x0020 - -/* Ignored */ -#define LINUX_MAP_NORESERVE 0x0040 -#define LINUX_MAP_INHERIT 0x0080 -#define LINUX_MAP_LOCKED 0x0100 - -#define LINUX_MAP_GROWSDOWN 0x0100 -#define LINUX_MAP_DENYWRITE 0x0800 -#define LINUX_MAP_EXECUTABLE 0x1000 - -#define LINUX_MAP_IGNMASK 0x19c0 - -#endif /* !_SPARC_LINUX_MMAP_H */ diff --git a/sys/compat/linux/sparc/syscalls.conf b/sys/compat/linux/sparc/syscalls.conf deleted file mode 100644 index 40b6fdebf95..00000000000 --- a/sys/compat/linux/sparc/syscalls.conf +++ /dev/null @@ -1,12 +0,0 @@ -# $NetBSD: syscalls.conf,v 1.1 1998/09/30 21:55:59 erh Exp $ - -sysnames="linux_syscalls.c" -sysnumhdr="linux_syscall.h" -syssw="linux_sysent.c" -sysarghdr="linux_syscallargs.h" -compatopts="" -libcompatopts="" - -switchname="linux_sysent" -namesname="linux_syscallnames" -constprefix="LINUX_SYS_" diff --git a/sys/compat/linux/sparc64/Makefile b/sys/compat/linux/sparc64/Makefile deleted file mode 100644 index 048d4744444..00000000000 --- a/sys/compat/linux/sparc64/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -# $NetBSD: Makefile,v 1.1 1998/09/30 21:56:00 erh Exp $ - -.include <../Makefile.inc> diff --git a/sys/compat/linux/sparc64/syscalls.conf b/sys/compat/linux/sparc64/syscalls.conf deleted file mode 100644 index 4fb35567c40..00000000000 --- a/sys/compat/linux/sparc64/syscalls.conf +++ /dev/null @@ -1,12 +0,0 @@ -# $NetBSD: syscalls.conf,v 1.1 1998/09/30 21:56:00 erh Exp $ - -sysnames="linux_syscalls.c" -sysnumhdr="linux_syscall.h" -syssw="linux_sysent.c" -sysarghdr="linux_syscallargs.h" -compatopts="" -libcompatopts="" - -switchname="linux_sysent" -namesname="linux_syscallnames" -constprefix="LINUX_SYS_" |
