From ba0aa175c4da9ccc83d06676ced52fbcbd994030 Mon Sep 17 00:00:00 2001 From: maxv Date: Mon, 25 Mar 2019 19:24:29 +0000 Subject: [PATCH] Remove compat_osf1, discussed on tech-kern@. --- distrib/sets/lists/man/mi | 8 +- share/man/man4/options.4 | 11 +- share/man/man7/hier.7 | 8 +- share/man/man7/symlink.7 | 5 +- share/man/man8/Makefile | 4 +- share/man/man8/compat_osf1.8 | 123 -- sys/arch/alpha/alpha/compat_16_machdep.c | 11 +- sys/arch/alpha/alpha/fp_complete.c | 20 +- sys/arch/alpha/alpha/machdep.c | 5 +- sys/arch/alpha/alpha/osf1_sigcode.s | 83 - sys/arch/alpha/alpha/osf1_syscall.c | 310 ---- sys/arch/alpha/conf/GENERIC | 7 +- sys/arch/alpha/conf/files.alpha | 11 +- sys/arch/alpha/include/frame.h | 6 +- sys/arch/alpha/include/signal.h | 9 +- sys/compat/Makefile | 4 +- sys/compat/Makefile.syscall | 4 +- sys/compat/osf1/Makefile | 5 - sys/compat/osf1/README.dynamic | 54 - sys/compat/osf1/README.mach-traps | 74 - sys/compat/osf1/README.syscalls | 163 -- sys/compat/osf1/files.osf1 | 38 - sys/compat/osf1/osf1.h | 656 -------- sys/compat/osf1/osf1_cvt.c | 629 -------- sys/compat/osf1/osf1_cvt.h | 96 -- sys/compat/osf1/osf1_descrip.c | 271 ---- sys/compat/osf1/osf1_dirent.h | 47 - sys/compat/osf1/osf1_errno.c | 146 -- sys/compat/osf1/osf1_errno.h | 148 -- sys/compat/osf1/osf1_exec.c | 101 -- sys/compat/osf1/osf1_exec.h | 45 - sys/compat/osf1/osf1_exec_ecoff.c | 305 ---- sys/compat/osf1/osf1_file.c | 437 ------ sys/compat/osf1/osf1_generic.c | 178 --- sys/compat/osf1/osf1_ioctl.c | 231 --- sys/compat/osf1/osf1_misc.c | 426 ----- sys/compat/osf1/osf1_mmap.c | 219 --- sys/compat/osf1/osf1_mod.c | 84 - sys/compat/osf1/osf1_mount.c | 313 ---- sys/compat/osf1/osf1_prot.c | 117 -- sys/compat/osf1/osf1_resource.c | 158 -- sys/compat/osf1/osf1_signal.c | 299 ---- sys/compat/osf1/osf1_signal.h | 50 - sys/compat/osf1/osf1_signo.c | 116 -- sys/compat/osf1/osf1_socket.c | 193 --- sys/compat/osf1/osf1_syscall.h | 428 ----- sys/compat/osf1/osf1_syscallargs.h | 837 ---------- sys/compat/osf1/osf1_syscalls.c | 1059 ------------- sys/compat/osf1/osf1_sysent.c | 1798 ---------------------- sys/compat/osf1/osf1_sysv_ipc.c | 78 - sys/compat/osf1/osf1_time.c | 185 --- sys/compat/osf1/syscalls.conf | 13 - sys/compat/osf1/syscalls.master | 394 ----- sys/conf/files | 3 +- sys/sys/ioctl.h | 5 +- usr.bin/kdump/setemul.c | 12 +- 56 files changed, 42 insertions(+), 10998 deletions(-) delete mode 100644 share/man/man8/compat_osf1.8 delete mode 100644 sys/arch/alpha/alpha/osf1_sigcode.s delete mode 100644 sys/arch/alpha/alpha/osf1_syscall.c delete mode 100644 sys/compat/osf1/Makefile delete mode 100644 sys/compat/osf1/README.dynamic delete mode 100644 sys/compat/osf1/README.mach-traps delete mode 100644 sys/compat/osf1/README.syscalls delete mode 100644 sys/compat/osf1/files.osf1 delete mode 100644 sys/compat/osf1/osf1.h delete mode 100644 sys/compat/osf1/osf1_cvt.c delete mode 100644 sys/compat/osf1/osf1_cvt.h delete mode 100644 sys/compat/osf1/osf1_descrip.c delete mode 100644 sys/compat/osf1/osf1_dirent.h delete mode 100644 sys/compat/osf1/osf1_errno.c delete mode 100644 sys/compat/osf1/osf1_errno.h delete mode 100644 sys/compat/osf1/osf1_exec.c delete mode 100644 sys/compat/osf1/osf1_exec.h delete mode 100644 sys/compat/osf1/osf1_exec_ecoff.c delete mode 100644 sys/compat/osf1/osf1_file.c delete mode 100644 sys/compat/osf1/osf1_generic.c delete mode 100644 sys/compat/osf1/osf1_ioctl.c delete mode 100644 sys/compat/osf1/osf1_misc.c delete mode 100644 sys/compat/osf1/osf1_mmap.c delete mode 100644 sys/compat/osf1/osf1_mod.c delete mode 100644 sys/compat/osf1/osf1_mount.c delete mode 100644 sys/compat/osf1/osf1_prot.c delete mode 100644 sys/compat/osf1/osf1_resource.c delete mode 100644 sys/compat/osf1/osf1_signal.c delete mode 100644 sys/compat/osf1/osf1_signal.h delete mode 100644 sys/compat/osf1/osf1_signo.c delete mode 100644 sys/compat/osf1/osf1_socket.c delete mode 100644 sys/compat/osf1/osf1_syscall.h delete mode 100644 sys/compat/osf1/osf1_syscallargs.h delete mode 100644 sys/compat/osf1/osf1_syscalls.c delete mode 100644 sys/compat/osf1/osf1_sysent.c delete mode 100644 sys/compat/osf1/osf1_sysv_ipc.c delete mode 100644 sys/compat/osf1/osf1_time.c delete mode 100644 sys/compat/osf1/syscalls.conf delete mode 100644 sys/compat/osf1/syscalls.master diff --git a/distrib/sets/lists/man/mi b/distrib/sets/lists/man/mi index 18356466333a..45f5c5d15db3 100644 --- a/distrib/sets/lists/man/mi +++ b/distrib/sets/lists/man/mi @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.1640 2019/03/17 00:35:09 tnn Exp $ +# $NetBSD: mi,v 1.1641 2019/03/25 19:24:29 maxv Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. # @@ -2448,7 +2448,7 @@ ./usr/share/man/cat8/compat_ibcs2.0 man-obsolete obsolete ./usr/share/man/cat8/compat_linux.0 man-sys-catman .cat ./usr/share/man/cat8/compat_netbsd32.0 man-sys-catman .cat -./usr/share/man/cat8/compat_osf1.0 man-sys-catman .cat +./usr/share/man/cat8/compat_osf1.0 man-obsolete obsolete ./usr/share/man/cat8/compat_pecoff.0 man-obsolete obsolete ./usr/share/man/cat8/compat_sco.0 man-obsolete obsolete ./usr/share/man/cat8/compat_solaris.0 man-obsolete obsolete @@ -5467,7 +5467,7 @@ ./usr/share/man/html8/compat_ibcs2.html man-obsolete obsolete ./usr/share/man/html8/compat_linux.html man-sys-htmlman html ./usr/share/man/html8/compat_netbsd32.html man-sys-htmlman html -./usr/share/man/html8/compat_osf1.html man-sys-htmlman html +./usr/share/man/html8/compat_osf1.html man-obsolete obsolete ./usr/share/man/html8/compat_pecoff.html man-obsolete obsolete ./usr/share/man/html8/compat_sco.html man-obsolete obsolete ./usr/share/man/html8/compat_solaris.html man-obsolete obsolete @@ -8539,7 +8539,7 @@ ./usr/share/man/man8/compat_ibcs2.8 man-obsolete obsolete ./usr/share/man/man8/compat_linux.8 man-sys-man .man ./usr/share/man/man8/compat_netbsd32.8 man-sys-man .man -./usr/share/man/man8/compat_osf1.8 man-sys-man .man +./usr/share/man/man8/compat_osf1.8 man-obsolete obsolete ./usr/share/man/man8/compat_pecoff.8 man-obsolete obsolete ./usr/share/man/man8/compat_sco.8 man-obsolete obsolete ./usr/share/man/man8/compat_solaris.8 man-obsolete obsolete diff --git a/share/man/man4/options.4 b/share/man/man4/options.4 index dbeec5876426..5a2b754afa96 100644 --- a/share/man/man4/options.4 +++ b/share/man/man4/options.4 @@ -1,4 +1,4 @@ -.\" $NetBSD: options.4,v 1.497 2018/12/29 11:30:11 maxv Exp $ +.\" $NetBSD: options.4,v 1.498 2019/03/25 19:24:30 maxv Exp $ .\" .\" Copyright (c) 1996 .\" Perry E. Metzger. All rights reserved. @@ -30,7 +30,7 @@ .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" .\" -.Dd December 29, 2018 +.Dd March 25, 2019 .Dt OPTIONS 4 .Os .Sh NAME @@ -440,13 +440,6 @@ compatibility with .Fx applications built for the same architecture. At the moment this is limited to the i386 port. -.It Cd options COMPAT_OSF1 -On those architectures that support it, this enables binary -compatibility with Digital -.Ux -(formerly OSF/1) -applications built for the same architecture. -This is currently limited to the alpha port. .It Cd options COMPAT_NOMID Enable compatibility with .Xr a.out 5 diff --git a/share/man/man7/hier.7 b/share/man/man7/hier.7 index 14aac75bc5b4..88fda0cf1400 100644 --- a/share/man/man7/hier.7 +++ b/share/man/man7/hier.7 @@ -1,4 +1,4 @@ -.\" $NetBSD: hier.7,v 1.135 2018/12/29 11:30:11 maxv Exp $ +.\" $NetBSD: hier.7,v 1.136 2019/03/25 19:24:30 maxv Exp $ .\" .\" Copyright (c) 1990, 1993, 1994 .\" The Regents of the University of California. All rights reserved. @@ -29,7 +29,7 @@ .\" .\" @(#)hier.7 8.5 (Berkeley) 6/1/94 .\" -.Dd December 29, 2018 +.Dd March 25, 2019 .Dt HIER 7 .Os .Sh NAME @@ -893,10 +893,6 @@ Support for 4KB page 68000 binaries. Support for .Nx 32-bit binaries on 64 bit platforms with compatible CPU families. -.It Pa osf1/ -Support for Digital -.Ux -(formerly OSF/1) binaries. .It Pa ossaudio/ Support for OSS audio. .It Pa sunos/ diff --git a/share/man/man7/symlink.7 b/share/man/man7/symlink.7 index b5d27bf6036b..d36f0c555eb9 100644 --- a/share/man/man7/symlink.7 +++ b/share/man/man7/symlink.7 @@ -1,4 +1,4 @@ -.\" $NetBSD: symlink.7,v 1.28 2018/12/29 11:33:00 maxv Exp $ +.\" $NetBSD: symlink.7,v 1.29 2019/03/25 19:24:30 maxv Exp $ .\" .\" Copyright (c) 1992, 1993, 1994 .\" The Regents of the University of California. All rights reserved. @@ -29,7 +29,7 @@ .\" .\" @(#)symlink.7 8.3 (Berkeley) 3/31/94 .\" -.Dd December 29, 2018 +.Dd March 25, 2019 .Dt SYMLINK 7 .Os .Sh NAME @@ -569,7 +569,6 @@ Other valid emulations are: .Dv linux32 , .Dv m68k4k , .Dv netbsd32 , -.Dv osf1 , .Dv sunos , .Dv sunos32 , .Dv ultrix , diff --git a/share/man/man8/Makefile b/share/man/man8/Makefile index abfbbafacb65..87e34325594f 100644 --- a/share/man/man8/Makefile +++ b/share/man/man8/Makefile @@ -1,9 +1,9 @@ -# $NetBSD: Makefile,v 1.107 2018/12/29 11:30:11 maxv Exp $ +# $NetBSD: Makefile,v 1.108 2019/03/25 19:24:30 maxv Exp $ # from: @(#)Makefile 8.1 (Berkeley) 6/5/93 MAN= MAKEDEV.8 MAKEDEV.local.8 afterboot.8 boot.8 compat_30.8 \ compat_freebsd.8 compat_linux.8 \ - compat_netbsd32.8 compat_osf1.8 compat_sunos.8 \ + compat_netbsd32.8 compat_sunos.8 \ compat_ultrix.8 diskless.8 hpcboot.8 \ intro.8 nis.8 pam.8 rc.8 rc.subr.8 rescue.8 \ sysinst.8 veriexec.8 \ diff --git a/share/man/man8/compat_osf1.8 b/share/man/man8/compat_osf1.8 deleted file mode 100644 index b017df054d3f..000000000000 --- a/share/man/man8/compat_osf1.8 +++ /dev/null @@ -1,123 +0,0 @@ -.\" $NetBSD: compat_osf1.8,v 1.12 2008/04/30 13:10:57 martin Exp $ -.\" -.\" Copyright (c) 1999 The NetBSD Foundation, Inc. -.\" All rights reserved. -.\" -.\" This code is derived from software contributed to The NetBSD Foundation -.\" by Roland C. Dowdeswell. -.\" -.\" 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. -.\" -.\" 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. -.\" -.Dd November 4, 1999 -.Dt COMPAT_OSF1 8 -.Os -.Sh NAME -.Nm compat_osf1 -.Nd setup procedure for running OSF/1 binaries -.Sh DESCRIPTION -.Nx -supports running OSF/1 (a.k.a Digital Unix, a.k.a. Tru64) binaries on -.Nx Ns Tn /alpha -systems. -Most programs should work, including the ones that use the shared object -libraries. -Programs that make direct MACH system calls will not work. -The OSF/1 compatibility feature is active for kernels compiled with the -.Dv COMPAT_OSF1 -option enabled (see -.Xr options 4 ) . -.Pp -To run dynamically linked programs, you will need the OSF/1 shared libraries, -runtime linker, and certain configuration files found in /etc. -These are installed in a -.Dq shadow root -directory called -.Pa /emul/osf1 . -Any file operations done by OSF/1 programs run under -.Nx -will look in this directory first, and fall back to the file system proper. -So, if an OSF/1 program opens -.Pa /etc/svc.conf , -.Nx -will first try to open -.Pa /emul/osf1/etc/svc.conf , -and if that file does not exist it will then try -.Pa /etc/svc.conf . -Shared libraries and configuration specific to OSF/1 should be installed -in the shadow tree. -.Ss Setting up /emul/osf1 -The simple technique is to install pkgsrc/emulators/osf1_lib. -(You may -also want to install pkgsrc/www/navigator and/or pkgsrc/www/communicator.) -.Pp -Alternatively, if you have access to an OSF/1 machine and if the licensing -details permit, you can copy the contents of: -.Bl -item -compact -offset indent -.It -.Pa /shlib -.It -.Pa /usr/shlib -.It -.Pa /etc/sia -.It -.Pa /usr/lib/X11/locale -.El -.Pp -(The latter is required to run Netscape Navigator or Communicator.) -.Pp -Also copy -.Bl -item -compact -offset indent -.It -.Pa /etc/svc.conf -.It -.Pa /usr/ccs/lib/cmplrs/otabase/libots.so -.It -.Pa /sbin/loader -.El -.Pp -Or, simply NFS mount the appropriate directories under -.Pa /emul/osf1 . -.Sh SEE ALSO -.Xr config 1 , -.Xr options 4 -.Sh BUGS -Your -.Xr hostname 1 -.Em must -contain a dot -.Em or -your -.Xr resolv.conf 5 -must contain a -.Li search -line. -Without one of those, the OSF/1 resolver will die and no hostname -resolution will be possible. -.Pp -Certain values in -.Pa /emul/osf1/etc/svc.conf -can cause programs to fail with -.Dq Bad system call . -.Pp -Pathnames pointed to by symbolic links are not looked up in the -shadow root when running an OSF/1 executable. -This is not consistent. diff --git a/sys/arch/alpha/alpha/compat_16_machdep.c b/sys/arch/alpha/alpha/compat_16_machdep.c index 9945e597e3e6..faeefb16c30b 100644 --- a/sys/arch/alpha/alpha/compat_16_machdep.c +++ b/sys/arch/alpha/alpha/compat_16_machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: compat_16_machdep.c,v 1.21 2017/03/16 16:13:20 chs Exp $ */ +/* $NetBSD: compat_16_machdep.c,v 1.22 2019/03/25 19:24:30 maxv Exp $ */ /*- * Copyright (c) 2003 The NetBSD Foundation, Inc. @@ -63,7 +63,6 @@ #include "opt_multiprocessor.h" #include "opt_dec_3000_300.h" #include "opt_dec_3000_500.h" -#include "opt_compat_osf1.h" #include "opt_compat_netbsd.h" #include "opt_execfmt.h" #endif /* _KERNEL_OPT */ @@ -78,7 +77,7 @@ #include #include -#if defined(COMPAT_13) || defined(COMPAT_OSF1) +#if defined(COMPAT_13) #include #include #endif @@ -86,7 +85,7 @@ #include #include -__KERNEL_RCSID(0, "$NetBSD: compat_16_machdep.c,v 1.21 2017/03/16 16:13:20 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: compat_16_machdep.c,v 1.22 2019/03/25 19:24:30 maxv Exp $"); #ifdef DEBUG @@ -146,7 +145,7 @@ sendsig_sigcontext(const ksiginfo_t *ksi, const sigset_t *mask) /* Save signal mask. */ frame.sf_sc.sc_mask = *mask; -#if defined(COMPAT_13) || defined(COMPAT_OSF1) +#if defined(COMPAT_13) /* * XXX We always have to save an old style signal mask because * XXX we might be delivering a signal to a process which will @@ -231,7 +230,7 @@ sendsig_sigcontext(const ksiginfo_t *ksi, const sigset_t *mask) #endif } -#ifdef COMPAT_16 /* not needed if COMPAT_OSF1 only */ +#ifdef COMPAT_16 /* * System call to cleanup state after a signal * has been taken. Reset signal mask and diff --git a/sys/arch/alpha/alpha/fp_complete.c b/sys/arch/alpha/alpha/fp_complete.c index c19ee22b53ee..796035c9c4b6 100644 --- a/sys/arch/alpha/alpha/fp_complete.c +++ b/sys/arch/alpha/alpha/fp_complete.c @@ -1,4 +1,4 @@ -/* $NetBSD: fp_complete.c,v 1.22 2017/12/31 11:43:42 martin Exp $ */ +/* $NetBSD: fp_complete.c,v 1.23 2019/03/25 19:24:30 maxv Exp $ */ /*- * Copyright (c) 2001 Ross Harvey @@ -35,9 +35,7 @@ #include /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: fp_complete.c,v 1.22 2017/12/31 11:43:42 martin Exp $"); - -#include "opt_compat_osf1.h" +__KERNEL_RCSID(0, "$NetBSD: fp_complete.c,v 1.23 2019/03/25 19:24:30 maxv Exp $"); #include #include @@ -45,10 +43,6 @@ __KERNEL_RCSID(0, "$NetBSD: fp_complete.c,v 1.22 2017/12/31 11:43:42 martin Exp #include #include -#ifdef COMPAT_OSF1 -#include -#endif - #include #include #include @@ -658,12 +652,6 @@ alpha_fp_complete(u_long a0, u_long a1, struct lwp *l, uint64_t *ucode) * interpret this one instruction in SW. If a SIGFPE is not required, back up * the PC until just after this instruction and restart. This will execute all * trap shadow instructions between the trigger pc and the trap pc twice. - * - * If a SIGFPE is generated from the OSF1 emulation, back up one more - * instruction to the trigger pc itself. Native binaries don't because it - * is non-portable and completely defeats the intended purpose of IEEE - * traps -- for example, to count the number of exponent wraps for a later - * correction. */ trigger_pc = 0; win_begin = pc; @@ -712,10 +700,6 @@ alpha_fp_complete(u_long a0, u_long a1, struct lwp *l, uint64_t *ucode) done: if (sig) { usertrap_pc = trigger_pc + 1; -#ifdef COMPAT_OSF1 - if (l->l_proc->p_emul == &emul_osf1) - usertrap_pc = trigger_pc; -#endif l->l_md.md_tf->tf_regs[FRAME_PC] = (unsigned long)usertrap_pc; return sig; } diff --git a/sys/arch/alpha/alpha/machdep.c b/sys/arch/alpha/alpha/machdep.c index f34a5c48b469..9bf859276da0 100644 --- a/sys/arch/alpha/alpha/machdep.c +++ b/sys/arch/alpha/alpha/machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.352 2018/11/27 14:09:53 maxv Exp $ */ +/* $NetBSD: machdep.c,v 1.353 2019/03/25 19:24:30 maxv Exp $ */ /*- * Copyright (c) 1998, 1999, 2000 The NetBSD Foundation, Inc. @@ -63,12 +63,11 @@ #include "opt_multiprocessor.h" #include "opt_dec_3000_300.h" #include "opt_dec_3000_500.h" -#include "opt_compat_osf1.h" #include "opt_execfmt.h" #include /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.352 2018/11/27 14:09:53 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.353 2019/03/25 19:24:30 maxv Exp $"); #include #include diff --git a/sys/arch/alpha/alpha/osf1_sigcode.s b/sys/arch/alpha/alpha/osf1_sigcode.s deleted file mode 100644 index 5f3620511fad..000000000000 --- a/sys/arch/alpha/alpha/osf1_sigcode.s +++ /dev/null @@ -1,83 +0,0 @@ -/* $NetBSD: osf1_sigcode.s,v 1.3 2002/07/01 03:10:02 thorpej Exp $ */ - -/* - * Copyright (c) 1999 Christopher G. Demetriou. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Christopher G. Demetriou - * for the NetBSD Project. - * 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. - */ - -/* - * Copyright (c) 1994, 1995, 1996 Carnegie-Mellon University. - * All rights reserved. - * - * Author: Chris G. Demetriou - * - * Permission to use, copy, modify and distribute this software and - * its documentation is hereby granted, provided that both the copyright - * notice and this permission notice appear in all copies of the - * software, derivative works or modified versions, and any portions - * thereof, and that both notices appear in supporting documentation. - * - * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" - * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND - * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. - * - * Carnegie Mellon requests users of this software to return to - * - * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU - * School of Computer Science - * Carnegie Mellon University - * Pittsburgh PA 15213-3890 - * - * any improvements or extensions that they make and grant Carnegie the - * rights to redistribute these changes. - */ - -#include - -#include - -__KERNEL_RCSID(0, "$NetBSD: osf1_sigcode.s,v 1.3 2002/07/01 03:10:02 thorpej Exp $"); - -/* - * OSF/1 signal trampoline code. - */ - -#define OSF1_SYSCALLNUM(name) \ - ___CONCAT(OSF1_SYS_,name) - -#define OSF1_CALLSYS_NOERROR(name) \ - ldiq v0, OSF1_SYSCALLNUM(name); \ - call_pal PAL_OSF1_callsys - -NESTED_NOPROFILE(osf1_sigcode,0,0,ra,0,0) - mov sp, a0 - OSF1_CALLSYS_NOERROR(sigreturn) - mov v0, a0 - OSF1_CALLSYS_NOERROR(exit) -XNESTED(osf1_esigcode,0) - END(osf1_sigcode) diff --git a/sys/arch/alpha/alpha/osf1_syscall.c b/sys/arch/alpha/alpha/osf1_syscall.c deleted file mode 100644 index b98b6edcad51..000000000000 --- a/sys/arch/alpha/alpha/osf1_syscall.c +++ /dev/null @@ -1,310 +0,0 @@ -/* $NetBSD: osf1_syscall.c,v 1.35 2015/03/07 18:51:44 christos Exp $ */ - -/*- - * Copyright (c) 2000 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Jason R. Thorpe of the Numerical Aerospace Simulation Facility, - * NASA Ames Research Center, and by Charles M. Hannum. - * - * 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. - * - * 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) 1999 Christopher G. Demetriou. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Christopher G. Demetriou - * for the NetBSD Project. - * 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. - */ - -/* - * Copyright (c) 1994, 1995, 1996 Carnegie-Mellon University. - * All rights reserved. - * - * Author: Chris G. Demetriou - * - * Permission to use, copy, modify and distribute this software and - * its documentation is hereby granted, provided that both the copyright - * notice and this permission notice appear in all copies of the - * software, derivative works or modified versions, and any portions - * thereof, and that both notices appear in supporting documentation. - * - * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" - * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND - * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. - * - * Carnegie Mellon requests users of this software to return to - * - * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU - * School of Computer Science - * Carnegie Mellon University - * Pittsburgh PA 15213-3890 - * - * any improvements or extensions that they make and grant Carnegie the - * rights to redistribute these changes. - */ - -#include /* RCS ID & Copyright macro defns */ - -__KERNEL_RCSID(0, "$NetBSD: osf1_syscall.c,v 1.35 2015/03/07 18:51:44 christos Exp $"); - -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#include -#include -#include - -void osf1_syscall_intern(struct proc *); -void osf1_syscall_plain(struct lwp *, uint64_t, struct trapframe *); -void osf1_syscall_fancy(struct lwp *, uint64_t, struct trapframe *); - -void -osf1_syscall_intern(struct proc *p) -{ - - if (trace_is_enabled(p)) - p->p_md.md_syscall = osf1_syscall_fancy; - else - p->p_md.md_syscall = osf1_syscall_plain; -} - -/* - * Process a system call. - * - * System calls are strange beasts. They are passed the syscall number - * in v0, and the arguments in the registers (as normal). They return - * an error flag in a3 (if a3 != 0 on return, the syscall had an error), - * and the return value (if any) in v0. - * - * The assembly stub takes care of moving the call number into a register - * we can get to, and moves all of the argument registers into their places - * in the trap frame. On return, it restores the callee-saved registers, - * a3, and v0 from the frame before returning to the user process. - */ -void -osf1_syscall_plain(struct lwp *l, uint64_t code, struct trapframe *framep) -{ - const struct sysent *callp; - int error; - uint64_t rval[2]; - uint64_t *args, copyargs[10]; /* XXX */ - u_int hidden, nargs; - struct proc *p = l->l_proc; - - LWP_CACHE_CREDS(l, p); - - curcpu()->ci_data.cpu_nsyscall++; - l->l_md.md_tf = framep; - - callp = p->p_emul->e_sysent; - - switch (code) { - case OSF1_SYS_syscall: - /* OSF/1 syscall() */ - code = framep->tf_regs[FRAME_A0]; - hidden = 1; - break; - default: - hidden = 0; - break; - } - - code &= (OSF1_SYS_NSYSENT - 1); - callp += code; - - nargs = callp->sy_narg + hidden; - switch (nargs) { - default: - error = copyin((void *)alpha_pal_rdusp(), ©args[6], - (nargs - 6) * sizeof(uint64_t)); - if (error) - goto bad; - case 6: - copyargs[5] = framep->tf_regs[FRAME_A5]; - case 5: - copyargs[4] = framep->tf_regs[FRAME_A4]; - case 4: - copyargs[3] = framep->tf_regs[FRAME_A3]; - copyargs[2] = framep->tf_regs[FRAME_A2]; - copyargs[1] = framep->tf_regs[FRAME_A1]; - copyargs[0] = framep->tf_regs[FRAME_A0]; - args = copyargs; - break; - case 3: - case 2: - case 1: - case 0: - args = &framep->tf_regs[FRAME_A0]; - break; - } - args += hidden; - - rval[0] = 0; - rval[1] = 0; - error = sy_call(callp, l, args, rval); - - switch (error) { - case 0: - framep->tf_regs[FRAME_V0] = rval[0]; - framep->tf_regs[FRAME_A4] = rval[1]; - framep->tf_regs[FRAME_A3] = 0; - break; - case ERESTART: - framep->tf_regs[FRAME_PC] -= 4; - break; - case EJUSTRETURN: - break; - default: - bad: - error = native_to_osf1_errno[error]; - framep->tf_regs[FRAME_V0] = error; - framep->tf_regs[FRAME_A3] = 1; - break; - } - - userret(l); -} - -void -osf1_syscall_fancy(struct lwp *l, uint64_t code, struct trapframe *framep) -{ - const struct sysent *callp; - int error; - uint64_t rval[2]; - uint64_t *args, copyargs[10]; - u_int hidden, nargs; - struct proc *p = l->l_proc; - - LWP_CACHE_CREDS(l, p); - - curcpu()->ci_data.cpu_nsyscall++; - l->l_md.md_tf = framep; - - callp = p->p_emul->e_sysent; - - switch (code) { - case OSF1_SYS_syscall: - /* OSF/1 syscall() */ - code = framep->tf_regs[FRAME_A0]; - hidden = 1; - break; - default: - hidden = 0; - break; - } - - code &= (OSF1_SYS_NSYSENT - 1); - callp += code; - - nargs = callp->sy_narg + hidden; - switch (nargs) { - default: - error = copyin((void *)alpha_pal_rdusp(), ©args[6], - (nargs - 6) * sizeof(uint64_t)); - if (error) { - args = copyargs; - goto bad; - } - case 6: - copyargs[5] = framep->tf_regs[FRAME_A5]; - case 5: - copyargs[4] = framep->tf_regs[FRAME_A4]; - case 4: - copyargs[3] = framep->tf_regs[FRAME_A3]; - copyargs[2] = framep->tf_regs[FRAME_A2]; - copyargs[1] = framep->tf_regs[FRAME_A1]; - copyargs[0] = framep->tf_regs[FRAME_A0]; - args = copyargs; - break; - case 3: - case 2: - case 1: - case 0: - args = &framep->tf_regs[FRAME_A0]; - break; - } - args += hidden; - - if ((error = trace_enter(code, callp, args)) != 0) - goto out; - - rval[0] = 0; - rval[1] = 0; - error = sy_call(callp, l, args, rval); -out: - switch (error) { - case 0: - framep->tf_regs[FRAME_V0] = rval[0]; - framep->tf_regs[FRAME_A4] = rval[1]; - framep->tf_regs[FRAME_A3] = 0; - break; - case ERESTART: - framep->tf_regs[FRAME_PC] -= 4; - break; - case EJUSTRETURN: - break; - default: - bad: - error = native_to_osf1_errno[error]; - framep->tf_regs[FRAME_V0] = error; - framep->tf_regs[FRAME_A3] = 1; - break; - } - - trace_exit(code, callp, args, rval, error); - - userret(l); -} diff --git a/sys/arch/alpha/conf/GENERIC b/sys/arch/alpha/conf/GENERIC index f5a715a0ceb4..45bcf06f4515 100644 --- a/sys/arch/alpha/conf/GENERIC +++ b/sys/arch/alpha/conf/GENERIC @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.390 2019/03/16 08:03:03 maxv Exp $ +# $NetBSD: GENERIC,v 1.391 2019/03/25 19:24:30 maxv Exp $ # # This machine description file is used to generate the default NetBSD # kernel. @@ -19,7 +19,7 @@ include "arch/alpha/conf/std.alpha" options INCLUDE_CONFIG_FILE # embed config file in kernel binary -ident "GENERIC-$Revision: 1.390 $" +ident "GENERIC-$Revision: 1.391 $" maxusers 32 @@ -129,9 +129,6 @@ options PPP_FILTER # Active filter support for PPP (requires bpf) # Binary compatibility with previous versions of NetBSD. include "conf/compat_netbsd09.config" -# OSF/1 binary compatibility -#options COMPAT_OSF1 - # Linux binary compatibility options COMPAT_LINUX diff --git a/sys/arch/alpha/conf/files.alpha b/sys/arch/alpha/conf/files.alpha index a90b5f27e08a..83c845bd87b1 100644 --- a/sys/arch/alpha/conf/files.alpha +++ b/sys/arch/alpha/conf/files.alpha @@ -1,4 +1,4 @@ -# $NetBSD: files.alpha,v 1.189 2018/02/22 07:30:43 mrg Exp $ +# $NetBSD: files.alpha,v 1.190 2019/03/25 19:24:30 maxv Exp $ # # alpha-specific configuration info @@ -422,13 +422,8 @@ file arch/alpha/alpha/db_trace.c ddb file arch/alpha/alpha/kgdb_machdep.c kgdb # Binary compatibility with previous NetBSD releases (COMPAT_XX) -file arch/alpha/alpha/compat_13_machdep.c compat_13 | compat_osf1 -file arch/alpha/alpha/compat_16_machdep.c compat_16 | compat_osf1 - -# OSF/1 Binary Compatibility (COMPAT_OSF1) -include "compat/osf1/files.osf1" -file arch/alpha/alpha/osf1_sigcode.s compat_osf1 -file arch/alpha/alpha/osf1_syscall.c compat_osf1 +file arch/alpha/alpha/compat_13_machdep.c compat_13 +file arch/alpha/alpha/compat_16_machdep.c compat_16 # Linux Binary Compatibility (COMPAT_LINUX) include "compat/linux/files.linux" diff --git a/sys/arch/alpha/include/frame.h b/sys/arch/alpha/include/frame.h index 828fa6bce3d0..ab78483d30e9 100644 --- a/sys/arch/alpha/include/frame.h +++ b/sys/arch/alpha/include/frame.h @@ -1,4 +1,4 @@ -/* $NetBSD: frame.h,v 1.9 2012/02/06 02:14:13 matt Exp $ */ +/* $NetBSD: frame.h,v 1.10 2019/03/25 19:24:30 maxv Exp $ */ /* * Copyright (c) 1994, 1995 Carnegie-Mellon University. @@ -92,7 +92,7 @@ struct trapframe { unsigned long tf_regs[FRAME_SIZE]; /* See above */ }; -#if (defined(COMPAT_16) || defined(COMPAT_OSF1)) && defined(_KERNEL) +#if defined(COMPAT_16) && defined(_KERNEL) struct sigframe_sigcontext { /* ra address of trampoline */ /* a0 signum for handler */ @@ -115,7 +115,7 @@ struct sigframe_siginfo { void *getframe(const struct lwp *, int, int *); void buildcontext(struct lwp *, const void *, const void *, const void *); void sendsig_siginfo(const ksiginfo_t *, const sigset_t *); -#if defined(COMPAT_16) || defined(COMPAT_OSF1) +#if defined(COMPAT_16) void sendsig_sigcontext(const ksiginfo_t *, const sigset_t *); #endif #endif diff --git a/sys/arch/alpha/include/signal.h b/sys/arch/alpha/include/signal.h index 2caa8b2890a9..e987289efc1f 100644 --- a/sys/arch/alpha/include/signal.h +++ b/sys/arch/alpha/include/signal.h @@ -1,4 +1,4 @@ -/* $NetBSD: signal.h,v 1.16 2012/02/06 02:14:13 matt Exp $ */ +/* $NetBSD: signal.h,v 1.17 2019/03/25 19:24:30 maxv Exp $ */ /* * Copyright (c) 1994, 1995 Carnegie-Mellon University. @@ -36,7 +36,6 @@ typedef long sig_atomic_t; #ifdef _KERNEL_OPT #include "opt_compat_netbsd.h" -#include "opt_compat_osf1.h" #endif /* @@ -49,7 +48,7 @@ typedef long sig_atomic_t; * Note that sc_regs[] and sc_fpregs[]+sc_fpcr are inline * representations of 'struct reg' and 'struct fpreg', respectively. */ -#if defined(_KERNEL) && (defined(COMPAT_13) || defined(COMPAT_OSF1)) +#if defined(_KERNEL) && defined(COMPAT_13) struct sigcontext13 { long sc_onstack; /* sigstack state to restore */ long sc_mask; /* signal mask to restore (old style) */ @@ -64,9 +63,9 @@ struct sigcontext13 { long sc_reserved[2]; /* XXX */ long sc_xxx[8]; /* XXX */ }; -#endif /* _KERNEL && (COMPAT_13 || COMPAT_OSF1) */ +#endif /* _KERNEL && COMPAT_13 */ -#if defined(_LIBC) || (defined(_KERNEL) && (defined(COMPAT_16) || defined(COMPAT_OSF1))) +#if defined(_LIBC) || (defined(_KERNEL) && defined(COMPAT_16)) struct sigcontext { long sc_onstack; /* sigstack state to restore */ long __sc_mask13; /* signal mask to restore (old style) */ diff --git a/sys/compat/Makefile b/sys/compat/Makefile index 4c9aa708f97f..022574e5262a 100644 --- a/sys/compat/Makefile +++ b/sys/compat/Makefile @@ -1,6 +1,6 @@ -# $NetBSD: Makefile,v 1.6 2018/12/29 11:30:12 maxv Exp $ +# $NetBSD: Makefile,v 1.7 2019/03/25 19:24:30 maxv Exp $ -#SUBDIR= common freebsd hpux linux m68k4k osf1 ossaudio sunos \ +#SUBDIR= common freebsd hpux linux m68k4k ossaudio sunos \ # ultrix netbsd32 sunos32 #INCSDIR= /usr/include/compat diff --git a/sys/compat/Makefile.syscall b/sys/compat/Makefile.syscall index e6e0d878bd71..d787a635f6a6 100644 --- a/sys/compat/Makefile.syscall +++ b/sys/compat/Makefile.syscall @@ -1,6 +1,6 @@ -# $NetBSD: Makefile.syscall,v 1.3 2018/12/29 11:30:12 maxv Exp $ +# $NetBSD: Makefile.syscall,v 1.4 2019/03/25 19:24:30 maxv Exp $ SUBDIR = aoutm68k freebsd linux linux32 netbsd32 -SUBDIR += osf1 sunos sunos32 ultrix +SUBDIR += sunos sunos32 ultrix .include diff --git a/sys/compat/osf1/Makefile b/sys/compat/osf1/Makefile deleted file mode 100644 index f8ba69f393af..000000000000 --- a/sys/compat/osf1/Makefile +++ /dev/null @@ -1,5 +0,0 @@ -# $NetBSD: Makefile,v 1.7 2014/01/14 18:51:25 christos Exp $ - -SYSCALL_PREFIX=osf1 - -.include diff --git a/sys/compat/osf1/README.dynamic b/sys/compat/osf1/README.dynamic deleted file mode 100644 index 3b5252a4fe03..000000000000 --- a/sys/compat/osf1/README.dynamic +++ /dev/null @@ -1,54 +0,0 @@ -$NetBSD: README.dynamic,v 1.3 1999/04/27 16:08:40 cgd Exp $ - -Dynamically linked programs are supported by NetBSD's Digital UNIX -(formerly DEC OSF/1) emulation. The OSF/1 dynamic linker scheme is -described in fair detail in: - - %A Larry W. Allen - %A Harminder G. Singh - %A Kevin G. Wallace - %A Melanie B. Weaver - %T Program Loading in OSF/1 - %P 145-160 - %I USENIX - %B USENIX Conference Proceedings - %D January 21-25, 1991 - %C Dallas, TX - %W Open Software Foundation - -Additionally, the object file formats in use are described in the -Digital UNIX _Assembly Language Programmer's Guide_ which can be -found (among other places) on a version-specific page off of: - - http://www.unix.digital.com/faqs/publications/pub_page/doc_list.html - -Finally, the actual representation of Auxiliary Vectors came from information -in the Digital UNIX auxv.h header file. - -There are at least two potential issues with the implementation as it -currently exists: - -1. exec_with_loader() is not emulated. - - Most uses of dynamically linked programs come through execve() - and use the default loader (/sbin/loader). In Digital UNIX - (and OSF/1) you can also force a specific loader to always be - invoked to load an executable by using the exec_with_loader() - system call. Few, if any, programs use this feature. - -2. It is not immediately obvious that the right values are used for - text and data locations when invoking a dynamically linked executable. - - The text and data sections, and the break, are set up as if - /sbin/loader itself had been executed. It's not clear that this - is correct, but /sbin/loader seems to expect that at least the - break will be set up this way. - - This has certain implications for the way mmap() behaves. See - the comment in the osf1_mmap() function in osf1_misc.c. - -3. The stack location is used is the normal NetBSD/alpha stack location. - - No attempt is made to put the stack in the place where - Digital UNIX would normally put it. This may confuse some - programs. diff --git a/sys/compat/osf1/README.mach-traps b/sys/compat/osf1/README.mach-traps deleted file mode 100644 index a20482d629fc..000000000000 --- a/sys/compat/osf1/README.mach-traps +++ /dev/null @@ -1,74 +0,0 @@ -$NetBSD: README.mach-traps,v 1.3 2001/06/04 20:06:41 nathanw Exp $ - -Some Alpha AXP OSF/1 binaries directly use the facilities provided by -the Mach kernel that is the basis for OSF/1. These include (but are -surely not limited to) 'dd', 'ps', and 'w'. - -Invariably, the symptom that these binaries display is that they crash -with an "unimplemented system call" trap (SIGSYS signal) for a syscall -that has a negative number. In general, binaries that use the Mach -syscalls appear to invoke task_self() as their first syscall. - -Note that system call numbers are now range-bounded by masking off the -high bits, so negative system call numbers will appear in the high -end of the system call number range, thanks to the wonders of two's -compliment arithmetic. System call -10, for example, will appear as -"CALL [502]" in kdump output. - -The name, number, and number of arguments for each Mach syscall is -given below; this information was gleaned by looking through the OSF/1 -libmach.a's object files with dbx, then double-checked against the -contents of OSF/1's . - -These calls would be very difficult to implement properly in the -OSF/1 emulation code; by its very nature, NetBSD is not Mach, and we -don't and can't provide the underlying facilities that it does. - --- cgd - -trap name number nargs notes ----- ---- ------ ----- ----- -task_self -10 0 -thread_reply -11 0 -task_notify -12 0 -thread_self -13 0 -msg_send_old -14 3 -msg_receive_old -15 3 -msg_rpc_old -16 5 -msg_send_trap -20 4 -msg_receive_trap -21 5 -msg_rpc_trap -22 6 -lw_wire -30 3 -lw_unwire -31 1 -nxm_task_init -33 2 -nxm_sched_thread -34 1 -nxm_idle -35 1 -nxm_wakeup_idle -36 1 -nxm_set_pthid -37 2 -nxm_thread_kill -38 2 -nxm_thread_block -39 1 -nxm_thread_wakeup -40 1 -inode_swap_preference -40 3 old call? -init_process -41 0 -map_fd -43 5 -nxm_resched -44 2 -htg_unix_syscall -52 3 -host_self -55 1 -host_priv_self -56 1 -swtch_pri -59 1 -swtch -60 0 -thread_switch -61 3 -semop_fast -62 4 -mach_sctimes_0 -70 0 only if MACH_SCTIMES defined -mach_sctimes_1 -71 1 only if MACH_SCTIMES defined -mach_sctimes_2 -72 2 only if MACH_SCTIMES defined -mach_sctimes_3 -73 3 only if MACH_SCTIMES defined -mach_sctimes_4 -74 4 only if MACH_SCTIMES defined -mach_sctimes_5 -75 5 only if MACH_SCTIMES defined -mach_sctimes_6 -76 6 only if MACH_SCTIMES defined -mach_sctimes_7 -77 0 only if MACH_SCTIMES defined -mach_sctimes_8 -78 6 only if MACH_SCTIMES defined -mach_sctimes_9 -79 1 only if MACH_SCTIMES defined -mach_sctimes_10 -80 2 only if MACH_SCTIMES defined -mach_sctimes_11 -81 2 only if MACH_SCTIMES defined -mach_sctimes_port_alloc_dealloc -82 1 only if MACH_SCTIMES defined diff --git a/sys/compat/osf1/README.syscalls b/sys/compat/osf1/README.syscalls deleted file mode 100644 index 04fca09eed0d..000000000000 --- a/sys/compat/osf1/README.syscalls +++ /dev/null @@ -1,163 +0,0 @@ -$NetBSD: README.syscalls,v 1.3 2000/03/13 23:52:35 soren Exp $ - -XXX this file should be gutted. functions' comments should go with -XXX the functions. Further, this file is ... very out of date. - -Once the new syscall argument-handling method was implemented, most -OSF/1 syscalls boiled down to their NetBSD equivalents. The -differences are detailed in this file. - -Note that some OSF/1 syscalls, including some of those that map -directly to equivalent NetBSD syscalls, are not implemented; they -were not needed, so the effort to implement and check them was not -expended. - -Finally, there are some OSF/1 syscalls which were left unimplemented, -but which seem strange enough to merit a bit more explanation. - -OSF/1 compatibility is helped by the fact that the sigcontext -structure was created for NetBSD/Alpha to be the same as the OSF/1 -sigcontext structure. Because of this, only one sendsig() function is -needed, and then the NetBSD sigreturn() function can be used for OSF/1 -sigreturn(), as well. - -The system calls are split out among the three files: - osf1_ioctl.c - osf1_misc.c - osf1_mount.c -as follows: - osf1_ioctl.c contains all osf1_ioctl() handling code. - osf1_mount.c contains all code dealing with mounting and - unmounting file systems, and with mount points in - general (e.g. osf1_getfsstat()). - osf1_misc.c contains the rest of the emulation functions. - -The emulation functions as follows: - -osf1_mknod() - dev_t's are different between OSF/1 and NetBSD. In OSF/1 a - dev_t has 12 bits of major number and 20 bits of minor number. - Under NetBSD, it's 24 bits of major, 8 bits of minor (but the - top 16 bits of the major number are unused, and may be - rearranged later). In any case, it was decided that the - primary use for OSF/1 binaries would be to complement native - NetBSD binaries, so file system dev_t's are assumed to be in - the NetBSD format, and osf1_mknod() translates from the OSF/1 - format to the NetBSD format. - -osf1_getfsstat() - The statfs structure is different between NetBSD and OSF/1, - and the way file system types are denoted is different, as - well. This routine is the same as getfsstat(), except it - converts the statfs structures before returning them to the - OSF/1 process. - -osf1_lseek() - To compensate for quad alignment on 32-bit machines, the - NetBSD lseek() needs an extra argument of padding, before the - off_t 'offset' argument. This wrapper inserts the padding, - and calls the NetBSD routine. - -osf1_mount() - The file system type specification and the way you specify - mount options differs substantially between NetBSD and OSF/1. - This routine (and its callees) fakes up NetBSD arguments, and - calls the NetBSD routine. - -osf1_unmount() - Probably not necessary, but safe; translates flags, in case - the NetBSD unmount flags ever change. - -osf1_exec_with_loader() [UNIMPLEMENTED] - From the description in the OSF/1 manual page, this executes a - file with a named loader, or "/sbin/loader" if none is named. - It appears to be used in some way, when executing dynamically - linked binaries, but is _not_ called directly from user space - in the normal case. The interface by which it passes the name - of the file to be executed, its arguments, etc., to the loader - is unspecified, and, from experimental evidence, doesn't seem - to be the normal UN*X argument-passing convention (i.e. - argc/argv). For proper dynamically linked binary support, - this function will probably have to be implemented, but it's - unclear how that can be done (short of disassembling a lot of - code). - -osf1_open() - Translates OSF/1 flags to NetBSD flags. - -osf1_ioctl() - Screens out ioctl requests that aren't known to work, and - translates those that differ between NetBSD and OSF/1. - -osf1_reboot() - Translates OSF/1 flags to NetBSD flags. - -osf1_stat() - The stat structure differs between NetBSD and OSF/1, both in - terms of field sizes, and in the dev_t representation. - This does a NetBSD stat(), translates the results, and returns - them to the OSF/1 process. - -osf1_lstat() - Same as osf1_stat(), but for lstat(). - -osf1_mmap() - The NetBSD version needs 4 bytes of padding before the off_t - 'pos' argument, and also uses different flags than the OSF/1 - version. This wrapper translates the flags and deals with the - argument struct padding differences, then calls the NetBSD - routine. - -osf1_fstat() - Same as osf1_stat(), but for fstat(). - -osf1_fcntl() - Translates OSF/1 fcntl() requests into their NetBSD - counterparts, then calls the NetBSD fcntl() to do the - operations. - -osf1_socket() - Makes sure that the socket type is valid for NetBSD, and if - so, calls NetBSD's socket(). - -osf1_sendto() - Makes sure that the 'flags' argument doesn't use flags that - NetBSD can't handle, and calls NetBSD's sendto(). - -osf1_getrlimit() - Makes sure that the 'which' selector is one that NetBSD can - deal with, and calls NetBSD's getrlimit(). - -osf1_setrlimit() - Same as osf1_getrlimit(), but for setrlimit(). - -osf1_sigaction() - Deals with the differences in the NetBSD and OSF/1 sigaction - structures, and calls NetBSD's sigaction with the appropriate - arguments. If the call requests that the old sigaction be - passed back, osf1_sigaction() translates it back to the OSF/1 - form, and returns it appropriately. - -osf1_statfs() - Does that statfs() on the given pathname, then translates the - NetBSD statfs structure into the one that OSF/1 uses and - returns it. Makes a best effort on the mount type, because - there's not a one-to-one mapping between NetBSD and OSF/1 - mount types. - -osf1_fstatfs() - Same as osf1_statfs(), but for fstatfs(). - -osf1_usleep_thread() - This function is how sleep() and usleep() (and possibly other - functions) are implemented in OSF/1. Its usage was discovered - by disassembling the library routines that use it. It takes - two pointers to timeval structures as arguments. The first - contains the amount of time (in seconds and microseconds) to - sleep. If the second pointer is non-null, if the process - wakes up early, the amount of time "unslept" is returned. If - the process doesn't wake up early, zero is returned. - -osf1_setsysinfo() - A null-op; used early on, but nothing cares that it actually - does anything. diff --git a/sys/compat/osf1/files.osf1 b/sys/compat/osf1/files.osf1 deleted file mode 100644 index 3885babd7477..000000000000 --- a/sys/compat/osf1/files.osf1 +++ /dev/null @@ -1,38 +0,0 @@ -# $NetBSD: files.osf1,v 1.22 2019/03/24 16:24:19 maxv Exp $ -# -# Config file description for machine-independent OSF/1 compat code. -# Included by ports that need it. - -# ports should define any machine-specific files they need in their -# own file lists. - -# XXX COMPAT_OSF1 requires ECOFF - -define compat_osf1 - -# syscall table-related files -file compat/osf1/osf1_syscalls.c compat_osf1 -file compat/osf1/osf1_sysent.c compat_osf1 - -# OSF/1 <-> NetBSD structure, flag, and value conversion files -file compat/osf1/osf1_cvt.c compat_osf1 -file compat/osf1/osf1_errno.c compat_osf1 -file compat/osf1/osf1_signo.c compat_osf1 - -# functionality emulation files -file compat/osf1/osf1_descrip.c compat_osf1 -file compat/osf1/osf1_exec.c compat_osf1 -file compat/osf1/osf1_exec_ecoff.c compat_osf1 & exec_ecoff -file compat/osf1/osf1_file.c compat_osf1 -file compat/osf1/osf1_generic.c compat_osf1 -file compat/osf1/osf1_ioctl.c compat_osf1 -file compat/osf1/osf1_misc.c compat_osf1 -file compat/osf1/osf1_mmap.c compat_osf1 -file compat/osf1/osf1_mod.c compat_osf1 -file compat/osf1/osf1_mount.c compat_osf1 -file compat/osf1/osf1_prot.c compat_osf1 -file compat/osf1/osf1_resource.c compat_osf1 -file compat/osf1/osf1_signal.c compat_osf1 -file compat/osf1/osf1_socket.c compat_osf1 -file compat/osf1/osf1_sysv_ipc.c compat_osf1 -file compat/osf1/osf1_time.c compat_osf1 diff --git a/sys/compat/osf1/osf1.h b/sys/compat/osf1/osf1.h deleted file mode 100644 index f89acdb47fa0..000000000000 --- a/sys/compat/osf1/osf1.h +++ /dev/null @@ -1,656 +0,0 @@ -/* $NetBSD: osf1.h,v 1.27 2005/12/11 12:20:23 christos Exp $ */ - -/* - * Copyright (c) 1999 Christopher G. Demetriou. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Christopher G. Demetriou - * for the NetBSD Project. - * 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 _COMPAT_OSF1_OSF1_H_ -#define _COMPAT_OSF1_OSF1_H_ - -/* - * Collected OSF/1 definitions and structures, sorted by OSF/1 header. - * Error numbers (errno.h) aren't here, since they're likely to change - * (additions) more often. - * - * This file is up to date as of Digital UNIX V4.0. - */ - -#include -#include -#include - -/* - * type and structure definitions used by other structures - */ - -typedef int16_t osf1_short; -typedef int32_t osf1_int; -typedef int64_t osf1_long; -typedef u_int32_t osf1_u_int; - -typedef int32_t osf1_dev_t; -typedef u_int32_t osf1_ino_t; -typedef u_int32_t osf1_mode_t; -typedef u_int16_t osf1_nlink_t; -typedef u_int32_t osf1_uid_t; -typedef u_int32_t osf1_gid_t; -typedef u_int64_t osf1_off_t; -typedef int32_t osf1_time_t; -typedef u_int32_t osf1_uint_t; -typedef u_int64_t osf1_sigset_t; -typedef u_int64_t osf1_size_t; -typedef u_int64_t osf1_fsid_t; -typedef u_int64_t osf1_rlim_t; -typedef void *osf1_data_ptr; /* XXX hard to fix size */ -typedef void *osf1_fcn_ptr; /* XXX hard to fix size, bogus */ -typedef osf1_int osf1_key_t; -typedef osf1_int osf1_pid_t; -typedef u_int64_t osf1_blksize_t; -typedef u_int64_t osf1_blkcnt_t; - -struct osf1_timeval { /* time.h */ - osf1_time_t tv_sec; - osf1_int tv_usec; -}; - - -/* access.h */ - -#define OSF1_F_OK 0 /* pseudo-flag */ -#define OSF1_X_OK 0x01 -#define OSF1_W_OK 0x02 -#define OSF1_R_OK 0x04 - - -/* auxv.h */ - -union osf1_auxv_data { - osf1_long a_val; - osf1_data_ptr a_ptr; - osf1_fcn_ptr a_fcn; -}; - -struct osf1_auxv { - osf1_int a_type; - union osf1_auxv_data a_un; -}; - -/* auxv entry types */ -#define OSF1_AT_NULL 0 -#define OSF1_AT_IGNORE 1 -#define OSF1_AT_EXECFD 2 -#define OSF1_AT_PHDR 3 -#define OSF1_AT_PHENT 4 -#define OSF1_AT_PHNUM 5 -#define OSF1_AT_PAGESZ 6 -#define OSF1_AT_BASE 7 -#define OSF1_AT_FLAGS 8 -#define OSF1_AT_ENTRY 9 -#define OSF1_AT_EXEC_FILENAME 1001 -#define OSF1_AT_EXEC_LOADER_FILENAME 1002 -#define OSF1_AT_EXEC_LOADER_FLAGS 1003 - - -/* exec.h/ldr_exec.h */ - -#define OSF1_LDR_EXEC_DEFAULT_LOADER "/sbin/loader" - -/* exec_with_loader()/OSF1_AT_EXEC_LOADER_FLAGS flags regions */ -#define OSF1_LDR_EXEC_SYSTEM_MASK 0xffff0000 -#define OSF1_LDR_EXEC_USER_MASK 0xffff0000 - -/* OSF1_AT_EXEC_LOADER_FLAGS flags */ -#define OSF1_LDR_EXEC_NOPRIVS_F 0x10000000 -#define OSF1_LDR_EXEC_PTRACE_F 0x20000000 -#define OSF1_LDR_EXEC_SETGID_F 0x40000000 -#define OSF1_LDR_EXEC_SETUID_F 0x80000000 - - -/* fcntl.h */ - -/* fcntl ops */ -#define OSF1_F_DUPFD 0 -#define OSF1_F_GETFD 1 /* uses flags, see below */ -#define OSF1_F_SETFD 2 /* uses flags, see below */ -#define OSF1_F_GETFL 3 /* uses flags, see below */ -#define OSF1_F_SETFL 4 /* uses flags, see below */ -#define OSF1_F_GETOWN 5 -#define OSF1_F_SETOWN 6 -#define OSF1_F_GETLK 7 /* uses osf1_flock, see below */ -#define OSF1_F_SETLK 8 /* uses osf1_flock, see below */ -#define OSF1_F_SETLKW 9 /* uses osf1_flock, see below */ -#define OSF1_F_RGETLK 10 /* [lock mgr op] */ -#define OSF1_F_RSETLK 11 /* [lock mgr op] */ -#define OSF1_F_CNVT 12 /* [lock mgr op] */ -#define OSF1_F_RSETLKW 13 /* [lock mgr op] */ -#define OSF1_F_PURGEFS 14 /* [lock mgr op] */ -#define OSF1_F_PURGENFS 15 /* [DECsafe op] */ - -/* fcntl GETFD/SETFD flags */ -#define OSF1_FD_CLOEXEC 1 - -/* fcntl GETFL/SETFL flags, in addition to the O_* flags below */ -#define OSF1_FASYNC 0x00000040 - -/* struct osf1_flock, for GETLK/SETLK/SETLKW */ -struct osf1_flock { - osf1_short l_type; - osf1_short l_whence; - osf1_off_t l_start; - osf1_off_t l_len; - osf1_pid_t l_pid; -}; - -/* GETLK/SETLK/SETLKW locking types */ -#define OSF1_F_RDLCK 1 -#define OSF1_F_WRLCK 2 -#define OSF1_F_UNLCK 8 - -/* open flags */ -#define OSF1_O_RDONLY 0x00000000 -#define OSF1_O_WRONLY 0x00000001 -#define OSF1_O_RDWR 0x00000002 -#define OSF1_O_ACCMODE 0x00000003 /* mask of RD and WR bits */ -#define OSF1_O_NONBLOCK 0x00000004 -#define OSF1_O_APPEND 0x00000008 -/* no 0x00000010 */ -#define OSF1_O_DEFER 0x00000020 -/* no 0x00000040 */ -/* no 0x00000080 */ -/* no 0x00000100 */ -#define OSF1_O_CREAT 0x00000200 -#define OSF1_O_TRUNC 0x00000400 -#define OSF1_O_EXCL 0x00000800 -#define OSF1_O_NOCTTY 0x00001000 -#define OSF1_O_SYNC 0x00004000 -#define OSF1_O_NDELAY 0x00008000 -#define OSF1_O_DRD 0x00008000 /* == O_NDELAY, DON'T USE */ -/* no 0x00010000 */ -/* no 0x00020000 */ -/* no 0x00040000 */ -#define OSF1_O_DSYNC 0x00080000 -#define OSF1_O_RSYNC 0x00100000 -/* no 0x00200000+ */ - - -/* ioctl.h */ - -#define OSF1_IOCPARM_MASK 0x1fff -#define OSF1_IOCPARM_LEN(x) (((x) >> 16) & OSF1_IOCPARM_MASK) -#define OSF1_IOCGROUP(x) (((x) >> 8) & 0xff) -#define OSF1_IOCCMD(x) ((x) & 0xff) - -#define OSF1_IOCPARM_MAX 8192 -#define OSF1_IOC_VOID 0x20000000 -#define OSF1_IOC_OUT 0x40000000 -#define OSF1_IOC_IN 0x80000000 -#define OSF1_IOC_INOUT (OSF1_IOC_IN|OSF1_IOC_OUT) -#define OSF1_IOC_DIRMASK 0xe0000000 - - -/* mman.h */ - -/* protection mask */ -#define OSF1_PROT_NONE 0 /* pseudo-flag */ -#define OSF1_PROT_READ 0x0001 -#define OSF1_PROT_WRITE 0x0002 -#define OSF1_PROT_EXEC 0x0004 - -/* mmap flags */ -#define OSF1_MAP_SHARED 0x0001 -#define OSF1_MAP_PRIVATE 0x0002 - -#define OSF1_MAP_FILE 0 /* pseudo-flag */ -#define OSF1_MAP_ANON 0x0010 -#define OSF1_MAP_TYPE 0x00f0 - -#define OSF1_MAP_FIXED 0x0100 -#define OSF1_MAP_VARIABLE 0 /* pseudo-flag */ - -#define OSF1_MAP_HASSEMAPHORE 0x0200 -#define OSF1_MAP_INHERIT 0x0400 -#define OSF1_MAP_UNALIGNED 0x0800 - -/* madvise operations */ -#define OSF1_MADV_NORMAL 0 -#define OSF1_MADV_RANDOM 1 -#define OSF1_MADV_SEQUENTIAL 2 -#define OSF1_MADV_WILLNEED 3 -#define OSF1_MADV_DONTNEED_COMPAT 4 -#define OSF1_MADV_SPACEAVAIL 5 -#define OSF1_MADV_DONTNEED 6 - - -/* mount.h */ - -/* file system type numbers */ -#define OSF1_MOUNT_NONE 0 -#define OSF1_MOUNT_UFS 1 -#define OSF1_MOUNT_NFS 2 -#define OSF1_MOUNT_MFS 3 -#define OSF1_MOUNT_PC 4 -#define OSF1_MOUNT_S5FS 5 -#define OSF1_MOUNT_CDFS 6 -#define OSF1_MOUNT_DFS 7 -#define OSF1_MOUNT_EFS 8 -#define OSF1_MOUNT_PROCFS 9 -#define OSF1_MOUNT_MSFS 10 -#define OSF1_MOUNT_FFM 11 -#define OSF1_MOUNT_FDFS 12 -#define OSF1_MOUNT_ADDON 13 -#define OSF1_MOUNT_NFS3 14 - -#define OSF1_MNAMELEN 90 - -/* MFS mount argument structure */ -struct osf1_mfs_args { - osf1_data_ptr name; - osf1_data_ptr base; - osf1_u_int size; -}; - -/* NFS mount argument structure */ -struct osf1_nfs_args { - osf1_data_ptr addr; - osf1_data_ptr fh; - osf1_int flags; - osf1_int wsize; - osf1_int rsize; - osf1_int timeo; - osf1_int retrans; - osf1_data_ptr hostname; - osf1_int acregmin; - osf1_int acregmax; - osf1_int acdirmin; - osf1_int acdirmax; - osf1_data_ptr netname; - osf1_data_ptr pathconf; -}; - -/* NFS mount argument structure flags */ -#define OSF1_NFSMNT_SOFT 0x00000001 -#define OSF1_NFSMNT_WSIZE 0x00000002 -#define OSF1_NFSMNT_RSIZE 0x00000004 -#define OSF1_NFSMNT_TIMEO 0x00000008 -#define OSF1_NFSMNT_RETRANS 0x00000010 -#define OSF1_NFSMNT_HOSTNAME 0x00000020 -#define OSF1_NFSMNT_INT 0x00000040 -#define OSF1_NFSMNT_NOCONN 0x00000080 -#define OSF1_NFSMNT_NOAC 0x00000100 -#define OSF1_NFSMNT_ACREGMIN 0x00000200 -#define OSF1_NFSMNT_ACREGMAX 0x00000400 -#define OSF1_NFSMNT_ACDIRMIN 0x00000800 -#define OSF1_NFSMNT_ACDIRMAX 0x00001000 -#define OSF1_NFSMNT_NOCTO 0x00002000 -#define OSF1_NFSMNT_POSIX 0x00004000 -#define OSF1_NFSMNT_AUTO 0x00008000 -#define OSF1_NFSMNT_SEC 0x00010000 -#define OSF1_NFSMNT_TCP 0x00020000 -#define OSF1_NFSMNT_PROPLIST 0x00040000 -/* no 0x00080000+ */ - -/* union of all mount argument structures */ -union osf1_mount_info { - struct osf1_mfs_args mfs_args; - struct osf1_nfs_args nfs_args; - char pad[80]; -}; - -/* statfs structure */ -struct osf1_statfs { - osf1_short f_type; - osf1_short f_flags; - osf1_int f_fsize; - osf1_int f_bsize; - osf1_int f_blocks; - osf1_int f_bfree; - osf1_int f_bavail; - osf1_int f_files; - osf1_int f_ffree; - osf1_fsid_t f_fsid; - osf1_int f_spare[9]; - char f_mntonname[OSF1_MNAMELEN]; - char f_mntfromname[OSF1_MNAMELEN]; - union osf1_mount_info mount_info; -}; - - -/* reboot.h */ - -/* reboot flags */ -#define OSF1_RB_AUTOBOOT 0 /* pseudo-flag */ - -#define OSF1_RB_ASKNAME 0x0001 -#define OSF1_RB_SINGLE 0x0002 -#define OSF1_RB_NOSYNC 0x0004 -#define OSF1_RB_KDB 0x0004 /* == RB_NOSYNC; boot only? */ -#define OSF1_RB_HALT 0x0008 -#define OSF1_RB_INITNAME 0x0010 -#define OSF1_RB_DFLTROOT 0x0020 -#define OSF1_RB_ALTBOOT 0x0040 -#define OSF1_RB_UNIPROC 0x0080 -#define OSF1_RB_PARAM 0x0100 -#define OSF1_RB_DUMP 0x0200 - - -/* resource.h */ - -#define OSF1_RUSAGE_THREAD 1 -#define OSF1_RUSAGE_SELF 0 -#define OSF1_RUSAGE_CHILDREN -1 - -struct osf1_rusage { - struct osf1_timeval ru_utime; - struct osf1_timeval ru_stime; - osf1_long ru_maxrss; - osf1_long ru_ixrss; - osf1_long ru_idrss; - osf1_long ru_isrss; - osf1_long ru_minflt; - osf1_long ru_majflt; - osf1_long ru_nswap; - osf1_long ru_inblock; - osf1_long ru_oublock; - osf1_long ru_msgsnd; - osf1_long ru_msgrcv; - osf1_long ru_nsignals; - osf1_long ru_nvcsw; - osf1_long ru_nivcsw; -}; - -#define OSF1_RLIMIT_CPU 0 -#define OSF1_RLIMIT_FSIZE 1 -#define OSF1_RLIMIT_DATA 2 -#define OSF1_RLIMIT_STACK 3 -#define OSF1_RLIMIT_CORE 4 -#define OSF1_RLIMIT_RSS 5 -#define OSF1_RLIMIT_NOFILE 6 -#define OSF1_RLIMIT_AS 7 - -#define OSF1_RLIM_INFINITY 0x7fffffffffffffffL - -struct osf1_rlimit { - rlim_t rlim_cur; - rlim_t rlim_max; -}; - - -/* seek.h */ - -#define OSF1_SEEK_SET 0 -#define OSF1_SEEK_CUR 1 -#define OSF1_SEEK_END 2 - - -/* signal.h (some in machine/signal.h) */ - -struct osf1_sigaction { - osf1_fcn_ptr osf1_sa_handler; - osf1_sigset_t osf1_sa_mask; - osf1_int osf1_sa_flags; - osf1_int osf1_sa_signo; -}; - -/* actually from sysmisc.h */ -struct osf1_sigaltstack { - osf1_data_ptr ss_sp; - osf1_int ss_flags; - osf1_size_t ss_size; -}; - -/* sigaction flags */ -#define OSF1_SA_ONSTACK 0x00000001 -#define OSF1_SA_RESTART 0x00000002 -#define OSF1_SA_NOCLDSTOP 0x00000004 -#define OSF1_SA_NODEFER 0x00000008 -#define OSF1_SA_RESETHAND 0x00000010 -#define OSF1_SA_NOCLDWAIT 0x00000020 -#define OSF1_SA_SIGINFO 0x00000040 - -/* sigaltstack flags */ -#define OSF1_SS_ONSTACK 0x00000001 -#define OSF1_SS_DISABLE 0x00000002 -#define OSF1_SS_NOMASK 0x00000004 -#define OSF1_SS_UCONTEXT 0x00000008 - -/* signal set manipulation macros */ -#define osf1_sigmask(n) ((osf1_sigset_t)1 << ((n) - 1)) -#define osf1_sigemptyset(s) (*(s) = (osf1_sigset_t)0) -#define osf1_sigismember(s, n) (*(s) & osf1_sigmask(n)) -#define osf1_sigaddset(s, n) (*(s) |= osf1_sigmask(n)) - - -/* socket.h */ - -struct osf1_msghdr { - osf1_data_ptr msg_name; - osf1_u_int msg_namelen; - osf1_data_ptr msg_iov; /* struct osf1_iovec_xopen * */ - osf1_u_int msg_iovlen; - osf1_data_ptr msg_control; - osf1_u_int msg_controllen; - osf1_int msg_flags; -}; - -struct osf1_msghdr_xopen { - osf1_data_ptr msg_name; - osf1_size_t msg_namelen; - osf1_data_ptr msg_iov; /* struct osf1_iovec_xopen * */ - osf1_int msg_iovlen; - osf1_data_ptr msg_control; - osf1_size_t msg_controllen; - osf1_int msg_flags; -}; - -/* max message iov len */ -#define OSF1_MSG_MAXIOVLEN 16 - -/* send/recv-family message flags */ -#define OSF1_MSG_OOB 0x0001 -#define OSF1_MSG_PEEK 0x0002 -#define OSF1_MSG_DONTROUTE 0x0004 -#define OSF1_MSG_EOR 0x0008 -#define OSF1_MSG_TRUNC 0x0010 -#define OSF1_MSG_CTRUNC 0x0020 -#define OSF1_MSG_WAITALL 0x0040 - - -/* stat.h */ - -struct osf1_stat { - osf1_dev_t st_dev; - osf1_ino_t st_ino; - osf1_mode_t st_mode; - osf1_nlink_t st_nlink; - osf1_uid_t st_uid; - osf1_gid_t st_gid; - osf1_dev_t st_rdev; - osf1_off_t st_size; - osf1_time_t st_atime_sec; - osf1_int st_spare1; - osf1_time_t st_mtime_sec; - osf1_int st_spare2; - osf1_time_t st_ctime_sec; - osf1_int st_spare3; - osf1_uint_t st_blksize; - osf1_int st_blocks; - osf1_uint_t st_flags; - osf1_uint_t st_gen; -}; - -struct osf1_stat2 { - osf1_dev_t st_dev; - osf1_int st_dead1; /* was st_ino */ - osf1_mode_t st_mode; - osf1_nlink_t st_nlink; - osf1_short st_dead2; /* something to do with nlink? */ - osf1_uid_t st_uid; - osf1_gid_t st_gid; - osf1_dev_t st_rdev; - osf1_dev_t st_rdev2; - osf1_off_t st_size; - osf1_time_t st_dead3; - osf1_int st_uatime; - osf1_time_t st_dead4; - osf1_int st_umtime; - osf1_time_t st_dead5; - osf1_int st_uctime; - osf1_int st_dead6; - osf1_int st_dead7; - osf1_uint_t st_flags; - osf1_uint_t st_generation; - osf1_long st_unused1[4]; - osf1_ino_t st_ino; - osf1_int st_unused; - osf1_time_t st_atime_sec; - osf1_int st_unused2; - osf1_time_t st_mtime_sec; - osf1_int st_unused3; - osf1_time_t st_ctime_sec; - osf1_int st_unused4; - osf1_blksize_t st_blocksize; - osf1_blkcnt_t st_blocks; -}; - -/* systeminfo.h */ - -#define OSF1_SI_SYSNAME 1 -#define OSF1_SI_HOSTNAME 2 -#define OSF1_SI_RELEASE 3 -#define OSF1_SI_VERSION 4 -#define OSF1_SI_MACHINE 5 -#define OSF1_SI_ARCHITECTURE 6 -#define OSF1_SI_HW_SERIAL 7 -#define OSF1_SI_HW_PROVIDER 8 -#define OSF1_SI_SRPC_DOMAIN 9 -#define OSF1_SI_SET_HOSTNAME 258 -#define OSF1_SI_SET_SYSNAME 259 -#define OSF1_SI_SET_SRPC_DOMAIN 265 - - -/* time.h */ - -struct osf1_itimerval { - struct osf1_timeval it_interval; - struct osf1_timeval it_value; -}; - -#define OSF1_ITIMER_REAL 0 -#define OSF1_ITIMER_VIRTUAL 1 -#define OSF1_ITIMER_PROF 2 - -struct osf1_timezone { - osf1_int tz_minuteswest; - osf1_int tz_dsttime; -}; - - -/* types.h */ - -#define osf1_major(x) ((((dev_t)(x)) >> 20) & 0x00000fff) -#define osf1_minor(x) ((((dev_t)(x)) >> 0) & 0x000fffff) -#define osf1_makedev(x,y) ((((dev_t)(x)) << 20) | ((dev_t)(y))) - - -/* uio.h */ - -struct osf1_iovec { - osf1_data_ptr iov_base; - osf1_int iov_len; -}; - -struct osf1_iovec_xopen { - osf1_data_ptr iov_base; - osf1_size_t iov_len; -}; - - -/* unistd.h (user-land header) */ - -#define OSF1__PC_CHOWN_RESTRICTED 10 -#define OSF1__PC_LINK_MAX 11 -#define OSF1__PC_MAX_CANON 12 -#define OSF1__PC_MAX_INPUT 13 -#define OSF1__PC_NAME_MAX 14 -#define OSF1__PC_NO_TRUNC 15 -#define OSF1__PC_PATH_MAX 16 -#define OSF1__PC_PIPE_BUF 17 -#define OSF1__PC_VDISABLE 18 - - -/* utsname.h */ - -#define OSF1__SYS_NMLN 32 - -struct osf1_utsname { - char sysname[OSF1__SYS_NMLN]; - char nodename[OSF1__SYS_NMLN]; - char release[OSF1__SYS_NMLN]; - char version[OSF1__SYS_NMLN]; - char machine[OSF1__SYS_NMLN]; -}; - - -/* wait.h */ - -/* wait3() and wait4() options. */ -#define OSF1_WNOHANG 0x01 -#define OSF1_WUNTRACED 0x02 - -/* XXX should have status word bits */ - - -/* for set/get sysinfo */ - -struct osf1_cpu_info { - int current_cpu; - int cpus_in_box; - int cpu_type; - int ncpus; - u_int64_t cpus_present; - u_int64_t cpus_running; - u_int64_t cpu_binding; - u_int64_t cpu_ex_binding; - int mhz; - int unused[3]; -}; - -#define OSF_SET_IEEE_FP_CONTROL 14 - -#define OSF_GET_MAX_UPROCS 2 -#define OSF_GET_PHYSMEM 19 -#define OSF_GET_MAX_CPU 30 -#define OSF_GET_IEEE_FP_CONTROL 45 -#define OSF_GET_CPUS_IN_BOX 55 -#define OSF_GET_CPU_INFO 59 -#define OSF_GET_PROC_TYPE 60 -#define OSF_GET_HWRPB 101 -#define OSF_GET_PLATFORM_NAME 103 - -#endif /* _COMPAT_OSF1_OSF1_H_ */ diff --git a/sys/compat/osf1/osf1_cvt.c b/sys/compat/osf1/osf1_cvt.c deleted file mode 100644 index 35d781a9a664..000000000000 --- a/sys/compat/osf1/osf1_cvt.c +++ /dev/null @@ -1,629 +0,0 @@ -/* $NetBSD: osf1_cvt.c,v 1.28 2013/11/04 16:52:08 christos Exp $ */ - -/* - * Copyright (c) 1999 Christopher G. Demetriou. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Christopher G. Demetriou - * for the NetBSD Project. - * 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. - */ - -/* - * Copyright (c) 1994, 1995 Carnegie-Mellon University. - * All rights reserved. - * - * Author: Chris G. Demetriou - * - * Permission to use, copy, modify and distribute this software and - * its documentation is hereby granted, provided that both the copyright - * notice and this permission notice appear in all copies of the - * software, derivative works or modified versions, and any portions - * thereof, and that both notices appear in supporting documentation. - * - * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" - * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND - * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. - * - * Carnegie Mellon requests users of this software to return to - * - * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU - * School of Computer Science - * Carnegie Mellon University - * Pittsburgh PA 15213-3890 - * - * any improvements or extensions that they make and grant Carnegie the - * rights to redistribute these changes. - */ - -#include -__KERNEL_RCSID(0, "$NetBSD: osf1_cvt.c,v 1.28 2013/11/04 16:52:08 christos Exp $"); - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include /* XXX see mmap emulation */ - -#include -#include -#include -#include - -#include -#include -#include - -const struct emul_flags_xtab osf1_access_flags_xtab[] = { -#if 0 /* pseudo-flag */ - { OSF1_F_OK, OSF1_F_OK, F_OK }, -#endif - { OSF1_X_OK, OSF1_X_OK, X_OK }, - { OSF1_W_OK, OSF1_W_OK, W_OK }, - { OSF1_R_OK, OSF1_R_OK, R_OK }, - { 0 } -}; - -const struct emul_flags_xtab osf1_fcntl_getsetfd_flags_rxtab[] = { - { FD_CLOEXEC, FD_CLOEXEC, OSF1_FD_CLOEXEC }, - { 0 } -}; - -const struct emul_flags_xtab osf1_fcntl_getsetfd_flags_xtab[] = { - { OSF1_FD_CLOEXEC, OSF1_FD_CLOEXEC, FD_CLOEXEC }, - { 0 } -}; - -/* flags specific to GETFL/SETFL; also uses open rxtab */ -const struct emul_flags_xtab osf1_fcntl_getsetfl_flags_rxtab[] = { - { FASYNC, FASYNC, OSF1_FASYNC }, - { 0 } -}; - -/* flags specific to GETFL/SETFL; also uses open xtab */ -const struct emul_flags_xtab osf1_fcntl_getsetfl_flags_xtab[] = { - { OSF1_FASYNC, OSF1_FASYNC, FASYNC }, - { 0 } -}; - -const struct emul_flags_xtab osf1_mmap_flags_xtab[] = { - { OSF1_MAP_SHARED, OSF1_MAP_SHARED, MAP_SHARED }, - { OSF1_MAP_PRIVATE, OSF1_MAP_PRIVATE, MAP_PRIVATE }, - { OSF1_MAP_TYPE, OSF1_MAP_FILE, MAP_FILE }, - { OSF1_MAP_TYPE, OSF1_MAP_ANON, MAP_ANON }, - { OSF1_MAP_FIXED, OSF1_MAP_FIXED, MAP_FIXED }, -#if 0 /* pseudo-flag, and the default */ - { OSF1_MAP_VARIABLE, OSF1_MAP_VARIABLE, 0 }, -#endif - { OSF1_MAP_HASSEMAPHORE, OSF1_MAP_HASSEMAPHORE, MAP_HASSEMAPHORE }, - { OSF1_MAP_INHERIT, OSF1_MAP_INHERIT, MAP_INHERIT }, -#if 0 /* no equivalent +++ */ - { OSF1_MAP_UNALIGNED, OSF1_MAP_UNALIGNED, ??? }, -#endif - { 0 } -}; - -const struct emul_flags_xtab osf1_mmap_prot_xtab[] = { -#if 0 /* pseudo-flag */ - { OSF1_PROT_NONE, OSF1_PROT_NONE, PROT_NONE }, -#endif - { OSF1_PROT_READ, OSF1_PROT_READ, PROT_READ }, - { OSF1_PROT_WRITE, OSF1_PROT_WRITE, PROT_READ|PROT_WRITE }, - { OSF1_PROT_EXEC, OSF1_PROT_EXEC, PROT_READ|PROT_EXEC }, - { 0 } -}; - -const struct emul_flags_xtab osf1_nfs_mount_flags_xtab[] = { - { OSF1_NFSMNT_SOFT, OSF1_NFSMNT_SOFT, NFSMNT_SOFT, }, - { OSF1_NFSMNT_WSIZE, OSF1_NFSMNT_WSIZE, NFSMNT_WSIZE, }, - { OSF1_NFSMNT_RSIZE, OSF1_NFSMNT_RSIZE, NFSMNT_RSIZE, }, - { OSF1_NFSMNT_TIMEO, OSF1_NFSMNT_TIMEO, NFSMNT_TIMEO, }, - { OSF1_NFSMNT_RETRANS, OSF1_NFSMNT_RETRANS, NFSMNT_RETRANS, }, -#if 0 /* no equivalent; needs special handling, see below */ - { OSF1_NFSMNT_HOSTNAME, OSF1_NFSMNT_HOSTNAME, ???, }, -#endif - { OSF1_NFSMNT_INT, OSF1_NFSMNT_INT, NFSMNT_INT, }, - { OSF1_NFSMNT_NOCONN, OSF1_NFSMNT_NOCONN, NFSMNT_NOCONN, }, -#if 0 /* no equivalents */ - { OSF1_NFSMNT_NOAC, OSF1_NFSMNT_NOAC, ???, }, - { OSF1_NFSMNT_ACREGMIN, OSF1_NFSMNT_ACREGMIN, ???, }, - { OSF1_NFSMNT_ACREGMAX, OSF1_NFSMNT_ACREGMAX, ???, }, - { OSF1_NFSMNT_ACDIRMIN, OSF1_NFSMNT_ACDIRMIN, ???, }, - { OSF1_NFSMNT_ACDIRMAX, OSF1_NFSMNT_ACDIRMAX, ???, }, - { OSF1_NFSMNT_NOCTO, OSF1_NFSMNT_NOCTO, ???, }, - { OSF1_NFSMNT_POSIX, OSF1_NFSMNT_POSIX, ???, }, - { OSF1_NFSMNT_AUTO, OSF1_NFSMNT_AUTO, ???, }, - { OSF1_NFSMNT_SEC, OSF1_NFSMNT_SEC, ???, }, - { OSF1_NFSMNT_TCP, OSF1_NFSMNT_TCP, ???, }, - { OSF1_NFSMNT_PROPLIST, OSF1_NFSMNT_PROPLIST, ???, }, -#endif - { 0 } -}; - -const struct emul_flags_xtab osf1_open_flags_rxtab[] = { - { O_ACCMODE, O_RDONLY, OSF1_O_RDONLY }, - { O_ACCMODE, O_WRONLY, OSF1_O_WRONLY }, - { O_ACCMODE, O_RDWR, OSF1_O_RDWR }, - { O_NONBLOCK, O_NONBLOCK, OSF1_O_NONBLOCK }, - { O_APPEND, O_APPEND, OSF1_O_APPEND }, -#if 0 /* no equivalent +++ */ - { ???, ???, O_DEFER }, -#endif - { O_CREAT, O_CREAT, OSF1_O_CREAT }, - { O_TRUNC, O_TRUNC, OSF1_O_TRUNC }, - { O_EXCL, O_EXCL, OSF1_O_EXCL }, - { O_NOCTTY, O_NOCTTY, OSF1_O_NOCTTY }, - { O_SYNC, O_SYNC, OSF1_O_SYNC }, - { O_NDELAY, O_NDELAY, OSF1_O_NDELAY }, -#if 0 /* no equivalent, also same value as O_NDELAY! */ - { ???, ???, O_DRD }, -#endif - { O_DSYNC, O_DSYNC, OSF1_O_DSYNC }, - { O_RSYNC, O_RSYNC, OSF1_O_RSYNC }, - { 0 } -}; - -const struct emul_flags_xtab osf1_open_flags_xtab[] = { - { OSF1_O_ACCMODE, OSF1_O_RDONLY, O_RDONLY }, - { OSF1_O_ACCMODE, OSF1_O_WRONLY, O_WRONLY }, - { OSF1_O_ACCMODE, OSF1_O_RDWR, O_RDWR }, - { OSF1_O_NONBLOCK, OSF1_O_NONBLOCK, O_NONBLOCK }, - { OSF1_O_APPEND, OSF1_O_APPEND, O_APPEND }, -#if 0 /* no equivalent +++ */ - { OSF1_O_DEFER, OSF1_O_DEFER, ??? }, -#endif - { OSF1_O_CREAT, OSF1_O_CREAT, O_CREAT }, - { OSF1_O_TRUNC, OSF1_O_TRUNC, O_TRUNC }, - { OSF1_O_EXCL, OSF1_O_EXCL, O_EXCL }, - { OSF1_O_NOCTTY, OSF1_O_NOCTTY, O_NOCTTY }, - { OSF1_O_SYNC, OSF1_O_SYNC, O_SYNC }, - { OSF1_O_NDELAY, OSF1_O_NDELAY, O_NDELAY }, -#if 0 /* no equivalent, also same value as O_NDELAY! */ - { OSF1_O_DRD, OSF1_O_DRD, ??? }, -#endif - { OSF1_O_DSYNC, OSF1_O_DSYNC, O_DSYNC }, - { OSF1_O_RSYNC, OSF1_O_RSYNC, O_RSYNC }, - { 0 } -}; - -const struct emul_flags_xtab osf1_reboot_opt_xtab[] = { -#if 0 /* pseudo-flag */ - { OSF1_RB_AUTOBOOT, OSF1_RB_AUTOBOOT, RB_AUTOBOOT }, -#endif - { OSF1_RB_ASKNAME, OSF1_RB_ASKNAME, RB_ASKNAME }, - { OSF1_RB_SINGLE, OSF1_RB_SINGLE, RB_SINGLE }, - { OSF1_RB_NOSYNC, OSF1_RB_NOSYNC, RB_NOSYNC }, -#if 0 /* same value as O_NDELAY, only used at boot time? */ - { OSF1_RB_KDB, OSF1_RB_KDB, RB_KDB }, -#endif - { OSF1_RB_HALT, OSF1_RB_HALT, RB_HALT }, - { OSF1_RB_INITNAME, OSF1_RB_INITNAME, RB_INITNAME }, -#if 0 /* no equivalents +++ */ - { OSF1_RB_DFLTROOT, OSF1_RB_DFLTROOT, ??? }, - { OSF1_RB_ALTBOOT, OSF1_RB_ALTBOOT, ??? }, - { OSF1_RB_UNIPROC, OSF1_RB_UNIPROC, ??? }, - { OSF1_RB_PARAM, OSF1_RB_PARAM, ??? }, -#endif - { OSF1_RB_DUMP, OSF1_RB_DUMP, RB_DUMP }, - { 0 } -}; - -const struct emul_flags_xtab osf1_sendrecv_msg_flags_xtab[] = { - { OSF1_MSG_OOB, OSF1_MSG_OOB, MSG_OOB }, - { OSF1_MSG_PEEK, OSF1_MSG_PEEK, MSG_PEEK }, - { OSF1_MSG_DONTROUTE, OSF1_MSG_DONTROUTE, MSG_DONTROUTE }, - { OSF1_MSG_EOR, OSF1_MSG_EOR, MSG_EOR }, - { OSF1_MSG_TRUNC, OSF1_MSG_TRUNC, MSG_TRUNC }, - { OSF1_MSG_CTRUNC, OSF1_MSG_CTRUNC, MSG_CTRUNC }, - { OSF1_MSG_WAITALL, OSF1_MSG_WAITALL, MSG_WAITALL }, - { 0 } -}; - -const struct emul_flags_xtab osf1_sigaction_flags_rxtab[] = { - { SA_ONSTACK, SA_ONSTACK, OSF1_SA_ONSTACK }, - { SA_RESTART, SA_RESTART, OSF1_SA_RESTART }, - { SA_NOCLDSTOP, SA_NOCLDSTOP, OSF1_SA_NOCLDSTOP }, - { SA_NODEFER, SA_NODEFER, OSF1_SA_NODEFER }, - { SA_RESETHAND, SA_RESETHAND, OSF1_SA_RESETHAND }, - { SA_NOCLDWAIT, SA_NOCLDWAIT, OSF1_SA_NOCLDWAIT }, -#if 0 /* XXX not yet */ - { SA_SIGINFO, SA_SIGINFO, OSF1_SA_SIGINFO }, -#endif - { 0 }, -}; - -const struct emul_flags_xtab osf1_sigaction_flags_xtab[] = { - { OSF1_SA_ONSTACK, OSF1_SA_ONSTACK, SA_ONSTACK }, - { OSF1_SA_RESTART, OSF1_SA_RESTART, SA_RESTART }, - { OSF1_SA_NOCLDSTOP, OSF1_SA_NOCLDSTOP, SA_NOCLDSTOP }, - { OSF1_SA_NODEFER, OSF1_SA_NODEFER, SA_NODEFER }, - { OSF1_SA_RESETHAND, OSF1_SA_RESETHAND, SA_RESETHAND }, - { OSF1_SA_NOCLDWAIT, OSF1_SA_NOCLDWAIT, SA_NOCLDWAIT }, -#if 0 /* XXX not yet */ - { OSF1_SA_SIGINFO, OSF1_SA_SIGINFO, SA_SIGINFO }, -#endif - { 0 }, -}; - -const struct emul_flags_xtab osf1_wait_options_xtab[] = { - { OSF1_WNOHANG, OSF1_WNOHANG, WNOHANG }, - { OSF1_WUNTRACED, OSF1_WUNTRACED, WUNTRACED }, - { 0 } -}; - -void -osf1_cvt_flock_from_native(const struct flock *nf, struct osf1_flock *of) -{ - - memset(of, 0, sizeof(*of)); - - of->l_start = nf->l_start; - of->l_len = nf->l_len; - of->l_pid = nf->l_pid; - - switch (nf->l_type) { - case F_RDLCK: - of->l_type = OSF1_F_RDLCK; - break; - - case F_WRLCK: - of->l_type = OSF1_F_WRLCK; - break; - - case F_UNLCK: - of->l_type = OSF1_F_UNLCK; - break; - } - - switch (nf->l_whence) { - case SEEK_SET: - of->l_whence = OSF1_SEEK_SET; - break; - - case SEEK_CUR: - of->l_whence = OSF1_SEEK_CUR; - break; - - case SEEK_END: - of->l_whence = OSF1_SEEK_END; - break; - } -} - -int -osf1_cvt_flock_to_native(const struct osf1_flock *of, struct flock *nf) -{ - - memset(nf, 0, sizeof(*nf)); - - nf->l_start = of->l_start; - nf->l_len = of->l_len; - nf->l_pid = of->l_pid; - - switch (of->l_type) { - case OSF1_F_RDLCK: - nf->l_type = F_RDLCK; - break; - - case OSF1_F_WRLCK: - nf->l_type = F_WRLCK; - break; - - case OSF1_F_UNLCK: - nf->l_type = F_UNLCK; - break; - - default: - return (EINVAL); - } - - switch (of->l_whence) { - case OSF1_SEEK_SET: - nf->l_whence = SEEK_SET; - break; - - case OSF1_SEEK_CUR: - nf->l_whence = SEEK_CUR; - break; - - case OSF1_SEEK_END: - nf->l_whence = SEEK_END; - break; - - default: - return (EINVAL); - } - - return (0); -} - -int -osf1_cvt_msghdr_xopen_to_native(const struct osf1_msghdr_xopen *omh, struct msghdr *bmh) -{ - unsigned long leftovers; - - memset(bmh, 0, sizeof(*bmh)); - bmh->msg_name = omh->msg_name; /* XXX sockaddr translation */ - bmh->msg_namelen = omh->msg_namelen; - bmh->msg_iov = NULL; /* iovec xlation separate */ - bmh->msg_iovlen = omh->msg_iovlen; - - /* XXX we don't translate control messages (yet) */ - if (bmh->msg_control != NULL || bmh->msg_controllen != 0) -{ -printf("osf1_cvt_msghdr_xopen_to_native: control\n"); - return (EINVAL); -} - - /* translate flags */ - bmh->msg_flags = emul_flags_translate(osf1_sendrecv_msg_flags_xtab, - omh->msg_flags, &leftovers); - if (leftovers != 0) -{ -printf("osf1_cvt_msghdr_xopen_to_native: leftovers 0x%lx\n", leftovers); - return (EINVAL); -} - - return (0); -} - -int -osf1_cvt_pathconf_name_to_native(int oname, int *bnamep) -{ - int error; - - error = 0; - switch (oname) { - case OSF1__PC_CHOWN_RESTRICTED: - *bnamep = _PC_CHOWN_RESTRICTED; - break; - - case OSF1__PC_LINK_MAX: - *bnamep = _PC_LINK_MAX; - break; - - case OSF1__PC_MAX_CANON: - *bnamep = _PC_MAX_CANON; - break; - - case OSF1__PC_MAX_INPUT: - *bnamep = _PC_MAX_INPUT; - break; - - case OSF1__PC_NAME_MAX: - *bnamep = _PC_NAME_MAX; - break; - - case OSF1__PC_NO_TRUNC: - *bnamep = _PC_NO_TRUNC; - break; - - case OSF1__PC_PATH_MAX: - *bnamep = _PC_PATH_MAX; - break; - - case OSF1__PC_PIPE_BUF: - *bnamep = _PC_PIPE_BUF; - break; - - case OSF1__PC_VDISABLE: - *bnamep = _PC_VDISABLE; - break; - - default: - error = EINVAL; - break; - } - - return (error); -} - -/* - * Convert from as rusage structure to an osf1 rusage structure. - */ -void -osf1_cvt_rusage_from_native(const struct rusage *ru, struct osf1_rusage *oru) -{ - - oru->ru_utime.tv_sec = ru->ru_utime.tv_sec; - oru->ru_utime.tv_usec = ru->ru_utime.tv_usec; - - oru->ru_stime.tv_sec = ru->ru_stime.tv_sec; - oru->ru_stime.tv_usec = ru->ru_stime.tv_usec; - - oru->ru_maxrss = ru->ru_maxrss; - oru->ru_ixrss = ru->ru_ixrss; - oru->ru_idrss = ru->ru_idrss; - oru->ru_isrss = ru->ru_isrss; - oru->ru_minflt = ru->ru_minflt; - oru->ru_majflt = ru->ru_majflt; - oru->ru_nswap = ru->ru_nswap; - oru->ru_inblock = ru->ru_inblock; - oru->ru_oublock = ru->ru_oublock; - oru->ru_msgsnd = ru->ru_msgsnd; - oru->ru_msgrcv = ru->ru_msgrcv; - oru->ru_nsignals = ru->ru_nsignals; - oru->ru_nvcsw = ru->ru_nvcsw; - oru->ru_nivcsw = ru->ru_nivcsw; -} - -/* - * XXX: Only a subset of the flags is currently implemented. - */ -void -osf1_cvt_sigaction_from_native(const struct sigaction *bsa, struct osf1_sigaction *osa) -{ - - osa->osf1_sa_handler = bsa->sa_handler; - osf1_cvt_sigset_from_native(&bsa->sa_mask, &osa->osf1_sa_mask); - - /* translate flags */ - osa->osf1_sa_flags = emul_flags_translate(osf1_sigaction_flags_rxtab, - bsa->sa_flags, NULL); -} - -int -osf1_cvt_sigaction_to_native(const struct osf1_sigaction *osa, struct sigaction *bsa) -{ - - bsa->sa_handler = osa->osf1_sa_handler; - osf1_cvt_sigset_to_native(&osa->osf1_sa_mask, &bsa->sa_mask); - - /* translate flags */ - bsa->sa_flags = emul_flags_translate(osf1_sigaction_flags_xtab, - osa->osf1_sa_flags, NULL); - /* XXX error if we can't translate */ - - return (0); -} - -void -osf1_cvt_sigset_from_native(const sigset_t *bss, osf1_sigset_t *oss) -{ - int i, newsig; - - osf1_sigemptyset(oss); - for (i = 1; i < NSIG; i++) { - if (sigismember(bss, i)) { - newsig = native_to_osf1_signo[i]; - if (newsig) - osf1_sigaddset(oss, newsig); - } - } -} - -int -osf1_cvt_sigset_to_native(const osf1_sigset_t *oss, sigset_t *bss) -{ - int i, newsig; - - sigemptyset(bss); - for (i = 1; i < OSF1_NSIG; i++) { - if (osf1_sigismember(oss, i)) { - newsig = osf1_to_native_signo[i]; - if (newsig) - sigaddset(bss, newsig); - } - } - return (0); -} - -/* - * Convert from a stat structure to an osf1 stat structure. - */ -void -osf1_cvt_stat_from_native(const struct stat *st, struct osf1_stat *ost) -{ - - ost->st_dev = osf1_cvt_dev_from_native(st->st_dev); - ost->st_ino = st->st_ino; - ost->st_mode = st->st_mode; - ost->st_nlink = st->st_nlink; - ost->st_uid = st->st_uid == -2 ? (u_int16_t) -2 : st->st_uid; - ost->st_gid = st->st_gid == -2 ? (u_int16_t) -2 : st->st_gid; - ost->st_rdev = osf1_cvt_dev_from_native(st->st_rdev); - ost->st_size = st->st_size; - ost->st_atime_sec = st->st_atime; - ost->st_spare1 = 0; - ost->st_mtime_sec = st->st_mtime; - ost->st_spare2 = 0; - ost->st_ctime_sec = st->st_ctime; - ost->st_spare3 = 0; - ost->st_blksize = st->st_blksize; - ost->st_blocks = st->st_blocks; - ost->st_flags = st->st_flags; - ost->st_gen = st->st_gen; -} - -/* - * Convert from a stat structure to an osf1 stat structure. - */ -void -osf1_cvt_stat2_from_native(const struct stat *st, struct osf1_stat2 *ost) -{ - - memset(ost, 0, sizeof *ost); - ost->st_dev = osf1_cvt_dev_from_native(st->st_dev); - ost->st_ino = st->st_ino; - ost->st_mode = st->st_mode; - ost->st_nlink = st->st_nlink; - ost->st_uid = st->st_uid == -2 ? (u_int16_t) -2 : st->st_uid; - ost->st_gid = st->st_gid == -2 ? (u_int16_t) -2 : st->st_gid; - ost->st_rdev = osf1_cvt_dev_from_native(st->st_rdev); - ost->st_size = st->st_size; - ost->st_atime_sec = st->st_atime; - ost->st_mtime_sec = st->st_mtime; - ost->st_ctime_sec = st->st_ctime; - ost->st_blocksize = st->st_blksize; - ost->st_blocks = st->st_blocks; - ost->st_flags = st->st_flags; - ost->st_generation = st->st_gen; -} - -void -osf1_cvt_statfs_from_native(const struct statvfs *bsfs, struct osf1_statfs *osfs) -{ - - memset(osfs, 0, sizeof (struct osf1_statfs)); - if (!strncmp(MOUNT_FFS, bsfs->f_fstypename, sizeof(bsfs->f_fstypename))) - osfs->f_type = OSF1_MOUNT_UFS; - else if (!strncmp(MOUNT_NFS, bsfs->f_fstypename, sizeof(bsfs->f_fstypename))) - osfs->f_type = OSF1_MOUNT_NFS; - else if (!strncmp(MOUNT_MFS, bsfs->f_fstypename, sizeof(bsfs->f_fstypename))) - osfs->f_type = OSF1_MOUNT_MFS; - else - /* uh oh... XXX = PC, CDFS, PROCFS, etc. */ - osfs->f_type = OSF1_MOUNT_ADDON; - osfs->f_flags = bsfs->f_flag; /* XXX translate */ - osfs->f_fsize = bsfs->f_frsize; - osfs->f_bsize = bsfs->f_bsize; - osfs->f_blocks = bsfs->f_blocks; - osfs->f_bfree = bsfs->f_bfree; - osfs->f_bavail = bsfs->f_bavail; - osfs->f_files = bsfs->f_files; - osfs->f_ffree = bsfs->f_ffree; - memcpy(&osfs->f_fsid, &bsfs->f_fsidx, sizeof osfs->f_fsid); - /* osfs->f_spare zeroed above */ - memcpy(osfs->f_mntonname, bsfs->f_mntonname, sizeof osfs->f_mntonname); - memcpy(osfs->f_mntfromname, bsfs->f_mntfromname, - sizeof osfs->f_mntfromname); - /* XXX osfs->f_xxx should be filled in... */ -} diff --git a/sys/compat/osf1/osf1_cvt.h b/sys/compat/osf1/osf1_cvt.h deleted file mode 100644 index f7d0dc4517a0..000000000000 --- a/sys/compat/osf1/osf1_cvt.h +++ /dev/null @@ -1,96 +0,0 @@ -/* $NetBSD: osf1_cvt.h,v 1.11 2007/06/16 20:04:28 dsl Exp $ */ - -/* - * Copyright (c) 1999 Christopher G. Demetriou. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Christopher G. Demetriou - * for the NetBSD Project. - * 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 _COMPAT_OSF1_OSF1_CVT_H_ -#define _COMPAT_OSF1_OSF1_CVT_H_ - -#include -#include -#include -#include -#include -#include -#include - -#include - -#define osf1_cvt_dev_from_native(dev) \ - osf1_makedev(major(dev), minor(dev)) -#define osf1_cvt_dev_to_native(dev) \ - makedev(osf1_major(dev), osf1_minor(dev)) - -void osf1_cvt_flock_from_native(const struct flock *nf, - struct osf1_flock *of); -int osf1_cvt_flock_to_native(const struct osf1_flock *of, - struct flock *nf); -struct msghdr; -int osf1_cvt_msghdr_xopen_to_native(const struct osf1_msghdr_xopen *omh, - struct msghdr *nmh); -int osf1_cvt_pathconf_name_to_native(int oname, int *bnamep); -void osf1_cvt_rusage_from_native(const struct rusage *nru, - struct osf1_rusage *oru); -void osf1_cvt_sigaction_from_native(const struct sigaction *nsa, - struct osf1_sigaction *osa); -int osf1_cvt_sigaction_to_native(const struct osf1_sigaction *osa, - struct sigaction *nsa); -void osf1_cvt_sigset_from_native(const sigset_t *nss, osf1_sigset_t *oss); -int osf1_cvt_sigset_to_native(const osf1_sigset_t *oss, sigset_t *nss); -void osf1_cvt_stat_from_native(const struct stat *nst, - struct osf1_stat *ost); -void osf1_cvt_stat2_from_native(const struct stat *nst, - struct osf1_stat2 *ost); -void osf1_cvt_statfs_from_native(const struct statvfs *nsfs, - struct osf1_statfs *osfs); - -extern const int native_to_osf1_errno[]; -extern const int osf1_to_native_signo[]; -extern const int native_to_osf1_signo[]; - -extern const struct emul_flags_xtab osf1_access_flags_xtab[]; -extern const struct emul_flags_xtab osf1_fcntl_getsetfd_flags_rxtab[]; -extern const struct emul_flags_xtab osf1_fcntl_getsetfd_flags_xtab[]; -extern const struct emul_flags_xtab osf1_fcntl_getsetfl_flags_rxtab[]; -extern const struct emul_flags_xtab osf1_fcntl_getsetfl_flags_xtab[]; -extern const struct emul_flags_xtab osf1_mmap_flags_xtab[]; -extern const struct emul_flags_xtab osf1_mmap_prot_xtab[]; -extern const struct emul_flags_xtab osf1_nfs_mount_flags_xtab[]; -extern const struct emul_flags_xtab osf1_open_flags_rxtab[]; -extern const struct emul_flags_xtab osf1_open_flags_xtab[]; -extern const struct emul_flags_xtab osf1_reboot_opt_xtab[]; -extern const struct emul_flags_xtab osf1_sendrecv_msg_flags_xtab[]; -extern const struct emul_flags_xtab osf1_sigaction_flags_rxtab[]; -extern const struct emul_flags_xtab osf1_sigaction_flags_xtab[]; -extern const struct emul_flags_xtab osf1_sigaltstack_flags_rxtab[]; -extern const struct emul_flags_xtab osf1_sigaltstack_flags_xtab[]; -extern const struct emul_flags_xtab osf1_wait_options_xtab[]; - -#endif /* _COMPAT_OSF1_OSF1_CVT_H_ */ diff --git a/sys/compat/osf1/osf1_descrip.c b/sys/compat/osf1/osf1_descrip.c deleted file mode 100644 index 171be871347e..000000000000 --- a/sys/compat/osf1/osf1_descrip.c +++ /dev/null @@ -1,271 +0,0 @@ -/* $NetBSD: osf1_descrip.c,v 1.29 2010/04/23 15:19:20 rmind Exp $ */ - -/* - * Copyright (c) 1999 Christopher G. Demetriou. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Christopher G. Demetriou - * for the NetBSD Project. - * 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. - */ - -/* - * Copyright (c) 1994, 1995 Carnegie-Mellon University. - * All rights reserved. - * - * Author: Chris G. Demetriou - * - * Permission to use, copy, modify and distribute this software and - * its documentation is hereby granted, provided that both the copyright - * notice and this permission notice appear in all copies of the - * software, derivative works or modified versions, and any portions - * thereof, and that both notices appear in supporting documentation. - * - * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" - * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND - * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. - * - * Carnegie Mellon requests users of this software to return to - * - * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU - * School of Computer Science - * Carnegie Mellon University - * Pittsburgh PA 15213-3890 - * - * any improvements or extensions that they make and grant Carnegie the - * rights to redistribute these changes. - */ - -#include -__KERNEL_RCSID(0, "$NetBSD: osf1_descrip.c,v 1.29 2010/04/23 15:19:20 rmind Exp $"); - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -int -osf1_sys_fcntl(struct lwp *l, const struct osf1_sys_fcntl_args *uap, register_t *retval) -{ - struct sys_fcntl_args a; - struct osf1_flock oflock; - struct flock nflock; - unsigned long xfl, leftovers; - int error; - - SCARG(&a, fd) = SCARG(uap, fd); - - leftovers = 0; - switch (SCARG(uap, cmd)) { - case OSF1_F_DUPFD: - SCARG(&a, cmd) = F_DUPFD; - SCARG(&a, arg) = SCARG(uap, arg); - break; - - case OSF1_F_GETFD: - SCARG(&a, cmd) = F_GETFD; - SCARG(&a, arg) = 0; /* ignored */ - break; - - case OSF1_F_SETFD: - SCARG(&a, cmd) = F_SETFD; - SCARG(&a, arg) = (void *)emul_flags_translate( - osf1_fcntl_getsetfd_flags_xtab, - (unsigned long)SCARG(uap, arg), &leftovers); - break; - - case OSF1_F_GETFL: - SCARG(&a, cmd) = F_GETFL; - SCARG(&a, arg) = 0; /* ignored */ - break; - - case OSF1_F_SETFL: - SCARG(&a, cmd) = F_SETFL; - xfl = emul_flags_translate(osf1_open_flags_xtab, - (unsigned long)SCARG(uap, arg), &leftovers); - xfl |= emul_flags_translate(osf1_fcntl_getsetfl_flags_xtab, - leftovers, &leftovers); - SCARG(&a, arg) = (void *)xfl; - break; - - case OSF1_F_GETOWN: /* XXX not yet supported */ - case OSF1_F_SETOWN: /* XXX not yet supported */ - /* XXX translate. */ - return (EINVAL); - - case OSF1_F_GETLK: - case OSF1_F_SETLK: - case OSF1_F_SETLKW: - if (SCARG(uap, cmd) == OSF1_F_GETLK) - SCARG(&a, cmd) = F_GETLK; - else if (SCARG(uap, cmd) == OSF1_F_SETLK) - SCARG(&a, cmd) = F_SETLK; - else if (SCARG(uap, cmd) == OSF1_F_SETLKW) - SCARG(&a, cmd) = F_SETLKW; - - error = copyin(SCARG(uap, arg), &oflock, sizeof oflock); - if (error != 0) - return error; - error = osf1_cvt_flock_to_native(&oflock, &nflock); - if (error != 0) - return error; - error = do_fcntl_lock(SCARG(uap, fd), SCARG(&a, cmd), &nflock); - if (SCARG(&a, cmd) != F_GETLK || error != 0) - return error; - osf1_cvt_flock_from_native(&nflock, &oflock); - return copyout(&oflock, SCARG(uap, arg), sizeof oflock); - - case OSF1_F_RGETLK: /* [lock mgr op] XXX not supported */ - case OSF1_F_RSETLK: /* [lock mgr op] XXX not supported */ - case OSF1_F_CNVT: /* [lock mgr op] XXX not supported */ - case OSF1_F_RSETLKW: /* [lock mgr op] XXX not supported */ - case OSF1_F_PURGEFS: /* [lock mgr op] XXX not supported */ - case OSF1_F_PURGENFS: /* [DECsafe op] XXX not supported */ - default: - /* XXX syslog? */ - return (EINVAL); - } - if (leftovers != 0) - return (EINVAL); - - error = sys_fcntl(l, &a, retval); - - if (error) - return error; - - switch (SCARG(uap, cmd)) { - case OSF1_F_GETFD: - retval[0] = emul_flags_translate( - osf1_fcntl_getsetfd_flags_rxtab, retval[0], NULL); - break; - - case OSF1_F_GETFL: - xfl = emul_flags_translate(osf1_open_flags_rxtab, - retval[0], &leftovers); - xfl |= emul_flags_translate(osf1_fcntl_getsetfl_flags_rxtab, - leftovers, NULL); - retval[0] = xfl; - break; - } - - return error; -} - -int -osf1_sys_fpathconf(struct lwp *l, const struct osf1_sys_fpathconf_args *uap, register_t *retval) -{ - struct sys_fpathconf_args a; - int error; - - SCARG(&a, fd) = SCARG(uap, fd); - - error = osf1_cvt_pathconf_name_to_native(SCARG(uap, name), - &SCARG(&a, name)); - - if (error == 0) - error = sys_fpathconf(l, &a, retval); - - return (error); -} - -/* - * Return status information about a file descriptor. - */ -int -osf1_sys_fstat(struct lwp *l, const struct osf1_sys_fstat_args *uap, register_t *retval) -{ - struct stat ub; - struct osf1_stat oub; - int error; - - error = do_sys_fstat(SCARG(uap, fd), &ub); - osf1_cvt_stat_from_native(&ub, &oub); - if (error == 0) - error = copyout(&oub, SCARG(uap, sb), sizeof(oub)); - - return (error); -} - -/* - * Return status information about a file descriptor. - */ -int -osf1_sys_fstat2(struct lwp *l, const struct osf1_sys_fstat2_args *uap, register_t *retval) -{ - struct stat ub; - struct osf1_stat2 oub; - int error; - - error = do_sys_fstat(SCARG(uap, fd), &ub); - osf1_cvt_stat2_from_native(&ub, &oub); - if (error == 0) - error = copyout(&oub, SCARG(uap, sb), sizeof(oub)); - - return (error); -} - -int -osf1_sys_ftruncate(struct lwp *l, const struct osf1_sys_ftruncate_args *uap, register_t *retval) -{ - struct sys_ftruncate_args a; - - SCARG(&a, fd) = SCARG(uap, fd); - SCARG(&a, PAD) = 0; - SCARG(&a, length) = SCARG(uap, length); - - return sys_ftruncate(l, &a, retval); -} - -int -osf1_sys_lseek(struct lwp *l, const struct osf1_sys_lseek_args *uap, register_t *retval) -{ - struct sys_lseek_args a; - - SCARG(&a, fd) = SCARG(uap, fd); - SCARG(&a, PAD) = 0; - SCARG(&a, offset) = SCARG(uap, offset); - SCARG(&a, whence) = SCARG(uap, whence); - - return sys_lseek(l, &a, retval); -} diff --git a/sys/compat/osf1/osf1_dirent.h b/sys/compat/osf1/osf1_dirent.h deleted file mode 100644 index a64ec6c9ef1d..000000000000 --- a/sys/compat/osf1/osf1_dirent.h +++ /dev/null @@ -1,47 +0,0 @@ -/* $NetBSD: osf1_dirent.h,v 1.1 2008/12/02 13:45:02 njoly Exp $ */ - -/*- - * Copyright (c) 1994 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Christos Zoulas. - * - * 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. - * - * 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 _OSF1_DIRENT_H_ -#define _OSF1_DIRENT_H_ - -#define OSF1_MAXNAMLEN 255 - -struct osf1_dirent { - osf1_ino_t d_ino; - u_short d_reclen; - u_short d_namlen; - char d_name[OSF1_MAXNAMLEN + 1]; -}; - -#define OSF1_NAMEOFF(dp) ((char *)&(dp)->d_name - (char *)dp) -#define OSF1_RECLEN(de,namlen) ALIGN((OSF1_NAMEOFF(de) + (namlen) + 1)) - -#endif /* !_OSF1_DIRENT_H_ */ diff --git a/sys/compat/osf1/osf1_errno.c b/sys/compat/osf1/osf1_errno.c deleted file mode 100644 index d012c10abc7e..000000000000 --- a/sys/compat/osf1/osf1_errno.c +++ /dev/null @@ -1,146 +0,0 @@ -/* $NetBSD: osf1_errno.c,v 1.7 2013/12/22 17:14:22 njoly Exp $ */ - -/* - * Copyright (c) 1999 Christopher G. Demetriou. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Christopher G. Demetriou - * for the NetBSD Project. - * 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 -__KERNEL_RCSID(0, "$NetBSD: osf1_errno.c,v 1.7 2013/12/22 17:14:22 njoly Exp $"); - -#include - -#include - -/* - * This table is used to translate NetBSD errnos to OSF/1 errnos - * when returning from a system call. - * - * It is up to date as of Digital UNIX V4.0 and NetBSD 1.4. - */ - -const int native_to_osf1_errno[] = { - 0, - OSF1_EPERM, /* EPERM (1) -> 1 */ - OSF1_ENOENT, /* ENOENT (2) -> 2 */ - OSF1_ESRCH, /* ESRCH (3) -> 3 */ - OSF1_EINTR, /* EINTR (4) -> 4 */ - OSF1_EIO, /* EIO (5) -> 5 */ - OSF1_ENXIO, /* ENXIO (6) -> 6 */ - OSF1_E2BIG, /* E2BIG (7) -> 7 */ - OSF1_ENOEXEC, /* ENOEXEC (8) -> 8 */ - OSF1_EBADF, /* EBADF (9) -> 9 */ - OSF1_ECHILD, /* ECHILD (10) -> 10 */ - OSF1_EDEADLK, /* EDEADLK (11) -> 11 */ - OSF1_ENOMEM, /* ENOMEM (12) -> 12 */ - OSF1_EACCES, /* EACCES (13) -> 13 */ - OSF1_EFAULT, /* EFAULT (14) -> 14 */ - OSF1_ENOTBLK, /* ENOTBLK (15) -> 15 */ - OSF1_EBUSY, /* EBUSY (16) -> 16 */ - OSF1_EEXIST, /* EEXIST (17) -> 17 */ - OSF1_EXDEV, /* EXDEV (18) -> 18 */ - OSF1_ENODEV, /* ENODEV (19) -> 19 */ - OSF1_ENOTDIR, /* ENOTDIR (20) -> 20 */ - OSF1_EISDIR, /* EISDIR (21) -> 21 */ - OSF1_EINVAL, /* EINVAL (22) -> 22 */ - OSF1_ENFILE, /* ENFILE (23) -> 23 */ - OSF1_EMFILE, /* EMFILE (24) -> 24 */ - OSF1_ENOTTY, /* ENOTTY (25) -> 25 */ - OSF1_ETXTBSY, /* ETXTBSY (26) -> 26 */ - OSF1_EFBIG, /* EFBIG (27) -> 27 */ - OSF1_ENOSPC, /* ENOSPC (28) -> 28 */ - OSF1_ESPIPE, /* ESPIPE (29) -> 29 */ - OSF1_EROFS, /* EROFS (30) -> 30 */ - OSF1_EMLINK, /* EMLINK (31) -> 31 */ - OSF1_EPIPE, /* EPIPE (32) -> 32 */ - OSF1_EDOM, /* EDOM (33) -> 33 */ - OSF1_ERANGE, /* ERANGE (34) -> 34 */ - OSF1_EWOULDBLOCK, /* EAGAIN (35) -> OSF1_EWOULDBLOCK (35) */ - OSF1_EINPROGRESS, /* EINPROGRESS (36) -> 36 */ - OSF1_EALREADY, /* EALREADY (37) -> 37 */ - OSF1_ENOTSOCK, /* ENOTSOCK (38) -> 38 */ - OSF1_EDESTADDRREQ, /* EDESTADDRREQ (39) -> 39 */ - OSF1_EMSGSIZE, /* EMSGSIZE (40) -> 40 */ - OSF1_EPROTOTYPE, /* EPROTOTYPE (41) -> 41 */ - OSF1_ENOPROTOOPT, /* ENOPROTOOPT (42) -> 42 */ - OSF1_EPROTONOSUPPORT, /* EPROTONOSUPPORT (43) -> 43 */ - OSF1_ESOCKTNOSUPPORT, /* ESOCKTNOSUPPORT (44) -> 44 */ - OSF1_EOPNOTSUPP, /* EOPNOTSUPP (45) -> 45 */ - OSF1_EPFNOSUPPORT, /* EPFNOSUPPORT (46) -> 46 */ - OSF1_EAFNOSUPPORT, /* EAFNOSUPPORT (47) -> 47 */ - OSF1_EADDRINUSE, /* EADDRINUSE (48) -> 48 */ - OSF1_EADDRNOTAVAIL, /* EADDRNOTAVAIL (49) -> 49 */ - OSF1_ENETDOWN, /* ENETDOWN (50) -> 50 */ - OSF1_ENETUNREACH, /* ENETUNREACH (51) -> 51 */ - OSF1_ENETRESET, /* ENETRESET (52) -> 52 */ - OSF1_ECONNABORTED, /* ECONNABORTED (53) -> 53 */ - OSF1_ECONNRESET, /* ECONNRESET (54) -> 54 */ - OSF1_ENOBUFS, /* ENOBUFS (55) -> 55 */ - OSF1_EISCONN, /* EISCONN (56) -> 56 */ - OSF1_ENOTCONN, /* ENOTCONN (57) -> 57 */ - OSF1_ESHUTDOWN, /* ESHUTDOWN (58) -> 58 */ - OSF1_ETOOMANYREFS, /* ETOOMANYREFS (59) -> 59 */ - OSF1_ETIMEDOUT, /* ETIMEDOUT (60) -> 60 */ - OSF1_ECONNREFUSED, /* ECONNREFUSED (61) -> 61 */ - OSF1_ELOOP, /* ELOOP (62) -> 62 */ - OSF1_ENAMETOOLONG, /* ENAMETOOLONG (63) -> 63 */ - OSF1_EHOSTDOWN, /* EHOSTDOWN (64) -> 64 */ - OSF1_EHOSTUNREACH, /* EHOSTUNREACH (65) -> 65 */ - OSF1_ENOTEMPTY, /* ENOTEMPTY (66) -> 66 */ - OSF1_EPROCLIM, /* EPROCLIM (67) -> 67 */ - OSF1_EUSERS, /* EUSERS (68) -> 68 */ - OSF1_EDQUOT, /* EDQUOT (69) -> 69 */ - OSF1_ESTALE, /* ESTALE (70) -> 70 */ - OSF1_EREMOTE, /* EREMOTE (71) -> 71 */ - OSF1_EBADRPC, /* EBADRPC (72) -> 72 */ - OSF1_ERPCMISMATCH, /* ERPCMISMATCH (73) -> 73 */ - OSF1_EPROGUNAVAIL, /* EPROGUNAVAIL (74) -> 74 */ - OSF1_EPROGMISMATCH, /* EPROGMISMATCH (75) -> 75 */ - OSF1_EPROCUNAVAIL, /* EPROCUNAVAIL (76) -> 76 */ - OSF1_ENOLCK, /* ENOLCK (77) -> 77 */ - OSF1_ENOSYS, /* ENOSYS (78) -> 78 */ - OSF1_EFTYPE, /* EFTYPE (79) -> 79 */ - OSF1_ENOSYS, /* EAUTH (80) has no equivalent */ - OSF1_ENOSYS, /* ENEEDAUTH (81) has no equivalent */ - OSF1_EIDRM, /* EIDRM (82) -> 81 */ - OSF1_ENOMSG, /* ENOMSG (83) -> 80 */ - OSF1_EOVERFLOW, /* EOVERFLOW (84) -> 103 */ - OSF1_EILSEQ, /* EILSEQ (85) -> 116 */ - OSF1_ENOTSUP, /* ENOTSUP (86) -> 99 */ - OSF1_ECANCELED, /* ECANCELED (87) -> 94 */ - OSF1_EBADMSG, /* EBADMSG (88) -> 84 */ - OSF1_ENODATA, /* ENODATA (89) -> 86 */ - OSF1_ENOSR, /* ENOSR (90) -> 82 */ - OSF1_ENOSTR, /* ENOSTR (91) -> 87 */ - OSF1_ETIME, /* ETIME (92) -> 83 */ - OSF1_ENOSYS, /* ENOATTR (93) has no equivalent */ - OSF1_EMULTIHOP, /* EMULTIHOP (94) -> 101 */ - OSF1_ENOLINK, /* ENOLINK (95) -> 102 */ - OSF1_EPROTO, /* EPROTO (96) -> 85 */ -}; -__CTASSERT(__arraycount(native_to_osf1_errno) == ELAST + 1); diff --git a/sys/compat/osf1/osf1_errno.h b/sys/compat/osf1/osf1_errno.h deleted file mode 100644 index c0d789d92c96..000000000000 --- a/sys/compat/osf1/osf1_errno.h +++ /dev/null @@ -1,148 +0,0 @@ -/* $NetBSD: osf1_errno.h,v 1.3 1999/05/01 02:57:10 cgd Exp $ */ - -/* - * Copyright (c) 1999 Christopher G. Demetriou. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Christopher G. Demetriou - * for the NetBSD Project. - * 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. - */ - -/* - * OSF/1 error number definitions, as described by the Digital UNIX V4.0 - * . - */ - -#ifndef _COMPAT_OSF1_OSF1_ERRNO_H_ -#define _COMPAT_OSF1_OSF1_ERRNO_H_ - -#define OSF1_ESUCCESS 0 -#define OSF1_EPERM 1 -#define OSF1_ENOENT 2 -#define OSF1_ESRCH 3 -#define OSF1_EINTR 4 -#define OSF1_EIO 5 -#define OSF1_ENXIO 6 -#define OSF1_E2BIG 7 -#define OSF1_ENOEXEC 8 -#define OSF1_EBADF 9 -#define OSF1_ECHILD 10 -#define OSF1_EDEADLK 11 -#define OSF1_ENOMEM 12 -#define OSF1_EACCES 13 -#define OSF1_EFAULT 14 -#define OSF1_ENOTBLK 15 -#define OSF1_EBUSY 16 -#define OSF1_EEXIST 17 -#define OSF1_EXDEV 18 -#define OSF1_ENODEV 19 -#define OSF1_ENOTDIR 20 -#define OSF1_EISDIR 21 -#define OSF1_EINVAL 22 -#define OSF1_ENFILE 23 -#define OSF1_EMFILE 24 -#define OSF1_ENOTTY 25 -#define OSF1_ETXTBSY 26 -#define OSF1_EFBIG 27 -#define OSF1_ENOSPC 28 -#define OSF1_ESPIPE 29 -#define OSF1_EROFS 30 -#define OSF1_EMLINK 31 -#define OSF1_EPIPE 32 -#define OSF1_EDOM 33 -#define OSF1_ERANGE 34 -#define OSF1_EWOULDBLOCK 35 -#define OSF1_EINPROGRESS 36 -#define OSF1_EALREADY 37 -#define OSF1_ENOTSOCK 38 -#define OSF1_EDESTADDRREQ 39 -#define OSF1_EMSGSIZE 40 -#define OSF1_EPROTOTYPE 41 -#define OSF1_ENOPROTOOPT 42 -#define OSF1_EPROTONOSUPPORT 43 -#define OSF1_ESOCKTNOSUPPORT 44 -#define OSF1_EOPNOTSUPP 45 -#define OSF1_EPFNOSUPPORT 46 -#define OSF1_EAFNOSUPPORT 47 -#define OSF1_EADDRINUSE 48 -#define OSF1_EADDRNOTAVAIL 49 -#define OSF1_ENETDOWN 50 -#define OSF1_ENETUNREACH 51 -#define OSF1_ENETRESET 52 -#define OSF1_ECONNABORTED 53 -#define OSF1_ECONNRESET 54 -#define OSF1_ENOBUFS 55 -#define OSF1_EISCONN 56 -#define OSF1_ENOTCONN 57 -#define OSF1_ESHUTDOWN 58 -#define OSF1_ETOOMANYREFS 59 -#define OSF1_ETIMEDOUT 60 -#define OSF1_ECONNREFUSED 61 -#define OSF1_ELOOP 62 -#define OSF1_ENAMETOOLONG 63 -#define OSF1_EHOSTDOWN 64 -#define OSF1_EHOSTUNREACH 65 -#define OSF1_ENOTEMPTY 66 -#define OSF1_EPROCLIM 67 -#define OSF1_EUSERS 68 -#define OSF1_EDQUOT 69 -#define OSF1_ESTALE 70 -#define OSF1_EREMOTE 71 -#define OSF1_EBADRPC 72 -#define OSF1_ERPCMISMATCH 73 -#define OSF1_EPROGUNAVAIL 74 -#define OSF1_EPROGMISMATCH 75 -#define OSF1_EPROCUNAVAIL 76 -#define OSF1_ENOLCK 77 -#define OSF1_ENOSYS 78 -#define OSF1_EFTYPE 79 -#define OSF1_ENOMSG 80 -#define OSF1_EIDRM 81 -#define OSF1_ENOSR 82 -#define OSF1_ETIME 83 -#define OSF1_EBADMSG 84 -#define OSF1_EPROTO 85 -#define OSF1_ENODATA 86 -#define OSF1_ENOSTR 87 -#define OSF1_ECLONEME 88 -#define OSF1_EDIRTY 89 -#define OSF1_EDUPPKG 90 -#define OSF1_EVERSION 91 -#define OSF1_ENOPKG 92 -#define OSF1_ENOSYM 93 -#define OSF1_ECANCELED 94 -#define OSF1_EFAIL 95 -#define OSF1_EINPROG 97 -#define OSF1_EMTIMERS 98 -#define OSF1_ENOTSUP 99 -#define OSF1_EAIO 100 -#define OSF1_EMULTIHOP 101 -#define OSF1_ENOLINK 102 -#define OSF1_EOVERFLOW 103 -#define OSF1_EILSEQ 116 -#define OSF1_ESOFT 123 -#define OSF1_EMEDIA 124 - -#endif /* _COMPAT_OSF1_OSF1_ERRNO_H_ */ diff --git a/sys/compat/osf1/osf1_exec.c b/sys/compat/osf1/osf1_exec.c deleted file mode 100644 index 2abeb9046344..000000000000 --- a/sys/compat/osf1/osf1_exec.c +++ /dev/null @@ -1,101 +0,0 @@ -/* $NetBSD: osf1_exec.c,v 1.47 2018/08/10 21:44:58 pgoyette Exp $ */ - -/* - * Copyright (c) 1999 Christopher G. Demetriou. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Christopher G. Demetriou - * for the NetBSD Project. - * 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 -__KERNEL_RCSID(0, "$NetBSD: osf1_exec.c,v 1.47 2018/08/10 21:44:58 pgoyette Exp $"); - -#if defined(_KERNEL_OPT) -#include "opt_syscall_debug.h" -#endif - -#include -#include -#include -#include -#include - -#include - -#include -#include -#include - -extern struct sysent osf1_sysent[]; -extern const uint32_t osf1_sysent_nomodbits[]; -extern const char * const osf1_syscallnames[]; -extern char osf1_sigcode[], osf1_esigcode[]; -#ifdef __HAVE_SYSCALL_INTERN -void osf1_syscall_intern(struct proc *); -#else -void syscall(void); -#endif - -struct uvm_object *emul_osf1_object; - -struct emul emul_osf1 = { - .e_name = "osf1", - .e_path = "/emul/osf1", -#ifndef __HAVE_MINIMAL_EMUL - .e_flags = 0, - .e_errno = native_to_osf1_errno, - .e_nosys = OSF1_SYS_syscall, - .e_nsysent = OSF1_SYS_NSYSENT, -#endif - .e_sysent = osf1_sysent, - .e_nomodbits = osf1_sysent_nomodbits, -#ifdef SYSCALL_DEBUG - .e_syscallnames = osf1_syscallnames, -#else - .e_syscallnames = NULL, -#endif - .e_sendsig = sendsig_sigcontext, - .e_trapsignal = trapsignal, - .e_sigcode = osf1_sigcode, - .e_esigcode = osf1_esigcode, - .e_sigobject = &emul_osf1_object, - .e_setregs = setregs, - .e_proc_exec = NULL, - .e_proc_fork = NULL, - .e_proc_exit = NULL, - .e_lwp_fork = NULL, - .e_lwp_exit = NULL, -#ifdef __HAVE_SYSCALL_INTERN - .e_syscall_intern = osf1_syscall_intern, -#else - .e_syscall_intern = syscall, -#endif - .e_sysctlovly = NULL, - .e_vm_default_addr = uvm_default_mapaddr, - .e_usertrap = NULL, - .e_ucsize = 0, - .e_startlwp = NULL -}; diff --git a/sys/compat/osf1/osf1_exec.h b/sys/compat/osf1/osf1_exec.h deleted file mode 100644 index 5951884e1358..000000000000 --- a/sys/compat/osf1/osf1_exec.h +++ /dev/null @@ -1,45 +0,0 @@ -/* $NetBSD: osf1_exec.h,v 1.13 2011/03/05 19:08:40 joerg Exp $ */ - -/* - * Copyright (c) 2000 The NetBSD foundation, Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 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 _OSF1_EXEC_H -#define _OSF1_EXEC_H -#define OSF1_MAX_AUX_ENTRIES 4 /* max we'll ever push (right now) */ - -extern struct emul emul_osf1; - -int osf1_exec_ecoff_probe(struct lwp *, struct exec_package *); -struct ps_strings; -int osf1_copyargs(struct lwp *, struct exec_package *, struct ps_strings *, char **, - void *); - -#endif /* OSF1_EXEC_H */ diff --git a/sys/compat/osf1/osf1_exec_ecoff.c b/sys/compat/osf1/osf1_exec_ecoff.c deleted file mode 100644 index 3be0a0d82a90..000000000000 --- a/sys/compat/osf1/osf1_exec_ecoff.c +++ /dev/null @@ -1,305 +0,0 @@ -/* $NetBSD: osf1_exec_ecoff.c,v 1.24 2012/02/03 20:11:54 matt Exp $ */ - -/* - * Copyright (c) 1999 Christopher G. Demetriou. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Christopher G. Demetriou - * for the NetBSD Project. - * 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 -__KERNEL_RCSID(0, "$NetBSD: osf1_exec_ecoff.c,v 1.24 2012/02/03 20:11:54 matt Exp $"); - -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -struct osf1_exec_emul_arg { - int flags; -#define OSF1_EXEC_EMUL_FLAGS_HAVE_LOADER 0x01 - - char exec_name[MAXPATHLEN+1]; - char loader_name[MAXPATHLEN+1]; -}; - -static int osf1_exec_ecoff_dynamic(struct lwp *l, struct exec_package *epp); -static void osf1_free_emul_arg(void *); - -int -osf1_exec_ecoff_probe(struct lwp *l, struct exec_package *epp) -{ - struct ecoff_exechdr *execp = (struct ecoff_exechdr *)epp->ep_hdr; - struct osf1_exec_emul_arg *emul_arg; - int error; - - /* check if the binary is osf1 ecoff */ - if (execp->f.f_magic != ECOFF_MAGIC_ALPHA) - return ENOEXEC; - - /* set up the exec package emul arg as appropriate */ - emul_arg = kmem_alloc(sizeof(*emul_arg), KM_SLEEP); - epp->ep_emul_arg = emul_arg; - epp->ep_emul_arg_free = osf1_free_emul_arg; - - emul_arg->flags = 0; - /* this cannot overflow because both are size PATH_MAX */ - strcpy(emul_arg->exec_name, epp->ep_kname); - - /* do any special object file handling */ - switch (execp->f.f_flags & ECOFF_FLAG_OBJECT_TYPE_MASK) { - case ECOFF_OBJECT_TYPE_SHARABLE: - /* can't exec a shared library! */ -#if 0 - uprintf("can't execute OSF/1 shared libraries\n"); -#endif - error = ENOEXEC; - break; - - case ECOFF_OBJECT_TYPE_CALL_SHARED: - error = osf1_exec_ecoff_dynamic(l, epp); - break; - - default: - /* just let the normal ECOFF handlers deal with it. */ - error = 0; - break; - } - - if (error) { - exec_free_emul_arg(epp); - kill_vmcmds(&epp->ep_vmcmds); /* if any */ - } - - return (error); -} - -/* - * copy arguments onto the stack in the normal way, then copy out - * any ELF-like AUX entries used by the dynamic loading scheme. - */ -int -osf1_copyargs(struct lwp *l, struct exec_package *pack, struct ps_strings *arginfo, char **stackp, void *argp) -{ - struct osf1_exec_emul_arg *emul_arg = pack->ep_emul_arg; - struct osf1_auxv ai[OSF1_MAX_AUX_ENTRIES], *a; - char *prognameloc, *loadernameloc; - size_t len; - int error; - - if ((error = copyargs(l, pack, arginfo, stackp, argp)) != 0) - goto out; - - a = ai; - memset(ai, 0, sizeof ai); - - prognameloc = *stackp + sizeof ai; - if ((error = copyoutstr(emul_arg->exec_name, prognameloc, - MAXPATHLEN + 1, NULL)) != 0) - goto out; - a->a_type = OSF1_AT_EXEC_FILENAME; - a->a_un.a_ptr = prognameloc; - a++; - - /* - * if there's a loader, push additional auxv entries on the stack. - */ - if (emul_arg->flags & OSF1_EXEC_EMUL_FLAGS_HAVE_LOADER) { - - loadernameloc = prognameloc + MAXPATHLEN + 1; - if ((error = copyoutstr(emul_arg->loader_name, loadernameloc, - MAXPATHLEN + 1, NULL)) != 0) - goto out; - a->a_type = OSF1_AT_EXEC_LOADER_FILENAME; - a->a_un.a_ptr = loadernameloc; - a++; - - a->a_type = OSF1_AT_EXEC_LOADER_FLAGS; - a->a_un.a_val = 0; - if (pack->ep_vap->va_mode & S_ISUID) - a->a_un.a_val |= OSF1_LDR_EXEC_SETUID_F; - if (pack->ep_vap->va_mode & S_ISGID) - a->a_un.a_val |= OSF1_LDR_EXEC_SETGID_F; - if (l->l_proc->p_slflag & PSL_TRACED) - a->a_un.a_val |= OSF1_LDR_EXEC_PTRACE_F; - a++; - } - - a->a_type = OSF1_AT_NULL; - a->a_un.a_val = 0; - a++; - - len = (a - ai) * sizeof(struct osf1_auxv); - if ((error = copyout(ai, *stackp, len)) != 0) - goto out; - *stackp += len; - -out: - exec_free_emul_arg(pack); - return error; -} - -static int -osf1_exec_ecoff_dynamic(struct lwp *l, struct exec_package *epp) -{ - struct osf1_exec_emul_arg *emul_arg = epp->ep_emul_arg; - struct ecoff_exechdr ldr_exechdr; - struct vnode *ldr_vp; - size_t resid; - int error; - - strncpy(emul_arg->loader_name, OSF1_LDR_EXEC_DEFAULT_LOADER, - MAXPATHLEN + 1); - - /* - * locate the loader - * includes /emul/osf1 if appropriate - */ - error = emul_find_interp(LIST_FIRST(&l->l_proc->p_lwps), - epp, emul_arg->loader_name); - if (error) - return error; - - emul_arg->flags |= OSF1_EXEC_EMUL_FLAGS_HAVE_LOADER; - -#if 0 - uprintf("loader is %s\n", emul_arg->loader_name); -#endif - - /* - * open the loader, see if it's an ECOFF executable, - * make sure the object type is amenable, then arrange to - * load it up. - */ - ldr_vp = epp->ep_interp; - epp->ep_interp = NULL; - vn_lock(ldr_vp, LK_EXCLUSIVE | LK_RETRY); - - /* - * Basic access checks. Reject if: - * not a regular file - * exec not allowed on binary - * exec not allowed on mount point - */ - if (ldr_vp->v_type != VREG) { - error = EACCES; - goto badunlock; - } - - if ((error = VOP_ACCESS(ldr_vp, VEXEC, l->l_cred)) != 0) - goto badunlock; - - if (ldr_vp->v_mount->mnt_flag & MNT_NOEXEC) { - error = EACCES; - goto badunlock; - } - - /* - * If loader's mount point disallows set-id execution, - * disable set-id. - */ - if (ldr_vp->v_mount->mnt_flag & MNT_NOSUID) - epp->ep_vap->va_mode &= ~(S_ISUID | S_ISGID); - - VOP_UNLOCK(ldr_vp); - - /* - * read the header, and make sure we got all of it. - */ - if ((error = vn_rdwr(UIO_READ, ldr_vp, (void *)&ldr_exechdr, - sizeof ldr_exechdr, 0, UIO_SYSSPACE, 0, l->l_cred, - &resid, NULL)) != 0) - goto bad; - if (resid != 0) { - error = ENOEXEC; - goto bad; - } - - /* - * Check the magic. We expect it to be the native Alpha ECOFF - * (Digital UNIX) magic number. Also make sure it's not a shared - * lib or dynamically linked executable. - */ - if (ldr_exechdr.f.f_magic != ECOFF_MAGIC_ALPHA) { - error = ENOEXEC; - goto bad; - } - switch (ldr_exechdr.f.f_flags & ECOFF_FLAG_OBJECT_TYPE_MASK) { - case ECOFF_OBJECT_TYPE_SHARABLE: - case ECOFF_OBJECT_TYPE_CALL_SHARED: - /* can't exec shared lib or dynamically linked executable. */ - error = ENOEXEC; - goto bad; - } - - switch (ldr_exechdr.a.magic) { - case ECOFF_OMAGIC: - error = exec_ecoff_prep_omagic(l, epp, &ldr_exechdr, ldr_vp); - break; - case ECOFF_NMAGIC: - error = exec_ecoff_prep_nmagic(l, epp, &ldr_exechdr, ldr_vp); - break; - case ECOFF_ZMAGIC: - error = exec_ecoff_prep_zmagic(l, epp, &ldr_exechdr, ldr_vp); - break; - default: - error = ENOEXEC; - } - if (error) - goto bad; - - /* finally, set up the stack. */ - error = (*epp->ep_esch->es_setup_stack)(l, epp); - if (error) - goto bad; - - vrele(ldr_vp); - return (0); - -badunlock: - VOP_UNLOCK(ldr_vp); -bad: - vrele(ldr_vp); - return (error); -} - -void -osf1_free_emul_arg(void *arg) -{ - struct osf1_exec_emul_arg *emul_arg = arg; - KASSERT(emul_arg != NULL); - - kmem_free(emul_arg, sizeof(*emul_arg)); -} diff --git a/sys/compat/osf1/osf1_file.c b/sys/compat/osf1/osf1_file.c deleted file mode 100644 index 10ab03c4fa36..000000000000 --- a/sys/compat/osf1/osf1_file.c +++ /dev/null @@ -1,437 +0,0 @@ -/* $NetBSD: osf1_file.c,v 1.45 2018/09/03 16:29:29 riastradh Exp $ */ - -/* - * Copyright (c) 1999 Christopher G. Demetriou. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Christopher G. Demetriou - * for the NetBSD Project. - * 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. - */ - -/* - * Copyright (c) 1994, 1995 Carnegie-Mellon University. - * All rights reserved. - * - * Author: Chris G. Demetriou - * - * Permission to use, copy, modify and distribute this software and - * its documentation is hereby granted, provided that both the copyright - * notice and this permission notice appear in all copies of the - * software, derivative works or modified versions, and any portions - * thereof, and that both notices appear in supporting documentation. - * - * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" - * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND - * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. - * - * Carnegie Mellon requests users of this software to return to - * - * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU - * School of Computer Science - * Carnegie Mellon University - * Pittsburgh PA 15213-3890 - * - * any improvements or extensions that they make and grant Carnegie the - * rights to redistribute these changes. - */ - -#include -__KERNEL_RCSID(0, "$NetBSD: osf1_file.c,v 1.45 2018/09/03 16:29:29 riastradh Exp $"); - -#if defined(_KERNEL_OPT) -#include "opt_syscall_debug.h" -#endif - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -#ifdef SYSCALL_DEBUG -extern int scdebug; -#endif - -int -osf1_sys_access(struct lwp *l, const struct osf1_sys_access_args *uap, register_t *retval) -{ - struct sys_access_args a; - unsigned long leftovers; - - SCARG(&a, path) = SCARG(uap, path); - - /* translate flags */ - SCARG(&a, flags) = emul_flags_translate(osf1_access_flags_xtab, - SCARG(uap, flags), &leftovers); - if (leftovers != 0) - return (EINVAL); - - return sys_access(l, &a, retval); -} - -int -osf1_sys_execve(struct lwp *l, const struct osf1_sys_execve_args *uap, register_t *retval) -{ - struct sys_execve_args ap; - - SCARG(&ap, path) = SCARG(uap, path); - SCARG(&ap, argp) = SCARG(uap, argp); - SCARG(&ap, envp) = SCARG(uap, envp); - - return sys_execve(l, &ap, retval); -} - -int -osf1_sys_getdirentries(struct lwp *l, const struct osf1_sys_getdirentries_args *uap, register_t *retval) -{ - /* { - syscallarg(int) fd; - syscallarg(char *) buf; - syscallarg(int) nbytes; - syscallarg(long *) basep; - } */ - struct dirent *bdp; - struct vnode *vp; - char *inp, *buf; /* BSD-format */ - int len, reclen; /* BSD-format */ - char *outp; /* OSF1-format */ - int resid, osf1_reclen; /* OSF1-format */ - struct file *fp; - struct uio auio; - struct iovec aiov; - struct osf1_dirent idb; - off_t off, off1; /* true file offset */ - int buflen, error, eofflag; - off_t *cookiebuf = NULL, *cookie; - int ncookies, fd; - - if (SCARG(uap, nbytes) < 0) - return EINVAL; - if (SCARG(uap, nbytes) == 0) - return 0; - - fd = SCARG(uap, fd); - if ((error = fd_getvnode(fd, &fp)) != 0) - return (error); - if ((fp->f_flag & FREAD) == 0) { - error = EBADF; - goto out1; - } - - vp = fp->f_vnode; - if (vp->v_type != VDIR) { - error = EINVAL; - goto out1; - } - - buflen = uimin(MAXBSIZE, SCARG(uap, nbytes)); - buf = kmem_alloc(buflen, KM_SLEEP); - vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); - off = off1 = fp->f_offset; -again: - aiov.iov_base = buf; - aiov.iov_len = buflen; - auio.uio_iov = &aiov; - auio.uio_iovcnt = 1; - auio.uio_rw = UIO_READ; - auio.uio_resid = buflen; - auio.uio_offset = off; - UIO_SETUP_SYSSPACE(&auio); - /* - * First we read into the allocated buffer, then - * we massage it into user space, one record at a time. - */ - error = VOP_READDIR(vp, &auio, fp->f_cred, &eofflag, &cookiebuf, - &ncookies); - if (error) - goto out; - - inp = buf; - outp = (char *)SCARG(uap, buf); - resid = SCARG(uap, nbytes); - if ((len = buflen - auio.uio_resid) == 0) - goto eof; - - for (cookie = cookiebuf; len > 0; len -= reclen) { - bdp = (struct dirent *)inp; - reclen = bdp->d_reclen; - if (reclen & 3) { - error = EIO; - goto out; - } - if (cookie) - off = *cookie++; /* each entry points to the next */ - else - off += reclen; - if ((off >> 32) != 0) { - compat_offseterr(vp, "osf1_sys_getdirentries"); - error = EINVAL; - goto out; - } - if (bdp->d_fileno == 0) { - inp += reclen; /* it is a hole; squish it out */ - continue; - } - osf1_reclen = OSF1_RECLEN(&idb, bdp->d_namlen); - if (reclen > len || resid < osf1_reclen) { - /* entry too big for buffer, so just stop */ - outp++; - break; - } - /* - * Massage in place to make a OSF1-shaped dirent (otherwise - * we have to worry about touching user memory outside of - * the copyout() call). - */ - idb.d_ino = (osf1_ino_t)bdp->d_fileno; - idb.d_reclen = (u_short)osf1_reclen; - idb.d_namlen = (u_short)bdp->d_namlen; - strlcpy(idb.d_name, bdp->d_name, sizeof(idb.d_name)); - if ((error = copyout((void *)&idb, outp, osf1_reclen))) - goto out; - /* advance past this real entry */ - inp += reclen; - /* advance output past OSF1-shaped entry */ - outp += osf1_reclen; - resid -= osf1_reclen; - } - - /* if we squished out the whole block, try again */ - if (outp == (char *)SCARG(uap, buf)) { - if (cookiebuf) - free(cookiebuf, M_TEMP); - cookiebuf = NULL; - goto again; - } - fp->f_offset = off; /* update the vnode offset */ - -eof: - *retval = SCARG(uap, nbytes) - resid; -out: - VOP_UNLOCK(vp); - if (cookiebuf) - free(cookiebuf, M_TEMP); - kmem_free(buf, buflen); - if (SCARG(uap, basep) != NULL) - error = copyout(&off1, SCARG(uap, basep), sizeof(long)); -out1: - fd_putfile(fd); - return error; -} - -/* - * Get file status; this version does not follow links. - */ -/* ARGSUSED */ -int -osf1_sys_lstat(struct lwp *l, const struct osf1_sys_lstat_args *uap, register_t *retval) -{ - struct stat sb; - struct osf1_stat osb; - int error; - - error = do_sys_stat(SCARG(uap, path), NOFOLLOW, &sb); - if (error) - return (error); - osf1_cvt_stat_from_native(&sb, &osb); - error = copyout(&osb, SCARG(uap, ub), sizeof (osb)); - return (error); -} - -/* - * Get file status; this version does not follow links. - */ -/* ARGSUSED */ -int -osf1_sys_lstat2(struct lwp *l, const struct osf1_sys_lstat2_args *uap, register_t *retval) -{ - struct stat sb; - struct osf1_stat2 osb; - int error; - - error = do_sys_stat(SCARG(uap, path), NOFOLLOW, &sb); - if (error) - return (error); - osf1_cvt_stat2_from_native(&sb, &osb); - error = copyout((void *)&osb, (void *)SCARG(uap, ub), sizeof (osb)); - return (error); -} - -int -osf1_sys_mknod(struct lwp *l, const struct osf1_sys_mknod_args *uap, register_t *retval) -{ - - return do_sys_mknod(l, SCARG(uap, path), SCARG(uap, mode), - osf1_cvt_dev_to_native(SCARG(uap, dev)), retval, UIO_USERSPACE); -} - -int -osf1_sys_open(struct lwp *l, const struct osf1_sys_open_args *uap, register_t *retval) -{ - struct sys_open_args a; - const char *path; - unsigned long leftovers; -#ifdef SYSCALL_DEBUG - char pnbuf[1024]; - - if (scdebug && - copyinstr(SCARG(uap, path), pnbuf, sizeof pnbuf, NULL) == 0) - printf("osf1_open: open: %s\n", pnbuf); -#endif - - /* translate flags */ - SCARG(&a, flags) = emul_flags_translate(osf1_open_flags_xtab, - SCARG(uap, flags), &leftovers); - if (leftovers != 0) - return (EINVAL); - - /* copy mode, no translation necessary */ - SCARG(&a, mode) = SCARG(uap, mode); - - /* pick appropriate path */ - path = SCARG(uap, path); - SCARG(&a, path) = path; - - return sys_open(l, &a, retval); -} - -int -osf1_sys_pathconf(struct lwp *l, const struct osf1_sys_pathconf_args *uap, register_t *retval) -{ - struct sys_pathconf_args a; - int error; - - SCARG(&a, path) = SCARG(uap, path); - - error = osf1_cvt_pathconf_name_to_native(SCARG(uap, name), - &SCARG(&a, name)); - - if (error == 0) - error = sys_pathconf(l, &a, retval); - - return (error); -} - -/* - * Get file status; this version follows links. - */ -/* ARGSUSED */ -int -osf1_sys_stat(struct lwp *l, const struct osf1_sys_stat_args *uap, register_t *retval) -{ - struct stat sb; - struct osf1_stat osb; - int error; - - error = do_sys_stat(SCARG(uap, path), FOLLOW, &sb); - if (error) - return (error); - osf1_cvt_stat_from_native(&sb, &osb); - error = copyout((void *)&osb, (void *)SCARG(uap, ub), sizeof (osb)); - return (error); -} - -/* - * Get file status; this version follows links. - */ -/* ARGSUSED */ -int -osf1_sys_stat2(struct lwp *l, const struct osf1_sys_stat2_args *uap, register_t *retval) -{ - struct stat sb; - struct osf1_stat2 osb; - int error; - - error = do_sys_stat(SCARG(uap, path), FOLLOW, &sb); - if (error) - return (error); - osf1_cvt_stat2_from_native(&sb, &osb); - error = copyout((void *)&osb, (void *)SCARG(uap, ub), sizeof (osb)); - return (error); -} - -int -osf1_sys_truncate(struct lwp *l, const struct osf1_sys_truncate_args *uap, register_t *retval) -{ - struct sys_truncate_args a; - - SCARG(&a, path) = SCARG(uap, path); - SCARG(&a, PAD) = 0; - SCARG(&a, length) = SCARG(uap, length); - - return sys_truncate(l, &a, retval); -} - -int -osf1_sys_utimes(struct lwp *l, const struct osf1_sys_utimes_args *uap, register_t *retval) -{ - struct osf1_timeval otv; - struct timeval tv[2], *tvp; - int error; - - if (SCARG(uap, tptr) == NULL) - tvp = NULL; - else { - /* get the OSF/1 timeval argument */ - error = copyin(SCARG(uap, tptr), &otv, sizeof otv); - if (error != 0) - return error; - - /* fill in and copy out the NetBSD timeval */ - tv[0].tv_sec = otv.tv_sec; - tv[0].tv_usec = otv.tv_usec; - /* Set access and modified to the same time */ - tv[1].tv_sec = otv.tv_sec; - tv[1].tv_usec = otv.tv_usec; - tvp = tv; - } - - return do_sys_utimes(l, NULL, SCARG(uap, path), FOLLOW, - tvp, UIO_SYSSPACE); -} diff --git a/sys/compat/osf1/osf1_generic.c b/sys/compat/osf1/osf1_generic.c deleted file mode 100644 index 2fff09f029fe..000000000000 --- a/sys/compat/osf1/osf1_generic.c +++ /dev/null @@ -1,178 +0,0 @@ -/* $NetBSD: osf1_generic.c,v 1.17 2010/04/23 15:19:20 rmind Exp $ */ - -/* - * Copyright (c) 1999 Christopher G. Demetriou. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Christopher G. Demetriou - * for the NetBSD Project. - * 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. - */ - -/* - * Copyright (c) 1994, 1995 Carnegie-Mellon University. - * All rights reserved. - * - * Author: Chris G. Demetriou - * - * Permission to use, copy, modify and distribute this software and - * its documentation is hereby granted, provided that both the copyright - * notice and this permission notice appear in all copies of the - * software, derivative works or modified versions, and any portions - * thereof, and that both notices appear in supporting documentation. - * - * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" - * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND - * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. - * - * Carnegie Mellon requests users of this software to return to - * - * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU - * School of Computer Science - * Carnegie Mellon University - * Pittsburgh PA 15213-3890 - * - * any improvements or extensions that they make and grant Carnegie the - * rights to redistribute these changes. - */ - -#include -__KERNEL_RCSID(0, "$NetBSD: osf1_generic.c,v 1.17 2010/04/23 15:19:20 rmind Exp $"); - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -/* - * The structures end up being the same... but we can't be sure that - * the other word of our iov_len is zero! - */ - -static int __noinline -osf1_get_iov(struct osf1_iovec *uiov, unsigned int iovcnt, struct iovec **iovp) -{ - struct iovec *iov = *iovp; - struct osf1_iovec osf1_iov[UIO_SMALLIOV]; - int i, j, n, error; - - if (iovcnt > IOV_MAX) - return EINVAL; - - if (iovcnt > UIO_SMALLIOV) { - iov = kmem_alloc(iovcnt * sizeof(*iov), KM_SLEEP); - *iovp = iov; - /* Caller must free - even if we return an error */ - } - - for (i = 0; i < iovcnt; uiov += UIO_SMALLIOV, i += UIO_SMALLIOV) { - n = iovcnt - i; - if (n > UIO_SMALLIOV) - n = UIO_SMALLIOV; - error = copyin(uiov, osf1_iov, n * sizeof osf1_iov[0]); - if (error != 0) - return error; - - for (j = 0; j < n; iov++, j++) { - iov->iov_base = osf1_iov[j].iov_base; - iov->iov_len = osf1_iov[j].iov_len; - } - } - - return 0; -} - -int -osf1_sys_readv(struct lwp *l, const struct osf1_sys_readv_args *uap, register_t *retval) -{ - struct iovec aiov[UIO_SMALLIOV], *niov = aiov; - int error; - - error = osf1_get_iov(SCARG(uap, iovp), SCARG(uap, iovcnt), &niov); - - if (error == 0) { - error = do_filereadv(SCARG(uap, fd), niov, - SCARG(uap, iovcnt), NULL, - FOF_UPDATE_OFFSET | FOF_IOV_SYSSPACE, retval); - } - - if (niov != aiov) - kmem_free(niov, SCARG(uap, iovcnt) * sizeof(*niov)); - - return error; -} - -int -osf1_sys_writev(struct lwp *l, const struct osf1_sys_writev_args *uap, register_t *retval) -{ - struct iovec aiov[UIO_SMALLIOV], *niov = aiov; - int error; - - error = osf1_get_iov(SCARG(uap, iovp), SCARG(uap, iovcnt), &niov); - - if (error == 0) { - error = do_filewritev(SCARG(uap, fd), niov, - SCARG(uap, iovcnt), NULL, - FOF_UPDATE_OFFSET | FOF_IOV_SYSSPACE, retval); - } - - if (niov != aiov) - kmem_free(niov, SCARG(uap, iovcnt) * sizeof(*niov)); - - return error; -} - -int -osf1_sys_select(struct lwp *l, const struct osf1_sys_select_args *uap, - register_t *retval) -{ - struct osf1_timeval otv; - struct timespec ats, *ts = NULL; - int error; - - if (SCARG(uap, tv)) { - /* get the OSF/1 timeval argument */ - error = copyin(SCARG(uap, tv), &otv, sizeof otv); - if (error != 0) - return error; - - ats.tv_sec = otv.tv_sec; - ats.tv_nsec = otv.tv_usec * 1000; - ts = &ats; - } - - return selcommon(retval, SCARG(uap, nd), SCARG(uap, in), - SCARG(uap, ou), SCARG(uap, ex), ts, NULL); -} diff --git a/sys/compat/osf1/osf1_ioctl.c b/sys/compat/osf1/osf1_ioctl.c deleted file mode 100644 index 8dfa0532d9e2..000000000000 --- a/sys/compat/osf1/osf1_ioctl.c +++ /dev/null @@ -1,231 +0,0 @@ -/* $NetBSD: osf1_ioctl.c,v 1.23 2011/07/22 10:02:08 njoly Exp $ */ - -/* - * Copyright (c) 1999 Christopher G. Demetriou. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Christopher G. Demetriou - * for the NetBSD Project. - * 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. - */ - -/* - * Copyright (c) 1994, 1995 Carnegie-Mellon University. - * All rights reserved. - * - * Author: Chris G. Demetriou - * - * Permission to use, copy, modify and distribute this software and - * its documentation is hereby granted, provided that both the copyright - * notice and this permission notice appear in all copies of the - * software, derivative works or modified versions, and any portions - * thereof, and that both notices appear in supporting documentation. - * - * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" - * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND - * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. - * - * Carnegie Mellon requests users of this software to return to - * - * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU - * School of Computer Science - * Carnegie Mellon University - * Pittsburgh PA 15213-3890 - * - * any improvements or extensions that they make and grant Carnegie the - * rights to redistribute these changes. - */ - -#include -__KERNEL_RCSID(0, "$NetBSD: osf1_ioctl.c,v 1.23 2011/07/22 10:02:08 njoly Exp $"); - -#if defined(_KERNEL_OPT) -#include "opt_compat_43.h" -#include "opt_syscall_debug.h" -#endif - -#include -#include -#include -#include -#include -#include - -#include -#include - -#ifdef SYSCALL_DEBUG -extern int scdebug; -#endif - -static int osf1_ioctl_f(struct lwp *l, const struct sys_ioctl_args *nuap, - register_t *retval, int cmd, int dir, int len); -static int osf1_ioctl_i(struct lwp *l, const struct sys_ioctl_args *nuap, - register_t *retval, int cmd, int dir, int len); -static int osf1_ioctl_t(struct lwp *l, const struct sys_ioctl_args *nuap, - register_t *retval, int cmd, int dir, int len); - -int -osf1_sys_ioctl(struct lwp *l, const struct osf1_sys_ioctl_args *uap, register_t *retval) -{ - struct sys_ioctl_args a; - int op, dir, group, cmd, len; -#ifdef SYSCALL_DEBUG - const char *dirstr; -#endif - - op = SCARG(uap, com); - dir = op & OSF1_IOC_DIRMASK; - group = OSF1_IOCGROUP(op); - cmd = OSF1_IOCCMD(op); - len = OSF1_IOCPARM_LEN(op); - - switch (dir) { - case OSF1_IOC_VOID: - dir = IOC_VOID; -#ifdef SYSCALL_DEBUG - dirstr = "none"; -#endif - break; - case OSF1_IOC_OUT: - dir = IOC_OUT; -#ifdef SYSCALL_DEBUG - dirstr = "out"; -#endif - break; - case OSF1_IOC_IN: - dir = IOC_IN; -#ifdef SYSCALL_DEBUG - dirstr = "in"; -#endif - break; - case OSF1_IOC_INOUT: - dir = IOC_INOUT; -#ifdef SYSCALL_DEBUG - dirstr = "in-out"; -#endif - break; - default: - return (EINVAL); - break; - } -#ifdef SYSCALL_DEBUG - if (scdebug) - printf( - "OSF/1 IOCTL: group = %c, cmd = %d, len = %d, dir = %s\n", - group, cmd, len, dirstr); -#endif - - SCARG(&a, fd) = SCARG(uap, fd); - SCARG(&a, com) = SCARG(uap, com) & 0xffffffff; /* XXX */ - SCARG(&a, data) = SCARG(uap, data); - switch (group) { - case 'f': - return osf1_ioctl_f(l, &a, retval, cmd, dir, len); - case 'i': - return osf1_ioctl_i(l, &a, retval, cmd, dir, len); - case 't': - return osf1_ioctl_t(l, &a, retval, cmd, dir, len); - default: - return (ENOTTY); - } -} - -static int -osf1_ioctl_f(struct lwp *l, const struct sys_ioctl_args *uap, register_t *retval, int cmd, int dir, int len) -{ - - switch (cmd) { - case 1: /* OSF/1 FIOCLEX */ - case 2: /* OSF/1 FIONCLEX */ - case 123: /* OSF/1 FIOGETOWN */ - case 124: /* OSF/1 FIOSETOWN */ - case 125: /* OSF/1 FIOASYNC */ - case 126: /* OSF/1 FIONBIO */ - case 127: /* OSF/1 FIONREAD */ - /* same as in NetBSD */ - break; - - default: - return (ENOTTY); - } - - return sys_ioctl(l, uap, retval); -} - -static int -osf1_ioctl_i(struct lwp *l, const struct sys_ioctl_args *uap, register_t *retval, int cmd, int dir, int len) -{ - - switch (cmd) { - case 12: /* OSF/1 SIOCSIFADDR */ - case 14: /* OSF/1 SIOCSIFDSTADDR */ - case 16: /* OSF/1 SIOCSIFFLAGS (XXX) */ - case 17: /* OSF/1 SIOCGIFFLAGS (XXX) */ - case 19: /* OSF/1 SIOCSIFBRDADDR */ - case 22: /* OSF/1 SIOCSIFNETMASK */ - case 23: /* OSF/1 SIOCGIFMETRIC */ - case 24: /* OSF/1 SIOCSIFMETRIC */ - case 25: /* OSF/1 SIOCDIFADDR */ - case 33: /* OSF/1 SIOCGIFADDR */ - case 34: /* OSF/1 SIOCGIFDSTADDR */ - case 35: /* OSF/1 SIOCGIFBRDADDR */ - case 37: /* OSF/1 SIOCGIFNETMASK */ - /* same as in NetBSD */ - break; - - default: - return (ENOTTY); - } - - return sys_ioctl(l, uap, retval); -} - -static int -osf1_ioctl_t(struct lwp *l, const struct sys_ioctl_args *uap, register_t *retval, int cmd, int dir, int len) -{ - - switch (cmd) { -#ifdef COMPAT_43 - case 8: /* OSF/1 COMPAT_43 TIOCGETP (XXX) */ - case 9: /* OSF/1 COMPAT_43 TIOCSETP (XXX) */ -#endif - case 19: /* OSF/1 TIOCGETA (XXX) */ - case 20: /* OSF/1 TIOCSETA (XXX) */ - case 21: /* OSF/1 TIOCSETAW (XXX) */ - case 22: /* OSF/1 TIOCSETAF (XXX) */ - case 26: /* OSF/1 TIOCGETD (XXX) */ - case 27: /* OSF/1 TIOCSETD (XXX) */ - case 97: /* OSF/1 TIOCSCTTY */ - case 103: /* OSF/1 TIOCSWINSZ */ - case 104: /* OSF/1 TIOCGWINSZ */ - /* same as in NetBSD */ - break; - - default: - return (ENOTTY); - } - - return sys_ioctl(l, uap, retval); -} diff --git a/sys/compat/osf1/osf1_misc.c b/sys/compat/osf1/osf1_misc.c deleted file mode 100644 index f99480253d45..000000000000 --- a/sys/compat/osf1/osf1_misc.c +++ /dev/null @@ -1,426 +0,0 @@ -/* $NetBSD: osf1_misc.c,v 1.88 2018/09/03 16:29:29 riastradh Exp $ */ - -/* - * Copyright (c) 1999 Christopher G. Demetriou. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Christopher G. Demetriou - * for the NetBSD Project. - * 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. - */ - -/* - * Copyright (c) 1994, 1995 Carnegie-Mellon University. - * All rights reserved. - * - * Author: Chris G. Demetriou - * - * Permission to use, copy, modify and distribute this software and - * its documentation is hereby granted, provided that both the copyright - * notice and this permission notice appear in all copies of the - * software, derivative works or modified versions, and any portions - * thereof, and that both notices appear in supporting documentation. - * - * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" - * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND - * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. - * - * Carnegie Mellon requests users of this software to return to - * - * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU - * School of Computer Science - * Carnegie Mellon University - * Pittsburgh PA 15213-3890 - * - * any improvements or extensions that they make and grant Carnegie the - * rights to redistribute these changes. - */ - -#include -__KERNEL_RCSID(0, "$NetBSD: osf1_misc.c,v 1.88 2018/09/03 16:29:29 riastradh Exp $"); - -#if defined(_KERNEL_OPT) -#include "opt_syscall_debug.h" -#endif - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#include -#include -#include -#include - -int -osf1_sys_classcntl(struct lwp *l, const struct osf1_sys_classcntl_args *uap, register_t *retval) -{ - - /* XXX */ - return (ENOSYS); -} - -int -osf1_sys_reboot(struct lwp *l, const struct osf1_sys_reboot_args *uap, register_t *retval) -{ - struct sys_reboot_args a; - unsigned long leftovers; - - /* translate opt */ - SCARG(&a, opt) = emul_flags_translate(osf1_reboot_opt_xtab, - SCARG(uap, opt), &leftovers); - if (leftovers != 0) - return (EINVAL); - - SCARG(&a, bootstr) = NULL; - - return sys_reboot(l, &a, retval); -} - -int -osf1_sys_set_program_attributes(struct lwp *l, const struct osf1_sys_set_program_attributes_args *uap, register_t *retval) -{ - struct proc *p = l->l_proc; - segsz_t tsize, dsize; - - tsize = btoc(SCARG(uap, tsize)); - dsize = btoc(SCARG(uap, dsize)); - - if (dsize > p->p_rlimit[RLIMIT_DATA].rlim_cur) - return (ENOMEM); - if (tsize > MAXTSIZ) - return (ENOMEM); - - /* XXXSMP unlocked */ - p->p_vmspace->vm_taddr = SCARG(uap, taddr); - p->p_vmspace->vm_tsize = tsize; - p->p_vmspace->vm_daddr = SCARG(uap, daddr); - p->p_vmspace->vm_dsize = dsize; - - return (0); -} - -int -osf1_sys_getsysinfo(struct lwp *l, const struct osf1_sys_getsysinfo_args *uap, register_t *retval) -{ - extern int ncpus; - int error; - int unit; - long percpu; - long proctype; - u_int64_t fpflags; - struct osf1_cpu_info cpuinfo; - const void *data; - size_t datalen; - - error = 0; - - switch(SCARG(uap, op)) - { - case OSF_GET_MAX_UPROCS: - data = &maxproc; - datalen = sizeof(maxproc); - break; - case OSF_GET_PHYSMEM: - data = &physmem; - datalen = sizeof(physmem); - break; - case OSF_GET_MAX_CPU: - case OSF_GET_CPUS_IN_BOX: - data = &ncpus; - datalen = sizeof(ncpus); - break; - case OSF_GET_IEEE_FP_CONTROL: - if (((fpflags = alpha_read_fp_c(l)) & IEEE_INHERIT) != 0) { - fpflags |= 1ULL << 63; - fpflags &= ~IEEE_INHERIT; - } - data = &fpflags; - datalen = sizeof(fpflags); - break; - case OSF_GET_CPU_INFO: - memset(&cpuinfo, 0, sizeof(cpuinfo)); -#ifdef __alpha__ - unit = alpha_pal_whami(); -#else - unit = 0; /* XXX */ -#endif - cpuinfo.current_cpu = unit; - cpuinfo.cpus_in_box = ncpus; - cpuinfo.cpu_type = LOCATE_PCS(hwrpb, unit)->pcs_proc_type; - cpuinfo.ncpus = ncpus; - cpuinfo.cpus_present = ncpus; - cpuinfo.cpus_running = ncpus; - cpuinfo.cpu_binding = 1; - cpuinfo.cpu_ex_binding = 0; - cpuinfo.mhz = hwrpb->rpb_cc_freq / 1000000; - data = &cpuinfo; - datalen = sizeof(cpuinfo); - break; - case OSF_GET_PROC_TYPE: -#ifdef __alpha__ - unit = alpha_pal_whami(); - proctype = LOCATE_PCS(hwrpb, unit)->pcs_proc_type; -#else - proctype = 0; /* XXX */ -#endif - data = &proctype; - datalen = sizeof(percpu); - break; - case OSF_GET_HWRPB: /* note -- osf/1 doesn't have rpb_tbhint[8] */ - data = hwrpb; - datalen = hwrpb->rpb_size; - break; - case OSF_GET_PLATFORM_NAME: - data = platform.model; - datalen = strlen(platform.model) + 1; - break; - default: - printf("osf1_getsysinfo called with unknown op=%ld\n", - SCARG(uap, op)); - /* return EINVAL; */ - return 0; - } - - if (SCARG(uap, nbytes) < datalen) - return (EINVAL); - error = copyout(data, SCARG(uap, buffer), datalen); - if (!error) - retval[0] = 1; - return (error); -} - -int -osf1_sys_setsysinfo(struct lwp *l, const struct osf1_sys_setsysinfo_args *uap, register_t *retval) -{ - u_int64_t temp; - int error; - - error = 0; - - switch(SCARG(uap, op)) { - case OSF_SET_IEEE_FP_CONTROL: - - if ((error = copyin(SCARG(uap, buffer), &temp, sizeof(temp)))) - break; - if (temp >> 63 != 0) - temp |= IEEE_INHERIT; - alpha_write_fp_c(l, temp); - break; - default: - uprintf("osf1_setsysinfo called with op=%ld\n", SCARG(uap, op)); - //error = EINVAL; - } - retval[0] = 0; - return (error); -} - -int -osf1_sys_sysinfo(struct lwp *l, const struct osf1_sys_sysinfo_args *uap, register_t *retval) -{ - const char *string; - size_t slen; - int error; - - error = 0; - switch (SCARG(uap, cmd)) { - case OSF1_SI_SYSNAME: - string = ostype; - break; - - case OSF1_SI_HOSTNAME: - string = hostname; - break; - - case OSF1_SI_RELEASE: - string = osrelease; - break; - - case OSF1_SI_VERSION: - goto should_handle; - - case OSF1_SI_MACHINE: - string = MACHINE; - break; - - case OSF1_SI_ARCHITECTURE: - string = MACHINE_ARCH; - break; - - case OSF1_SI_HW_SERIAL: - string = "666"; /* OSF/1 emulation? YES! */ - break; - - case OSF1_SI_HW_PROVIDER: - string = "unknown"; - break; - - case OSF1_SI_SRPC_DOMAIN: - goto dont_care; - - case OSF1_SI_SET_HOSTNAME: - goto should_handle; - - case OSF1_SI_SET_SYSNAME: - goto should_handle; - - case OSF1_SI_SET_SRPC_DOMAIN: - goto dont_care; - - default: -should_handle: - printf("osf1_sys_sysinfo(%d, %p, 0x%lx)\n", SCARG(uap, cmd), - SCARG(uap, buf), SCARG(uap,len)); -dont_care: - return (EINVAL); - }; - - slen = strlen(string) + 1; - if (SCARG(uap, buf)) { - error = copyout(string, SCARG(uap, buf), - uimin(slen, SCARG(uap, len))); - if (!error && (SCARG(uap, len) > 0) && (SCARG(uap, len) < slen)) - subyte(SCARG(uap, buf) + SCARG(uap, len) - 1, 0); - } - if (!error) - retval[0] = slen; - - return (error); -} - -int -osf1_sys_uname(struct lwp *l, const struct osf1_sys_uname_args *uap, register_t *retval) -{ - struct osf1_utsname u; - const char *cp; - char *dp, *ep; - - strncpy(u.sysname, ostype, sizeof(u.sysname)); - strncpy(u.nodename, hostname, sizeof(u.nodename)); - strncpy(u.release, osrelease, sizeof(u.release)); - dp = u.version; - ep = &u.version[sizeof(u.version) - 1]; - for (cp = version; *cp && *cp != '('; cp++) - ; - for (cp++; *cp && *cp != ')' && dp < ep; cp++) - *dp++ = *cp; - for (; *cp && *cp != '#'; cp++) - ; - for (; *cp && *cp != ':' && dp < ep; cp++) - *dp++ = *cp; - *dp = '\0'; - strncpy(u.machine, MACHINE, sizeof(u.machine)); - return (copyout((void *)&u, (void *)SCARG(uap, name), sizeof u)); -} - -int -osf1_sys_usleep_thread(struct lwp *l, const struct osf1_sys_usleep_thread_args *uap, register_t *retval) -{ - struct osf1_timeval otv, endotv; - struct timeval tv, ntv, endtv; - u_long ticks; - int error; - - if ((error = copyin(SCARG(uap, sleep), &otv, sizeof otv))) - return (error); - tv.tv_sec = otv.tv_sec; - tv.tv_usec = otv.tv_usec; - - ticks = howmany((u_long)tv.tv_sec * 1000000 + tv.tv_usec, tick); - if (ticks == 0) - ticks = 1; - - getmicrotime(&tv); - - tsleep(l, PUSER|PCATCH, "uslpthrd", ticks); /* XXX */ - - if (SCARG(uap, slept) != NULL) { - getmicrotime(&ntv); - timersub(&ntv, &tv, &endtv); - if (endtv.tv_sec < 0 || endtv.tv_usec < 0) - endtv.tv_sec = endtv.tv_usec = 0; - - endotv.tv_sec = endtv.tv_sec; - endotv.tv_usec = endtv.tv_usec; - error = copyout(&endotv, SCARG(uap, slept), sizeof endotv); - } - return (error); -} - -int -osf1_sys_wait4(struct lwp *l, const struct osf1_sys_wait4_args *uap, register_t *retval) -{ - struct osf1_rusage osf1_rusage; - struct rusage netbsd_rusage; - unsigned long leftovers; - int error, status; - int options = SCARG(uap, options); - int pid = SCARG(uap, pid); - - /* translate options */ - options = emul_flags_translate(osf1_wait_options_xtab, - options, &leftovers); - if (leftovers != 0) - return (EINVAL); - - error = do_sys_wait(&pid, &status, options, - SCARG(uap, rusage) != NULL ? &netbsd_rusage : NULL); - - retval[0] = pid; - if (pid == 0) - return error; - - if (SCARG(uap, rusage)) { - osf1_cvt_rusage_from_native(&netbsd_rusage, &osf1_rusage); - error = copyout(&osf1_rusage, SCARG(uap, rusage), - sizeof osf1_rusage); - } - - if (error == 0 && SCARG(uap, status)) - error = copyout(&status, SCARG(uap, status), sizeof(status)); - - return error; -} diff --git a/sys/compat/osf1/osf1_mmap.c b/sys/compat/osf1/osf1_mmap.c deleted file mode 100644 index 86e433a0346c..000000000000 --- a/sys/compat/osf1/osf1_mmap.c +++ /dev/null @@ -1,219 +0,0 @@ -/* $NetBSD: osf1_mmap.c,v 1.14 2009/05/18 12:39:02 njoly Exp $ */ - -/* - * Copyright (c) 1999 Christopher G. Demetriou. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Christopher G. Demetriou - * for the NetBSD Project. - * 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 -__KERNEL_RCSID(0, "$NetBSD: osf1_mmap.c,v 1.14 2009/05/18 12:39:02 njoly Exp $"); - -#include -#include -#include -#include -#include -#include -#include /* XXX see mmap emulation */ - -#include -#include -#include - -int -osf1_sys_madvise(struct lwp *l, const struct osf1_sys_madvise_args *uap, register_t *retval) -{ - struct sys_madvise_args a; - int error; - - SCARG(&a, addr) = SCARG(uap, addr); - SCARG(&a, len) = SCARG(uap, len); - - error = 0; - switch (SCARG(uap, behav)) { - case OSF1_MADV_NORMAL: - SCARG(&a, behav) = MADV_NORMAL; - break; - - case OSF1_MADV_RANDOM: - SCARG(&a, behav) = MADV_RANDOM; - break; - - case OSF1_MADV_SEQUENTIAL: - SCARG(&a, behav) = MADV_SEQUENTIAL; - break; - - case OSF1_MADV_WILLNEED: - SCARG(&a, behav) = MADV_WILLNEED; - break; - - case OSF1_MADV_DONTNEED_COMPAT: - SCARG(&a, behav) = MADV_DONTNEED; - break; - - case OSF1_MADV_SPACEAVAIL: - SCARG(&a, behav) = MADV_SPACEAVAIL; - break; - - case OSF1_MADV_DONTNEED: - /* - * XXX not supported. In Digital UNIX, this flushes all - * XXX data in the region and replaces it with ZFOD pages. - */ - error = EINVAL; - break; - - default: - error = EINVAL; - break; - } - - if (error == 0) { - error = sys_madvise(l, &a, retval); - - /* - * NetBSD madvise() currently always returns ENOSYS. - * Digital UNIX says that non-operational requests (i.e. - * valid, but unimplemented 'behav') will return success. - */ - if (error == ENOSYS) - error = 0; - } - return (error); -} - -int -osf1_sys_mmap(struct lwp *l, const struct osf1_sys_mmap_args *uap, register_t *retval) -{ - struct proc *p = l->l_proc; - struct sys_mmap_args a; - unsigned long leftovers; - - SCARG(&a, addr) = SCARG(uap, addr); - SCARG(&a, len) = SCARG(uap, len); - SCARG(&a, fd) = SCARG(uap, fd); - SCARG(&a, PAD) = 0; - SCARG(&a, pos) = SCARG(uap, pos); - - /* translate prot */ - SCARG(&a, prot) = emul_flags_translate(osf1_mmap_prot_xtab, - SCARG(uap, prot), &leftovers); - if (leftovers != 0) - return (EINVAL); - - /* translate flags */ - SCARG(&a, flags) = emul_flags_translate(osf1_mmap_flags_xtab, - SCARG(uap, flags), &leftovers); - if (leftovers != 0) - return (EINVAL); - - /* - * XXX The following code is evil. - * - * The OSF/1 mmap() function attempts to map non-fixed entries - * near the address that the user specified. Therefore, for - * non-fixed entires we try to find space in the address space - * starting at that address. If the user specified zero, we - * start looking at at least PAGE_SIZE, so that programs can't - * accidentally live through deferencing NULL. - * - * The need for this kludgery is increased by the fact that - * the loader data segment is mapped at - * (end of user address space) - 1G, MAXDSIZ is 1G, and - * the VM system tries allocate non-fixed mappings _AFTER_ - * (start of data) + MAXDSIZ. With the loader, of course, - * that means that it'll start trying at - * (end of user address space), and will never succeed! - * - * Notes: - * - * * Though we find space here, if something else (e.g. a second - * thread) were mucking with the address space the mapping - * we found might be used by another mmap(), and this call - * would clobber that region. - * - * * In general, tricks like this only work for MAP_ANON mappings, - * because of sharing/cache issues. That's not a problem on - * the Alpha, and though it's not good style to abuse that fact, - * there's little choice. - * - * * In order for this to be done right, the VM system should - * really try to use the requested 'addr' passed in to mmap() - * as a hint, even if non-fixed. If it's passed as zero, - * _maybe_ then try (start of data) + MAXDSIZ, or maybe - * provide a better way to avoid the data region altogether. - */ - if ((SCARG(&a, flags) & MAP_FIXED) == 0) { - vaddr_t addr = round_page((vaddr_t)SCARG(&a, addr)); - vsize_t size = round_page((vsize_t)SCARG(&a, len)); - int fixed = 0; - - vm_map_lock(&p->p_vmspace->vm_map); - - /* if non-NULL address given, start looking there */ - if (addr != 0 && uvm_map_findspace(&p->p_vmspace->vm_map, - addr, size, &addr, NULL, 0, 0, 0) != NULL) { - fixed = 1; - goto done; - } - - /* didn't find anything. take it again from the top. */ - if (uvm_map_findspace(&p->p_vmspace->vm_map, PAGE_SIZE, size, - &addr, NULL, 0, 0, 0) != NULL) { - fixed = 1; - goto done; - } - -done: - vm_map_unlock(&p->p_vmspace->vm_map); - if (fixed) { - SCARG(&a, flags) |= MAP_FIXED; - SCARG(&a, addr) = (void *)addr; - } - } - - return sys_mmap(l, &a, retval); -} - -int -osf1_sys_mprotect(struct lwp *l, const struct osf1_sys_mprotect_args *uap, register_t *retval) -{ - struct sys_mprotect_args a; - unsigned long leftovers; - - SCARG(&a, addr) = SCARG(uap, addr); - SCARG(&a, len) = SCARG(uap, len); - - /* translate prot */ - SCARG(&a, prot) = emul_flags_translate(osf1_mmap_prot_xtab, - SCARG(uap, prot), &leftovers); - if (leftovers != 0) - return (EINVAL); - - return sys_mprotect(l, &a, retval); -} diff --git a/sys/compat/osf1/osf1_mod.c b/sys/compat/osf1/osf1_mod.c deleted file mode 100644 index d0541aec8e8a..000000000000 --- a/sys/compat/osf1/osf1_mod.c +++ /dev/null @@ -1,84 +0,0 @@ -/* $NetBSD: osf1_mod.c,v 1.6 2019/01/27 02:08:40 pgoyette Exp $ */ - -/*- - * Copyright (c) 2008 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software developed for The NetBSD Foundation - * by Andrew Doran. - * - * 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. - * - * 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. - */ - -#ifdef _KERNEL_OPT -#include "opt_execfmt.h" -#endif - -#include -__KERNEL_RCSID(0, "$NetBSD: osf1_mod.c,v 1.6 2019/01/27 02:08:40 pgoyette Exp $"); - -#include -#include -#include -#include -#include -#include - -#include -#include - -MODULE(MODULE_CLASS_EXEC, compat_osf1, "compat,compat_util,exec_ecoff"); - -#define OSF1_ARGLEN \ - (OSF1_MAX_AUX_ENTRIES * sizeof (struct osf1_auxv) + \ - 2 * (MAXPATHLEN + 1)) /* exec & loader names */ - -static struct execsw osf1_execsw = { - .es_hdrsz = ECOFF_HDR_SIZE, - .es_makecmds = exec_ecoff_makecmds, - .u = { - .ecoff_probe_func = osf1_exec_ecoff_probe, - }, - .es_emul = &emul_osf1, - .es_prio = EXECSW_PRIO_ANY, - .es_arglen = OSF1_ARGLEN, - .es_copyargs = osf1_copyargs, - .es_setregs = cpu_exec_ecoff_setregs, - .es_coredump = coredump_netbsd, - .es_setup_stack = exec_setup_stack, -}; - -static int -compat_osf1_modcmd(modcmd_t cmd, void *arg) -{ - - switch (cmd) { - case MODULE_CMD_INIT: - return exec_add(&osf1_execsw, 1); - - case MODULE_CMD_FINI: - return exec_remove(&osf1_execsw, 1); - - default: - return ENOTTY; - } -} diff --git a/sys/compat/osf1/osf1_mount.c b/sys/compat/osf1/osf1_mount.c deleted file mode 100644 index b92f71f4ce13..000000000000 --- a/sys/compat/osf1/osf1_mount.c +++ /dev/null @@ -1,313 +0,0 @@ -/* $NetBSD: osf1_mount.c,v 1.55 2018/09/03 16:29:29 riastradh Exp $ */ - -/* - * Copyright (c) 1999 Christopher G. Demetriou. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Christopher G. Demetriou - * for the NetBSD Project. - * 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. - */ - -/* - * Copyright (c) 1994, 1995 Carnegie-Mellon University. - * All rights reserved. - * - * Author: Chris G. Demetriou - * - * Permission to use, copy, modify and distribute this software and - * its documentation is hereby granted, provided that both the copyright - * notice and this permission notice appear in all copies of the - * software, derivative works or modified versions, and any portions - * thereof, and that both notices appear in supporting documentation. - * - * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" - * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND - * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. - * - * Carnegie Mellon requests users of this software to return to - * - * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU - * School of Computer Science - * Carnegie Mellon University - * Pittsburgh PA 15213-3890 - * - * any improvements or extensions that they make and grant Carnegie the - * rights to redistribute these changes. - */ - -#include -__KERNEL_RCSID(0, "$NetBSD: osf1_mount.c,v 1.55 2018/09/03 16:29:29 riastradh Exp $"); - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#include -#include - -#include -#include -#include -#include - -#include -#include - -#include - -#define OSF1_MNT_WAIT 0x1 -#define OSF1_MNT_NOWAIT 0x2 - -#define OSF1_MNT_FORCE 0x1 -#define OSF1_MNT_NOFORCE 0x2 - -/* acceptable flags for various calls */ -#define OSF1_GETFSSTAT_FLAGS (OSF1_MNT_WAIT|OSF1_MNT_NOWAIT) -#define OSF1_MOUNT_FLAGS 0xffffffff /* XXX */ -#define OSF1_UNMOUNT_FLAGS (OSF1_MNT_FORCE|OSF1_MNT_NOFORCE) - - -static int osf1_mount_mfs(struct lwp *, const struct osf1_sys_mount_args *); -static int osf1_mount_nfs(struct lwp *, const struct osf1_sys_mount_args *); - -int -osf1_sys_fstatfs(struct lwp *l, const struct osf1_sys_fstatfs_args *uap, register_t *retval) -{ - file_t *fp; - struct mount *mp; - struct statvfs *sp; - struct osf1_statfs osfs; - int error; - - /* fd_getvnode() will use the descriptor for us */ - if ((error = fd_getvnode(SCARG(uap, fd), &fp))) - return (error); - mp = fp->f_vnode->v_mount; - sp = &mp->mnt_stat; - if ((error = VFS_STATVFS(mp, sp))) - goto out; - sp->f_flag = mp->mnt_flag & MNT_VISFLAGMASK; - osf1_cvt_statfs_from_native(sp, &osfs); - error = copyout(&osfs, SCARG(uap, buf), uimin(sizeof osfs, - SCARG(uap, len))); - out: - fd_putfile(SCARG(uap, fd)); - return (error); -} - -int -osf1_sys_getfsstat(struct lwp *l, const struct osf1_sys_getfsstat_args *uap, register_t *retval) -{ - mount_iterator_t *iter; - struct mount *mp; - struct statvfs *sp; - struct osf1_statfs osfs; - char *osf_sfsp; - long count, maxcount, error; - - if (SCARG(uap, flags) & ~OSF1_GETFSSTAT_FLAGS) - return (EINVAL); - - maxcount = SCARG(uap, bufsize) / sizeof(struct osf1_statfs); - osf_sfsp = (void *)SCARG(uap, buf); - mountlist_iterator_init(&iter); - count = 0; - while ((mp = mountlist_iterator_next(iter)) != NULL) { - if (osf_sfsp && count < maxcount) { - sp = &mp->mnt_stat; - /* - * If OSF1_MNT_NOWAIT is specified, do not refresh the - * fsstat cache. OSF1_MNT_WAIT overrides - * OSF1_MNT_NOWAIT. - */ - if (((SCARG(uap, flags) & OSF1_MNT_NOWAIT) == 0 || - (SCARG(uap, flags) & OSF1_MNT_WAIT)) && - (error = VFS_STATVFS(mp, sp)) == 0) { - sp->f_flag = mp->mnt_flag & MNT_VISFLAGMASK; - osf1_cvt_statfs_from_native(sp, &osfs); - if ((error = copyout(&osfs, osf_sfsp, - sizeof (struct osf1_statfs)))) { - mountlist_iterator_destroy(iter); - return (error); - } - osf_sfsp += sizeof (struct osf1_statfs); - } - } - count++; - } - mountlist_iterator_destroy(iter); - if (osf_sfsp && count > maxcount) - *retval = maxcount; - else - *retval = count; - return (0); -} - -int -osf1_sys_mount(struct lwp *l, const struct osf1_sys_mount_args *uap, register_t *retval) -{ - - if (SCARG(uap, flags) & ~OSF1_MOUNT_FLAGS) - return (EINVAL); - - /* XXX - xlate flags */ - - switch (SCARG(uap, type)) { - case OSF1_MOUNT_NFS: - return osf1_mount_nfs(l, uap); - break; - - case OSF1_MOUNT_MFS: - return osf1_mount_mfs(l, uap); - - default: - return (EINVAL); - } -} - -int -osf1_sys_statfs(struct lwp *l, const struct osf1_sys_statfs_args *uap, register_t *retval) -{ - struct mount *mp; - struct statvfs *sp; - struct osf1_statfs osfs; - int error; - struct vnode *vp; - - error = namei_simple_user(SCARG(uap, path), - NSM_FOLLOW_TRYEMULROOT, &vp); - if (error != 0) - return (error); - mp = vp->v_mount; - sp = &mp->mnt_stat; - vrele(vp); - if ((error = VFS_STATVFS(mp, sp))) - return (error); - sp->f_flag = mp->mnt_flag & MNT_VISFLAGMASK; - osf1_cvt_statfs_from_native(sp, &osfs); - return copyout(&osfs, SCARG(uap, buf), uimin(sizeof osfs, - SCARG(uap, len))); -} - -int -osf1_sys_unmount(struct lwp *l, const struct osf1_sys_unmount_args *uap, register_t *retval) -{ - struct sys_unmount_args a; - - SCARG(&a, path) = SCARG(uap, path); - - if (SCARG(uap, flags) & ~OSF1_UNMOUNT_FLAGS) - return (EINVAL); - SCARG(&a, flags) = 0; - if ((SCARG(uap, flags) & OSF1_MNT_FORCE) && - (SCARG(uap, flags) & OSF1_MNT_NOFORCE) == 0) - SCARG(&a, flags) |= MNT_FORCE; - - return sys_unmount(l, &a, retval); -} - -static int -osf1_mount_mfs(struct lwp *l, const struct osf1_sys_mount_args *uap) -{ - struct osf1_mfs_args osf_ma; - struct mfs_args bsd_ma; - int error; - register_t dummy; - - if ((error = copyin(SCARG(uap, data), &osf_ma, sizeof osf_ma))) - return error; - - memset(&bsd_ma, 0, sizeof bsd_ma); - bsd_ma.fspec = osf_ma.name; - /* XXX export args */ - bsd_ma.base = osf_ma.base; - bsd_ma.size = osf_ma.size; - - return do_sys_mount(l, "mfs", UIO_SYSSPACE, SCARG(uap, path), - SCARG(uap, flags), &bsd_ma, UIO_SYSSPACE, sizeof bsd_ma, &dummy); -} - -static int -osf1_mount_nfs(struct lwp *l, const struct osf1_sys_mount_args *uap) -{ - struct osf1_nfs_args osf_na; - struct nfs_args bsd_na; - int error; - unsigned long leftovers; - register_t dummy; - - if ((error = copyin(SCARG(uap, data), &osf_na, sizeof osf_na))) - return error; - - memset(&bsd_na, 0, sizeof bsd_na); - bsd_na.addr = (struct sockaddr *)osf_na.addr; - bsd_na.addrlen = sizeof (struct sockaddr_in); - bsd_na.fh = osf_na.fh; - - /* translate flags */ - bsd_na.flags = emul_flags_translate(osf1_nfs_mount_flags_xtab, - osf_na.flags, &leftovers); - if (leftovers & OSF1_NFSMNT_HOSTNAME) { - leftovers &= ~OSF1_NFSMNT_HOSTNAME; - bsd_na.hostname = osf_na.hostname; - } else { - /* XXX FILL IN HOST NAME WITH IPADDR? */ - } - if (leftovers & OSF1_NFSMNT_TCP) { - leftovers &= ~OSF1_NFSMNT_TCP; - bsd_na.sotype = SOCK_DGRAM; - bsd_na.proto = 0; - } else { - bsd_na.sotype = SOCK_STREAM; - bsd_na.proto = 0; - } - if (leftovers != 0) - return (EINVAL); - - /* copy structure elements based on flags */ - if (bsd_na.flags & NFSMNT_WSIZE) - bsd_na.wsize = osf_na.wsize; - if (bsd_na.flags & NFSMNT_RSIZE) - bsd_na.rsize = osf_na.rsize; - if (bsd_na.flags & NFSMNT_TIMEO) - bsd_na.timeo = osf_na.timeo; - if (bsd_na.flags & NFSMNT_RETRANS) - bsd_na.retrans = osf_na.retrans; - - return do_sys_mount(l, "nfs", UIO_SYSSPACE, SCARG(uap, path), - SCARG(uap, flags), &bsd_na, UIO_SYSSPACE, sizeof bsd_na, &dummy); -} diff --git a/sys/compat/osf1/osf1_prot.c b/sys/compat/osf1/osf1_prot.c deleted file mode 100644 index 9871f18df687..000000000000 --- a/sys/compat/osf1/osf1_prot.c +++ /dev/null @@ -1,117 +0,0 @@ -/* $NetBSD: osf1_prot.c,v 1.13 2007/12/20 23:03:03 dsl Exp $ */ - -/* - * Copyright (c) 1999 Christopher G. Demetriou. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Christopher G. Demetriou - * for the NetBSD Project. - * 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. - */ - -/* - * Copyright (c) 1994, 1995 Carnegie-Mellon University. - * All rights reserved. - * - * Author: Chris G. Demetriou - * - * Permission to use, copy, modify and distribute this software and - * its documentation is hereby granted, provided that both the copyright - * notice and this permission notice appear in all copies of the - * software, derivative works or modified versions, and any portions - * thereof, and that both notices appear in supporting documentation. - * - * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" - * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND - * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. - * - * Carnegie Mellon requests users of this software to return to - * - * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU - * School of Computer Science - * Carnegie Mellon University - * Pittsburgh PA 15213-3890 - * - * any improvements or extensions that they make and grant Carnegie the - * rights to redistribute these changes. - */ - -#include -__KERNEL_RCSID(0, "$NetBSD: osf1_prot.c,v 1.13 2007/12/20 23:03:03 dsl Exp $"); - -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -/* - * OSF/1 defines _POSIX_SAVED_IDS, which means that our normal - * setgid() won't work. - * - * If you change "uid" to "gid" in the discussion, below, about - * setuid(), you'll get a correct description of setgid(). - */ -int -osf1_sys_setgid(struct lwp *l, const struct osf1_sys_setgid_args *uap, register_t *retval) -{ - gid_t gid = SCARG(uap, gid); - int error; - - error = do_setresgid(l, gid, gid, gid, 0); - if (error != 0) - error = do_setresgid(l, -1, gid, -1, ID_E_EQ_R | ID_E_EQ_S ); - return error; -} - -/* - * OSF/1 defines _POSIX_SAVED_IDS, which means that our normal - * setuid() won't work. - * - * Instead, by P1003.1b-1993, setuid() is supposed to work like: - * If the process has appropriate [super-user] privileges, the - * setuid() function sets the real user ID, effective user - * ID, and the saved set-user-ID to uid. - * If the process does not have appropriate privileges, but uid - * is equal to the real user ID or the saved set-user-ID, the - * setuid() function sets the effective user ID to uid; the - * real user ID and saved set-user-ID remain unchanged by - * this function call. - */ -int -osf1_sys_setuid(struct lwp *l, const struct osf1_sys_setuid_args *uap, register_t *retval) -{ - uid_t uid = SCARG(uap, uid); - int error; - - error = do_setresuid(l, uid, uid, uid, 0); - if (error != 0) - error = do_setresuid(l, -1, uid, -1, ID_E_EQ_R | ID_E_EQ_S ); - return error; -} diff --git a/sys/compat/osf1/osf1_resource.c b/sys/compat/osf1/osf1_resource.c deleted file mode 100644 index c3aa4a869087..000000000000 --- a/sys/compat/osf1/osf1_resource.c +++ /dev/null @@ -1,158 +0,0 @@ -/* $NetBSD: osf1_resource.c,v 1.15 2012/11/03 23:22:22 njoly Exp $ */ - -/* - * Copyright (c) 1999 Christopher G. Demetriou. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Christopher G. Demetriou - * for the NetBSD Project. - * 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 -__KERNEL_RCSID(0, "$NetBSD: osf1_resource.c,v 1.15 2012/11/03 23:22:22 njoly Exp $"); - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -int -osf1_sys_getrlimit(struct lwp *l, const struct osf1_sys_getrlimit_args *uap, register_t *retval) -{ - struct sys_getrlimit_args a; - - switch (SCARG(uap, which)) { - case OSF1_RLIMIT_CPU: - SCARG(&a, which) = RLIMIT_CPU; - break; - case OSF1_RLIMIT_FSIZE: - SCARG(&a, which) = RLIMIT_FSIZE; - break; - case OSF1_RLIMIT_DATA: - SCARG(&a, which) = RLIMIT_DATA; - break; - case OSF1_RLIMIT_STACK: - SCARG(&a, which) = RLIMIT_STACK; - break; - case OSF1_RLIMIT_CORE: - SCARG(&a, which) = RLIMIT_CORE; - break; - case OSF1_RLIMIT_RSS: - SCARG(&a, which) = RLIMIT_RSS; - break; - case OSF1_RLIMIT_NOFILE: - SCARG(&a, which) = RLIMIT_NOFILE; - break; - case OSF1_RLIMIT_AS: - SCARG(&a, which) = RLIMIT_AS; - break; - default: - return (EINVAL); - } - - /* XXX should translate */ - SCARG(&a, rlp) = SCARG(uap, rlp); - - return sys_getrlimit(l, &a, retval); -} - -int -osf1_sys_getrusage(struct lwp *l, const struct osf1_sys_getrusage_args *uap, register_t *retval) -{ - int error, who; - struct osf1_rusage osf1_rusage; - struct rusage ru; - struct proc *p = l->l_proc; - - - switch (SCARG(uap, who)) { - case OSF1_RUSAGE_SELF: - who = RUSAGE_SELF; - break; - - case OSF1_RUSAGE_CHILDREN: - who = RUSAGE_CHILDREN; - break; - - case OSF1_RUSAGE_THREAD: /* XXX not supported */ - default: - return EINVAL; - } - - error = getrusage1(p, who, &ru); - if (error != 0) - return error; - - osf1_cvt_rusage_from_native(&ru, &osf1_rusage); - - return copyout(&osf1_rusage, SCARG(uap, rusage), sizeof osf1_rusage); -} - -int -osf1_sys_setrlimit(struct lwp *l, const struct osf1_sys_setrlimit_args *uap, register_t *retval) -{ - struct sys_setrlimit_args a; - - switch (SCARG(uap, which)) { - case OSF1_RLIMIT_CPU: - SCARG(&a, which) = RLIMIT_CPU; - break; - case OSF1_RLIMIT_FSIZE: - SCARG(&a, which) = RLIMIT_FSIZE; - break; - case OSF1_RLIMIT_DATA: - SCARG(&a, which) = RLIMIT_DATA; - break; - case OSF1_RLIMIT_STACK: - SCARG(&a, which) = RLIMIT_STACK; - break; - case OSF1_RLIMIT_CORE: - SCARG(&a, which) = RLIMIT_CORE; - break; - case OSF1_RLIMIT_RSS: - SCARG(&a, which) = RLIMIT_RSS; - break; - case OSF1_RLIMIT_NOFILE: - SCARG(&a, which) = RLIMIT_NOFILE; - break; - case OSF1_RLIMIT_AS: - SCARG(&a, which) = RLIMIT_AS; - break; - default: - return (EINVAL); - } - - /* XXX should translate */ - SCARG(&a, rlp) = SCARG(uap, rlp); - - return sys_setrlimit(l, &a, retval); -} diff --git a/sys/compat/osf1/osf1_signal.c b/sys/compat/osf1/osf1_signal.c deleted file mode 100644 index 373b4649aa20..000000000000 --- a/sys/compat/osf1/osf1_signal.c +++ /dev/null @@ -1,299 +0,0 @@ -/* $NetBSD: osf1_signal.c,v 1.36 2010/04/23 15:19:21 rmind Exp $ */ - -/* - * Copyright (c) 1999 Christopher G. Demetriou. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Christopher G. Demetriou - * for the NetBSD Project. - * 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 -__KERNEL_RCSID(0, "$NetBSD: osf1_signal.c,v 1.36 2010/04/23 15:19:21 rmind Exp $"); - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#include -#include -#include -#include -#include -#include - -#if 0 -int -osf1_sys_kill(struct lwp *l, const struct osf1_sys_kill_args *uap, register_t *retval) -{ - struct sys_kill_args ka; - - if (SCARG(uap, signum) < 0 || SCARG(uap, signum) > OSF1_NSIG) - return EINVAL; - SCARG(&ka, pid) = SCARG(uap, pid); - SCARG(&ka, signum) = osf1_to_native_signo[SCARG(uap, signum)]; - return sys_kill(l, &ka, retval); -} -#endif - -int -osf1_sys_sigaction(struct lwp *l, const struct osf1_sys_sigaction_args *uap, register_t *retval) -{ - struct osf1_sigaction *nosa, *oosa, tmposa; - struct sigaction nbsa, obsa; - int error; - - if (SCARG(uap, signum) < 0 || SCARG(uap, signum) > OSF1_NSIG) - return EINVAL; - nosa = SCARG(uap, nsa); - oosa = SCARG(uap, osa); - - if (nosa != NULL) { - if ((error = copyin(nosa, &tmposa, sizeof(tmposa))) != 0) - return error; - osf1_cvt_sigaction_to_native(&tmposa, &nbsa); - } - - if ((error = sigaction1(l, - osf1_to_native_signo[SCARG(uap, signum)], - (nosa ? &nbsa : NULL), - (oosa ? &obsa : NULL), - NULL, 0)) != 0) - return error; - - if (oosa != NULL) { - osf1_cvt_sigaction_from_native(&obsa, &tmposa); - if ((error = copyout(&tmposa, oosa, sizeof(tmposa))) != 0) - return error; - } - - return 0; -} - -int -osf1_sys_sigaltstack(struct lwp *l, const struct osf1_sys_sigaltstack_args *uap, register_t *retval) -{ - /* We silently ignore OSF1_SS_NOMASK and OSF1_SS_UCONTEXT */ - compat_sigaltstack(uap, osf1_sigaltstack, - OSF1_SS_ONSTACK, OSF1_SS_DISABLE); -} - -#if 0 -int -osf1_sys_signal(struct lwp *l, const struct osf1_sys_signal_args *uap, register_t *retval) -{ - struct proc *p = l->l_proc; - int signum; - int error; - - if (SCARG(uap, signum) < 0 || SCARG(uap, signum) > OSF1_NSIG) - return EINVAL; - signum = osf1_to_native_signo[OSF1_SIGNO(SCARG(uap, signum))]; - if (signum <= 0 || signum >= OSF1_NSIG) { - if (OSF1_SIGCALL(SCARG(uap, signum)) == OSF1_SIGNAL_MASK || - OSF1_SIGCALL(SCARG(uap, signum)) == OSF1_SIGDEFER_MASK) - *retval = (int)OSF1_SIG_ERR; - return EINVAL; - } - - switch (OSF1_SIGCALL(SCARG(uap, signum))) { - case OSF1_SIGDEFER_MASK: - /* - * sigset is identical to signal() except - * that SIG_HOLD is allowed as - * an action. - */ - if (SCARG(uap, handler) == OSF1_SIG_HOLD) { - struct sys_sigprocmask_args sa; - - SCARG(&sa, how) = SIG_BLOCK; - SCARG(&sa, mask) = sigmask(signum); - return sys_sigprocmask(l, &sa, retval); - } - /* FALLTHROUGH */ - - case OSF1_SIGNAL_MASK: - { - struct sys_sigaction_args sa_args; - struct sigaction nbsa, obsa; - - nbsa.sa_handler = SCARG(uap, handler); - sigemptyset(&nbsa.sa_mask); - nbsa.sa_flags = 0; -#if 0 - if (signum != SIGALRM) - nbsa.sa_flags = SA_RESTART; -#endif - error = sigaction1(l, signum, &nbsa, &obsa, ?, ?); - if (error != 0) { - DPRINTF(("signal: sigaction failed: %d\n", - error)); - *retval = (int)OSF1_SIG_ERR; - return error; - } - *retval = (int)obsa.sa_handler; - return 0; - } - - case OSF1_SIGHOLD_MASK: - { - struct sys_sigprocmask_args sa; - - SCARG(&sa, how) = SIG_BLOCK; - SCARG(&sa, mask) = sigmask(signum); - return sys_sigprocmask(l, &sa, retval); - } - - case OSF1_SIGRELSE_MASK: - { - struct sys_sigprocmask_args sa; - - SCARG(&sa, how) = SIG_UNBLOCK; - SCARG(&sa, mask) = sigmask(signum); - return sys_sigprocmask(l, &sa, retval); - } - - case OSF1_SIGIGNORE_MASK: - { - struct sys_sigaction_args sa_args; - struct sigaction bsa; - - bsa.sa_handler = SIG_IGN; - sigemptyset(&bsa.sa_mask); - bsa.sa_flags = 0; - if ((error = sigaction1(l, &bsa, NULL, ?, ?)) != 0) { - DPRINTF(("sigignore: sigaction failed\n")); - return error; - } - return 0; - } - - case OSF1_SIGPAUSE_MASK: - { - struct sys_sigsuspend_args sa; - - SCARG(&sa, mask) = p->p_sigmask & ~sigmask(signum); - return sys_sigsuspend(l, &sa, retval); - } - - default: - return ENOSYS; - } -} - -int -osf1_sys_sigpending(struct lwp *l, const struct osf1_sys_sigpending_args *uap, register_t *retval) -{ - struct proc *p = l->l_proc; - sigset_t bss; - osf1_sigset_t oss; - - bss = p->p_siglist & p->p_sigmask; - osf1_cvt_sigset_from_native(&bss, &oss); - - return copyout(&oss, SCARG(uap, mask), sizeof(oss)); -} - -int -osf1_sys_sigprocmask(struct lwp *l, const struct osf1_sys_sigprocmask_args *uap, register_t *retval) -{ - struct proc *p = l->l_proc; - osf1_sigset_t oss; - sigset_t bss; - int error = 0; - - if (SCARG(uap, oset) != NULL) { - /* Fix the return value first if needed */ - osf1_cvt_sigset_from_native(&p->p_sigmask, &oss); - if ((error = copyout(&oss, SCARG(uap, oset), sizeof(oss))) != 0) - return error; - } - - if (SCARG(uap, set) == NULL) - /* Just examine */ - return 0; - - if ((error = copyin(SCARG(uap, set), &oss, sizeof(oss))) != 0) - return error; - - osf1_cvt_sigset_to_native(&oss, &bss); - - mutex_enter(p->p_lock); - - switch (SCARG(uap, how)) { - case OSF1_SIG_BLOCK: - *l->l_sigmask |= bss & ~sigcantmask; - break; - - case OSF1_SIG_UNBLOCK: - *l->l_sigmask &= ~bss; - lwp_lock(l); - l->l_flag |= LW_PENDSIG; - lwp_unlock(l); - break; - - case OSF1_SIG_SETMASK: - *l->l_sigmask = bss & ~sigcantmask; - lwp_lock(l); - l->l_flag |= LW_PENDSIG; - lwp_unlock(l); - break; - - default: - error = EINVAL; - break; - } - - mutex_exit(p->p_lock); - - return error; -} - -int -osf1_sys_sigsuspend(struct lwp *l, const struct osf1_sys_sigsuspend_args *uap, register_t *retval) -{ - osf1_sigset_t oss; - sigset_t bss; - struct sys_sigsuspend_args sa; - int error; - - if ((error = copyin(SCARG(uap, ss), &oss, sizeof(oss))) != 0) - return error; - - osf1_cvt_sigset_to_native(&oss, &bss); - - SCARG(&sa, mask) = bss; - return sys_sigsuspend(l, &sa, retval); -} -#endif diff --git a/sys/compat/osf1/osf1_signal.h b/sys/compat/osf1/osf1_signal.h deleted file mode 100644 index 404c5d3b4609..000000000000 --- a/sys/compat/osf1/osf1_signal.h +++ /dev/null @@ -1,50 +0,0 @@ -/* $NetBSD: osf1_signal.h,v 1.6 1999/05/05 01:51:36 cgd Exp $ */ - -/* XXX OUT OF DATE, some of the non-signal number bits here don't belong */ - -#ifndef _OSF1_SIGNAL_H -#define _OSF1_SIGNAL_H - -#define OSF1_SIGHUP 1 -#define OSF1_SIGINT 2 -#define OSF1_SIGQUIT 3 -#define OSF1_SIGILL 4 -#define OSF1_SIGTRAP 5 -#define OSF1_SIGABRT 6 -#define OSF1_SIGEMT 7 -#define OSF1_SIGFPE 8 -#define OSF1_SIGKILL 9 -#define OSF1_SIGBUS 10 -#define OSF1_SIGSEGV 11 -#define OSF1_SIGSYS 12 -#define OSF1_SIGPIPE 13 -#define OSF1_SIGALRM 14 -#define OSF1_SIGTERM 15 -#define OSF1_SIGURG 16 -#define OSF1_SIGSTOP 17 -#define OSF1_SIGTSTP 18 -#define OSF1_SIGCONT 19 -#define OSF1_SIGCHLD 20 -#define OSF1_SIGTTIN 21 -#define OSF1_SIGTTOU 22 -#define OSF1_SIGIO 23 -#define OSF1_SIGXCPU 24 -#define OSF1_SIGXFSZ 25 -#define OSF1_SIGVTALRM 26 -#define OSF1_SIGPROF 27 -#define OSF1_SIGWINCH 28 -#define OSF1_SIGINFO 29 -#define OSF1_SIGUSR1 30 -#define OSF1_SIGUSR2 31 -#define OSF1_NSIG 32 - -#define OSF1_SIG_DFL (void(*)())0 -#define OSF1_SIG_ERR (void(*)())-1 -#define OSF1_SIG_IGN (void(*)())1 -#define OSF1_SIG_HOLD (void(*)())2 - -#define OSF1_SIG_BLOCK 1 -#define OSF1_SIG_UNBLOCK 2 -#define OSF1_SIG_SETMASK 3 - -#endif /* !_OSF1_SIGNAL_H */ diff --git a/sys/compat/osf1/osf1_signo.c b/sys/compat/osf1/osf1_signo.c deleted file mode 100644 index db9d0497ee72..000000000000 --- a/sys/compat/osf1/osf1_signo.c +++ /dev/null @@ -1,116 +0,0 @@ -/* $NetBSD: osf1_signo.c,v 1.2 2013/01/02 18:48:22 dsl Exp $ */ - -/* - * Copyright (c) 1999 Christopher G. Demetriou. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Christopher G. Demetriou - * for the NetBSD Project. - * 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 -__KERNEL_RCSID(0, "$NetBSD: osf1_signo.c,v 1.2 2013/01/02 18:48:22 dsl Exp $"); - -#include -#include - -#include - -/* - * These tables are used to translate between NetBSD and OSF/1 signal - * numbers. - * - * XXX IT IS NOT UP TO DATE. - */ - -const int native_to_osf1_signo[] = { - 0, - OSF1_SIGHUP, - OSF1_SIGINT, - OSF1_SIGQUIT, - OSF1_SIGILL, - OSF1_SIGTRAP, - OSF1_SIGABRT, - OSF1_SIGEMT, - OSF1_SIGFPE, - OSF1_SIGKILL, - OSF1_SIGBUS, - OSF1_SIGSEGV, - OSF1_SIGSYS, - OSF1_SIGPIPE, - OSF1_SIGALRM, - OSF1_SIGTERM, - OSF1_SIGURG, - OSF1_SIGSTOP, - OSF1_SIGTSTP, - OSF1_SIGCONT, - OSF1_SIGCHLD, - OSF1_SIGTTIN, - OSF1_SIGTTOU, - OSF1_SIGIO, - OSF1_SIGXCPU, - OSF1_SIGXFSZ, - OSF1_SIGVTALRM, - OSF1_SIGPROF, - OSF1_SIGWINCH, - OSF1_SIGINFO, - OSF1_SIGUSR1, - OSF1_SIGUSR2, -}; - -const int osf1_to_native_signo[] = { - 0, - SIGHUP, - SIGINT, - SIGQUIT, - SIGILL, - SIGTRAP, - SIGABRT, - SIGEMT, - SIGFPE, - SIGKILL, - SIGBUS, - SIGSEGV, - SIGSYS, - SIGPIPE, - SIGALRM, - SIGTERM, - SIGURG, - SIGSTOP, - SIGTSTP, - SIGCONT, - SIGCHLD, - SIGTTIN, - SIGTTOU, - SIGIO, - SIGXCPU, - SIGXFSZ, - SIGVTALRM, - SIGPROF, - SIGWINCH, - SIGINFO, - SIGUSR1, - SIGUSR2, -}; diff --git a/sys/compat/osf1/osf1_socket.c b/sys/compat/osf1/osf1_socket.c deleted file mode 100644 index 0d27138398a9..000000000000 --- a/sys/compat/osf1/osf1_socket.c +++ /dev/null @@ -1,193 +0,0 @@ -/* $NetBSD: osf1_socket.c,v 1.23 2018/05/05 02:09:40 christos Exp $ */ - -/* - * Copyright (c) 1999 Christopher G. Demetriou. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Christopher G. Demetriou - * for the NetBSD Project. - * 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. - */ - -/* - * Copyright (c) 1994, 1995 Carnegie-Mellon University. - * All rights reserved. - * - * Author: Chris G. Demetriou - * - * Permission to use, copy, modify and distribute this software and - * its documentation is hereby granted, provided that both the copyright - * notice and this permission notice appear in all copies of the - * software, derivative works or modified versions, and any portions - * thereof, and that both notices appear in supporting documentation. - * - * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" - * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND - * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. - * - * Carnegie Mellon requests users of this software to return to - * - * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU - * School of Computer Science - * Carnegie Mellon University - * Pittsburgh PA 15213-3890 - * - * any improvements or extensions that they make and grant Carnegie the - * rights to redistribute these changes. - */ - -#include -__KERNEL_RCSID(0, "$NetBSD: osf1_socket.c,v 1.23 2018/05/05 02:09:40 christos Exp $"); - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -int -osf1_sys_recvmsg_xopen(struct lwp *l, const struct osf1_sys_recvmsg_xopen_args *uap, register_t *retval) -{ - - /* XXX */ - return (EINVAL); -} - -int -osf1_sys_sendmsg_xopen(struct lwp *l, const struct osf1_sys_sendmsg_xopen_args *uap, register_t *retval) -{ - struct osf1_msghdr_xopen osf_msghdr; - struct osf1_iovec_xopen osf_iovec, *osf_iovec_ptr; - struct msghdr bsd_msghdr; - struct iovec *bsd_iovec; - unsigned long leftovers; - int flags; - unsigned int i, iov_len; - int error; - - /* - * translate msghdr structure - */ - if ((error = copyin(SCARG(uap, msg), &osf_msghdr, - sizeof osf_msghdr)) != 0) - return (error); - - error = osf1_cvt_msghdr_xopen_to_native(&osf_msghdr, &bsd_msghdr); - if (error != 0) - return (error); - - /* - * translate flags - */ - flags = emul_flags_translate(osf1_sendrecv_msg_flags_xtab, - SCARG(uap, flags), &leftovers); - if (leftovers != 0) - return (EINVAL); - - iov_len = bsd_msghdr.msg_iovlen; - if ((iov_len > IOV_MAX) || (iov_len == 0)) - return EMSGSIZE; - bsd_iovec = kmem_alloc(iov_len * sizeof(struct iovec), KM_SLEEP); - bsd_msghdr.msg_iov = bsd_iovec; - - osf_iovec_ptr = osf_msghdr.msg_iov; - for (i = 0; i < iov_len; i++) { - error = copyin(&osf_iovec_ptr[i], &osf_iovec, sizeof osf_iovec); - if (error != 0) - goto err; - bsd_iovec[i].iov_base = osf_iovec.iov_base; - bsd_iovec[i].iov_len = osf_iovec.iov_len; - } - - error = do_sys_sendmsg(l, SCARG(uap, s), &bsd_msghdr, flags, retval); -err: - kmem_free(bsd_iovec, iov_len * sizeof(struct iovec)); - return error; -} - -int -osf1_sys_sendto(struct lwp *l, const struct osf1_sys_sendto_args *uap, register_t *retval) -{ - struct sys_sendto_args a; - unsigned long leftovers; - - SCARG(&a, s) = SCARG(uap, s); - SCARG(&a, buf) = SCARG(uap, buf); - SCARG(&a, len) = SCARG(uap, len); - SCARG(&a, to) = SCARG(uap, to); - SCARG(&a, tolen) = SCARG(uap, tolen); - - /* translate flags */ - SCARG(&a, flags) = emul_flags_translate(osf1_sendrecv_msg_flags_xtab, - SCARG(uap, flags), &leftovers); - if (leftovers != 0) - return (EINVAL); - - return sys_sendto(l, &a, retval); -} - -int -osf1_sys_socket(struct lwp *l, const struct osf1_sys_socket_args *uap, register_t *retval) -{ - struct compat_30_sys_socket_args a; - - /* XXX TRANSLATE */ - - if (SCARG(uap, domain) > AF_LINK) - return (EINVAL); /* XXX After AF_LINK, divergence. */ - - SCARG(&a, domain) = SCARG(uap, domain); - SCARG(&a, type) = SCARG(uap, type); - SCARG(&a, protocol) = SCARG(uap, protocol); - - return compat_30_sys_socket(l, &a, retval); -} - -int -osf1_sys_socketpair(struct lwp *l, const struct osf1_sys_socketpair_args *uap, register_t *retval) -{ - struct sys_socketpair_args a; - - /* XXX TRANSLATE */ - - if (SCARG(uap, domain) > AF_LINK) - return (EINVAL); /* XXX After AF_LINK, divergence. */ - - SCARG(&a, domain) = SCARG(uap, domain); - SCARG(&a, type) = SCARG(uap, type); - SCARG(&a, protocol) = SCARG(uap, protocol); - SCARG(&a, rsv) = SCARG(uap, rsv); - - return sys_socketpair(l, &a, retval); -} diff --git a/sys/compat/osf1/osf1_syscall.h b/sys/compat/osf1/osf1_syscall.h deleted file mode 100644 index 6532c9ddf2c0..000000000000 --- a/sys/compat/osf1/osf1_syscall.h +++ /dev/null @@ -1,428 +0,0 @@ -/* $NetBSD: osf1_syscall.h,v 1.67 2018/08/10 21:47:15 pgoyette Exp $ */ - -/* - * System call numbers. - * - * DO NOT EDIT-- this file is automatically generated. - * created from NetBSD: syscalls.master,v 1.49 2013/11/07 19:37:19 njoly Exp - */ - -#ifndef _OSF1_SYS_SYSCALL_H_ -#define _OSF1_SYS_SYSCALL_H_ - -#define OSF1_SYS_MAXSYSARGS 8 - -/* syscall: "syscall" ret: "int" args: */ -#define OSF1_SYS_syscall 0 - -/* syscall: "exit" ret: "int" args: "int" */ -#define OSF1_SYS_exit 1 - -/* syscall: "fork" ret: "int" args: */ -#define OSF1_SYS_fork 2 - -/* syscall: "read" ret: "int" args: "int" "char *" "u_int" */ -#define OSF1_SYS_read 3 - -/* syscall: "write" ret: "int" args: "int" "const char *" "u_int" */ -#define OSF1_SYS_write 4 - -/* syscall: "close" ret: "int" args: "int" */ -#define OSF1_SYS_close 6 - -/* syscall: "wait4" ret: "int" args: "int" "int *" "int" "struct osf1_rusage *" */ -#define OSF1_SYS_wait4 7 - -/* syscall: "link" ret: "int" args: "const char *" "const char *" */ -#define OSF1_SYS_link 9 - -/* syscall: "unlink" ret: "int" args: "const char *" */ -#define OSF1_SYS_unlink 10 - -/* syscall: "chdir" ret: "int" args: "const char *" */ -#define OSF1_SYS_chdir 12 - -/* syscall: "fchdir" ret: "int" args: "int" */ -#define OSF1_SYS_fchdir 13 - -/* syscall: "mknod" ret: "int" args: "const char *" "int" "int" */ -#define OSF1_SYS_mknod 14 - -/* syscall: "chmod" ret: "int" args: "const char *" "int" */ -#define OSF1_SYS_chmod 15 - -/* syscall: "__posix_chown" ret: "int" args: "const char *" "int" "int" */ -#define OSF1_SYS___posix_chown 16 - -/* syscall: "obreak" ret: "int" args: "char *" */ -#define OSF1_SYS_obreak 17 - -/* syscall: "getfsstat" ret: "int" args: "struct osf1_statfs *" "long" "int" */ -#define OSF1_SYS_getfsstat 18 - -/* syscall: "lseek" ret: "off_t" args: "int" "off_t" "int" */ -#define OSF1_SYS_lseek 19 - -/* syscall: "getpid_with_ppid" ret: "pid_t" args: */ -#define OSF1_SYS_getpid_with_ppid 20 - -/* syscall: "mount" ret: "int" args: "int" "const char *" "int" "void *" */ -#define OSF1_SYS_mount 21 - -/* syscall: "unmount" ret: "int" args: "const char *" "int" */ -#define OSF1_SYS_unmount 22 - -/* syscall: "setuid" ret: "int" args: "uid_t" */ -#define OSF1_SYS_setuid 23 - -/* syscall: "getuid_with_euid" ret: "uid_t" args: */ -#define OSF1_SYS_getuid_with_euid 24 - -/* syscall: "recvmsg_xopen" ret: "int" args: "int" "struct osf1_msghdr_xopen *" "int" */ -#define OSF1_SYS_recvmsg_xopen 27 - -/* syscall: "sendmsg_xopen" ret: "int" args: "int" "const struct osf1_msghdr_xopen *" "int" */ -#define OSF1_SYS_sendmsg_xopen 28 - -/* syscall: "access" ret: "int" args: "const char *" "int" */ -#define OSF1_SYS_access 33 - -/* syscall: "sync" ret: "int" args: */ -#define OSF1_SYS_sync 36 - -/* syscall: "kill" ret: "int" args: "int" "int" */ -#define OSF1_SYS_kill 37 - -/* syscall: "setpgid" ret: "int" args: "int" "int" */ -#define OSF1_SYS_setpgid 39 - -/* syscall: "dup" ret: "int" args: "int" */ -#define OSF1_SYS_dup 41 - -/* syscall: "pipe" ret: "int" args: */ -#define OSF1_SYS_pipe 42 - -/* syscall: "set_program_attributes" ret: "int" args: "void *" "unsigned long" "void *" "unsigned long" */ -#define OSF1_SYS_set_program_attributes 43 - -/* syscall: "open" ret: "int" args: "const char *" "int" "int" */ -#define OSF1_SYS_open 45 - - /* 46 is obsolete sigaction */ -/* syscall: "getgid_with_egid" ret: "gid_t" args: */ -#define OSF1_SYS_getgid_with_egid 47 - -/* syscall: "sigprocmask" ret: "int" args: "int" "sigset13_t" */ -#define OSF1_SYS_sigprocmask 48 - -/* syscall: "__getlogin" ret: "int" args: "char *" "u_int" */ -#define OSF1_SYS___getlogin 49 - -/* syscall: "__setlogin" ret: "int" args: "const char *" */ -#define OSF1_SYS___setlogin 50 - -/* syscall: "acct" ret: "int" args: "const char *" */ -#define OSF1_SYS_acct 51 - -/* syscall: "classcntl" ret: "int" args: "int" "int" "int" "int" */ -#define OSF1_SYS_classcntl 53 - -/* syscall: "ioctl" ret: "int" args: "int" "int" "void *" */ -#define OSF1_SYS_ioctl 54 - -/* syscall: "reboot" ret: "int" args: "int" */ -#define OSF1_SYS_reboot 55 - -/* syscall: "revoke" ret: "int" args: "const char *" */ -#define OSF1_SYS_revoke 56 - -/* syscall: "symlink" ret: "int" args: "const char *" "const char *" */ -#define OSF1_SYS_symlink 57 - -/* syscall: "readlink" ret: "int" args: "const char *" "char *" "int" */ -#define OSF1_SYS_readlink 58 - -/* syscall: "execve" ret: "int" args: "const char *" "char *const *" "char *const *" */ -#define OSF1_SYS_execve 59 - -/* syscall: "umask" ret: "int" args: "int" */ -#define OSF1_SYS_umask 60 - -/* syscall: "chroot" ret: "int" args: "const char *" */ -#define OSF1_SYS_chroot 61 - -/* syscall: "getpgrp" ret: "int" args: */ -#define OSF1_SYS_getpgrp 63 - -/* syscall: "getpagesize" ret: "int" args: */ -#define OSF1_SYS_getpagesize 64 - -/* syscall: "vfork" ret: "int" args: */ -#define OSF1_SYS_vfork 66 - -/* syscall: "stat" ret: "int" args: "const char *" "struct osf1_stat *" */ -#define OSF1_SYS_stat 67 - -/* syscall: "lstat" ret: "int" args: "const char *" "struct osf1_stat *" */ -#define OSF1_SYS_lstat 68 - -/* syscall: "mmap" ret: "void *" args: "void *" "size_t" "int" "int" "int" "off_t" */ -#define OSF1_SYS_mmap 71 - -/* syscall: "munmap" ret: "int" args: "void *" "size_t" */ -#define OSF1_SYS_munmap 73 - -/* syscall: "mprotect" ret: "int" args: "void *" "size_t" "int" */ -#define OSF1_SYS_mprotect 74 - -/* syscall: "madvise" ret: "int" args: "void *" "size_t" "int" */ -#define OSF1_SYS_madvise 75 - -/* syscall: "getgroups" ret: "int" args: "u_int" "gid_t *" */ -#define OSF1_SYS_getgroups 79 - -/* syscall: "setgroups" ret: "int" args: "u_int" "gid_t *" */ -#define OSF1_SYS_setgroups 80 - -/* syscall: "setpgrp" ret: "int" args: "int" "int" */ -#define OSF1_SYS_setpgrp 82 - -/* syscall: "setitimer" ret: "int" args: "u_int" "struct osf1_itimerval *" "struct osf1_itimerval *" */ -#define OSF1_SYS_setitimer 83 - -/* syscall: "getitimer" ret: "int" args: "u_int" "struct osf1_itimerval *" */ -#define OSF1_SYS_getitimer 86 - -/* syscall: "gethostname" ret: "int" args: "char *" "u_int" */ -#define OSF1_SYS_gethostname 87 - -/* syscall: "sethostname" ret: "int" args: "const char *" "u_int" */ -#define OSF1_SYS_sethostname 88 - -/* syscall: "getdtablesize" ret: "int" args: */ -#define OSF1_SYS_getdtablesize 89 - -/* syscall: "dup2" ret: "int" args: "int" "int" */ -#define OSF1_SYS_dup2 90 - -/* syscall: "fstat" ret: "int" args: "int" "void *" */ -#define OSF1_SYS_fstat 91 - -/* syscall: "fcntl" ret: "int" args: "int" "int" "void *" */ -#define OSF1_SYS_fcntl 92 - -/* syscall: "select" ret: "int" args: "u_int" "fd_set *" "fd_set *" "fd_set *" "struct osf1_timeval *" */ -#define OSF1_SYS_select 93 - -/* syscall: "poll" ret: "int" args: "struct pollfd *" "u_int" "int" */ -#define OSF1_SYS_poll 94 - -/* syscall: "fsync" ret: "int" args: "int" */ -#define OSF1_SYS_fsync 95 - -/* syscall: "setpriority" ret: "int" args: "int" "int" "int" */ -#define OSF1_SYS_setpriority 96 - -/* syscall: "socket" ret: "int" args: "int" "int" "int" */ -#define OSF1_SYS_socket 97 - -/* syscall: "connect" ret: "int" args: "int" "void *" "int" */ -#define OSF1_SYS_connect 98 - -/* syscall: "accept" ret: "int" args: "int" "void *" "int *" */ -#define OSF1_SYS_accept 99 - -/* syscall: "getpriority" ret: "int" args: "int" "int" */ -#define OSF1_SYS_getpriority 100 - -/* syscall: "send" ret: "int" args: "int" "void *" "int" "int" */ -#define OSF1_SYS_send 101 - -/* syscall: "recv" ret: "int" args: "int" "void *" "int" "int" */ -#define OSF1_SYS_recv 102 - -/* syscall: "sigreturn" ret: "int" args: "struct sigcontext13 *" */ -#define OSF1_SYS_sigreturn 103 - -/* syscall: "bind" ret: "int" args: "int" "void *" "int" */ -#define OSF1_SYS_bind 104 - -/* syscall: "setsockopt" ret: "int" args: "int" "int" "int" "void *" "int" */ -#define OSF1_SYS_setsockopt 105 - -/* syscall: "listen" ret: "int" args: "int" "int" */ -#define OSF1_SYS_listen 106 - -/* syscall: "sigsuspend" ret: "int" args: "int" */ -#define OSF1_SYS_sigsuspend 111 - -/* syscall: "sigstack" ret: "int" args: "struct sigstack *" "struct sigstack *" */ -#define OSF1_SYS_sigstack 112 - - /* 115 is obsolete vtrace */ -/* syscall: "gettimeofday" ret: "int" args: "struct osf1_timeval *" "struct osf1_timezone *" */ -#define OSF1_SYS_gettimeofday 116 - -/* syscall: "getrusage" ret: "int" args: "int" "struct osf1_rusage *" */ -#define OSF1_SYS_getrusage 117 - -/* syscall: "getsockopt" ret: "int" args: "int" "int" "int" "void *" "int *" */ -#define OSF1_SYS_getsockopt 118 - -/* syscall: "readv" ret: "int" args: "int" "struct osf1_iovec *" "u_int" */ -#define OSF1_SYS_readv 120 - -/* syscall: "writev" ret: "int" args: "int" "struct osf1_iovec *" "u_int" */ -#define OSF1_SYS_writev 121 - -/* syscall: "settimeofday" ret: "int" args: "struct osf1_timeval *" "struct osf1_timezone *" */ -#define OSF1_SYS_settimeofday 122 - -/* syscall: "__posix_fchown" ret: "int" args: "int" "int" "int" */ -#define OSF1_SYS___posix_fchown 123 - -/* syscall: "fchmod" ret: "int" args: "int" "int" */ -#define OSF1_SYS_fchmod 124 - -/* syscall: "recvfrom" ret: "int" args: "int" "void *" "size_t" "int" "void *" "int *" */ -#define OSF1_SYS_recvfrom 125 - -/* syscall: "setreuid" ret: "int" args: "uid_t" "uid_t" */ -#define OSF1_SYS_setreuid 126 - -/* syscall: "setregid" ret: "int" args: "gid_t" "gid_t" */ -#define OSF1_SYS_setregid 127 - -/* syscall: "__posix_rename" ret: "int" args: "const char *" "const char *" */ -#define OSF1_SYS___posix_rename 128 - -/* syscall: "truncate" ret: "int" args: "const char *" "off_t" */ -#define OSF1_SYS_truncate 129 - -/* syscall: "ftruncate" ret: "int" args: "int" "off_t" */ -#define OSF1_SYS_ftruncate 130 - -/* syscall: "flock" ret: "int" args: "int" "int" */ -#define OSF1_SYS_flock 131 - -/* syscall: "setgid" ret: "int" args: "gid_t" */ -#define OSF1_SYS_setgid 132 - -/* syscall: "sendto" ret: "int" args: "int" "void *" "size_t" "int" "struct sockaddr *" "int" */ -#define OSF1_SYS_sendto 133 - -/* syscall: "shutdown" ret: "int" args: "int" "int" */ -#define OSF1_SYS_shutdown 134 - -/* syscall: "socketpair" ret: "int" args: "int" "int" "int" "int *" */ -#define OSF1_SYS_socketpair 135 - -/* syscall: "mkdir" ret: "int" args: "const char *" "int" */ -#define OSF1_SYS_mkdir 136 - -/* syscall: "rmdir" ret: "int" args: "const char *" */ -#define OSF1_SYS_rmdir 137 - -/* syscall: "utimes" ret: "int" args: "const char *" "const struct osf1_timeval *" */ -#define OSF1_SYS_utimes 138 - - /* 139 is obsolete 4.2 sigreturn */ -/* syscall: "getpeername" ret: "int" args: "int" "void *" "int *" */ -#define OSF1_SYS_getpeername 141 - -/* syscall: "gethostid" ret: "int32_t" args: */ -#define OSF1_SYS_gethostid 142 - -/* syscall: "sethostid" ret: "int" args: "int32_t" */ -#define OSF1_SYS_sethostid 143 - -/* syscall: "getrlimit" ret: "int" args: "u_int" "struct rlimit *" */ -#define OSF1_SYS_getrlimit 144 - -/* syscall: "setrlimit" ret: "int" args: "u_int" "struct rlimit *" */ -#define OSF1_SYS_setrlimit 145 - -/* syscall: "setsid" ret: "int" args: */ -#define OSF1_SYS_setsid 147 - -/* syscall: "quota" ret: "int" args: */ -#define OSF1_SYS_quota 149 - -/* syscall: "getsockname" ret: "int" args: "int" "void *" "int *" */ -#define OSF1_SYS_getsockname 150 - -/* syscall: "sigaction" ret: "int" args: "int" "struct osf1_sigaction *" "struct osf1_sigaction *" */ -#define OSF1_SYS_sigaction 156 - -/* syscall: "getdirentries" ret: "int" args: "int" "char *" "int" "long *" */ -#define OSF1_SYS_getdirentries 159 - -/* syscall: "statfs" ret: "int" args: "const char *" "struct osf1_statfs *" "int" */ -#define OSF1_SYS_statfs 160 - -/* syscall: "fstatfs" ret: "int" args: "int" "struct osf1_statfs *" "int" */ -#define OSF1_SYS_fstatfs 161 - -/* syscall: "getdomainname" ret: "int" args: "char *" "int" */ -#define OSF1_SYS_getdomainname 165 - -/* syscall: "setdomainname" ret: "int" args: "char *" "int" */ -#define OSF1_SYS_setdomainname 166 - -/* syscall: "uname" ret: "int" args: "struct osf1_uname *" */ -#define OSF1_SYS_uname 207 - -/* syscall: "__posix_lchown" ret: "int" args: "const char *" "int" "int" */ -#define OSF1_SYS___posix_lchown 208 - -/* syscall: "shmat" ret: "void *" args: "int" "const void *" "int" */ -#define OSF1_SYS_shmat 209 - -/* syscall: "shmctl" ret: "int" args: "int" "int" "struct osf1_shmid_ds *" */ -#define OSF1_SYS_shmctl 210 - -/* syscall: "shmdt" ret: "int" args: "const void *" */ -#define OSF1_SYS_shmdt 211 - -/* syscall: "shmget" ret: "int" args: "osf1_key_t" "size_t" "int" */ -#define OSF1_SYS_shmget 212 - -/* syscall: "stat2" ret: "int" args: "const char *" "struct osf1_stat2 *" */ -#define OSF1_SYS_stat2 224 - -/* syscall: "lstat2" ret: "int" args: "const char *" "struct osf1_stat2 *" */ -#define OSF1_SYS_lstat2 225 - -/* syscall: "fstat2" ret: "int" args: "int" "struct osf1_stat2 *" */ -#define OSF1_SYS_fstat2 226 - -/* syscall: "getpgid" ret: "pid_t" args: "pid_t" */ -#define OSF1_SYS_getpgid 233 - -/* syscall: "getsid" ret: "pid_t" args: "pid_t" */ -#define OSF1_SYS_getsid 234 - -/* syscall: "sigaltstack" ret: "int" args: "struct osf1_sigaltstack *" "struct osf1_sigaltstack *" */ -#define OSF1_SYS_sigaltstack 235 - -/* syscall: "sysinfo" ret: "int" args: "int" "char *" "long" */ -#define OSF1_SYS_sysinfo 241 - -/* syscall: "pathconf" ret: "long" args: "const char *" "int" */ -#define OSF1_SYS_pathconf 247 - -/* syscall: "fpathconf" ret: "long" args: "int" "int" */ -#define OSF1_SYS_fpathconf 248 - -/* syscall: "usleep_thread" ret: "int" args: "struct osf1_timeval *" "struct osf1_timeval *" */ -#define OSF1_SYS_usleep_thread 251 - -/* syscall: "getsysinfo" ret: "int" args: "u_long" "void *" "u_long" "void *" "u_long" */ -#define OSF1_SYS_getsysinfo 256 - -/* syscall: "setsysinfo" ret: "int" args: "u_long" "void *" "u_long" "void *" "u_long" */ -#define OSF1_SYS_setsysinfo 257 - -#define OSF1_SYS_MAXSYSCALL 267 -#define OSF1_SYS_NSYSENT 512 -#endif /* _OSF1_SYS_SYSCALL_H_ */ diff --git a/sys/compat/osf1/osf1_syscallargs.h b/sys/compat/osf1/osf1_syscallargs.h deleted file mode 100644 index 504f8850531f..000000000000 --- a/sys/compat/osf1/osf1_syscallargs.h +++ /dev/null @@ -1,837 +0,0 @@ -/* $NetBSD: osf1_syscallargs.h,v 1.68 2018/08/10 21:47:15 pgoyette Exp $ */ - -/* - * System call argument lists. - * - * DO NOT EDIT-- this file is automatically generated. - * created from NetBSD: syscalls.master,v 1.49 2013/11/07 19:37:19 njoly Exp - */ - -#ifndef _OSF1_SYS_SYSCALLARGS_H_ -#define _OSF1_SYS_SYSCALLARGS_H_ - -/* Forward declaration */ -struct lwp; - -#define OSF1_SYS_MAXSYSARGS 8 - -#undef syscallarg -#define syscallarg(x) \ - union { \ - register_t pad; \ - struct { x datum; } le; \ - struct { /* LINTED zero array dimension */ \ - int8_t pad[ /* CONSTCOND */ \ - (sizeof (register_t) < sizeof (x)) \ - ? 0 \ - : sizeof (register_t) - sizeof (x)]; \ - x datum; \ - } be; \ - } - -#undef check_syscall_args -#define check_syscall_args(call) /*LINTED*/ \ - typedef char call##_check_args[sizeof (struct call##_args) \ - <= OSF1_SYS_MAXSYSARGS * sizeof (register_t) ? 1 : -1]; - -struct sys_exit_args; - -struct sys_read_args; - -struct sys_write_args; - -struct sys_close_args; - -struct osf1_sys_wait4_args { - syscallarg(int) pid; - syscallarg(int *) status; - syscallarg(int) options; - syscallarg(struct osf1_rusage *) rusage; -}; -check_syscall_args(osf1_sys_wait4) - -struct sys_link_args; - -struct sys_unlink_args; - -struct sys_chdir_args; - -struct sys_fchdir_args; - -struct osf1_sys_mknod_args { - syscallarg(const char *) path; - syscallarg(int) mode; - syscallarg(int) dev; -}; -check_syscall_args(osf1_sys_mknod) - -struct sys_chmod_args; - -struct sys___posix_chown_args; - -struct sys_obreak_args; - -struct osf1_sys_getfsstat_args { - syscallarg(struct osf1_statfs *) buf; - syscallarg(long) bufsize; - syscallarg(int) flags; -}; -check_syscall_args(osf1_sys_getfsstat) - -struct osf1_sys_lseek_args { - syscallarg(int) fd; - syscallarg(off_t) offset; - syscallarg(int) whence; -}; -check_syscall_args(osf1_sys_lseek) - -struct osf1_sys_mount_args { - syscallarg(int) type; - syscallarg(const char *) path; - syscallarg(int) flags; - syscallarg(void *) data; -}; -check_syscall_args(osf1_sys_mount) - -struct osf1_sys_unmount_args { - syscallarg(const char *) path; - syscallarg(int) flags; -}; -check_syscall_args(osf1_sys_unmount) - -struct osf1_sys_setuid_args { - syscallarg(uid_t) uid; -}; -check_syscall_args(osf1_sys_setuid) - -struct osf1_sys_recvmsg_xopen_args { - syscallarg(int) s; - syscallarg(struct osf1_msghdr_xopen *) msg; - syscallarg(int) flags; -}; -check_syscall_args(osf1_sys_recvmsg_xopen) - -struct osf1_sys_sendmsg_xopen_args { - syscallarg(int) s; - syscallarg(const struct osf1_msghdr_xopen *) msg; - syscallarg(int) flags; -}; -check_syscall_args(osf1_sys_sendmsg_xopen) - -struct osf1_sys_access_args { - syscallarg(const char *) path; - syscallarg(int) flags; -}; -check_syscall_args(osf1_sys_access) - -struct sys_kill_args; - -struct sys_setpgid_args; - -struct sys_dup_args; - -struct osf1_sys_set_program_attributes_args { - syscallarg(void *) taddr; - syscallarg(unsigned long) tsize; - syscallarg(void *) daddr; - syscallarg(unsigned long) dsize; -}; -check_syscall_args(osf1_sys_set_program_attributes) - -struct osf1_sys_open_args { - syscallarg(const char *) path; - syscallarg(int) flags; - syscallarg(int) mode; -}; -check_syscall_args(osf1_sys_open) - -struct compat_13_sys_sigprocmask_args; - -struct sys___getlogin_args; - -struct sys___setlogin_args; - -struct sys_acct_args; - -struct osf1_sys_classcntl_args { - syscallarg(int) opcode; - syscallarg(int) arg1; - syscallarg(int) arg2; - syscallarg(int) arg3; -}; -check_syscall_args(osf1_sys_classcntl) - -struct osf1_sys_ioctl_args { - syscallarg(int) fd; - syscallarg(int) com; - syscallarg(void *) data; -}; -check_syscall_args(osf1_sys_ioctl) - -struct osf1_sys_reboot_args { - syscallarg(int) opt; -}; -check_syscall_args(osf1_sys_reboot) - -struct sys_revoke_args; - -struct sys_symlink_args; - -struct sys_readlink_args; - -struct osf1_sys_execve_args { - syscallarg(const char *) path; - syscallarg(char *const *) argp; - syscallarg(char *const *) envp; -}; -check_syscall_args(osf1_sys_execve) - -struct sys_umask_args; - -struct sys_chroot_args; - -struct osf1_sys_stat_args { - syscallarg(const char *) path; - syscallarg(struct osf1_stat *) ub; -}; -check_syscall_args(osf1_sys_stat) - -struct osf1_sys_lstat_args { - syscallarg(const char *) path; - syscallarg(struct osf1_stat *) ub; -}; -check_syscall_args(osf1_sys_lstat) - -struct osf1_sys_mmap_args { - syscallarg(void *) addr; - syscallarg(size_t) len; - syscallarg(int) prot; - syscallarg(int) flags; - syscallarg(int) fd; - syscallarg(off_t) pos; -}; -check_syscall_args(osf1_sys_mmap) - -struct sys_munmap_args; - -struct osf1_sys_mprotect_args { - syscallarg(void *) addr; - syscallarg(size_t) len; - syscallarg(int) prot; -}; -check_syscall_args(osf1_sys_mprotect) - -struct osf1_sys_madvise_args { - syscallarg(void *) addr; - syscallarg(size_t) len; - syscallarg(int) behav; -}; -check_syscall_args(osf1_sys_madvise) - -struct sys_getgroups_args; - -struct sys_setgroups_args; - -struct sys_setpgid_args; - -struct osf1_sys_setitimer_args { - syscallarg(u_int) which; - syscallarg(struct osf1_itimerval *) itv; - syscallarg(struct osf1_itimerval *) oitv; -}; -check_syscall_args(osf1_sys_setitimer) - -struct osf1_sys_getitimer_args { - syscallarg(u_int) which; - syscallarg(struct osf1_itimerval *) itv; -}; -check_syscall_args(osf1_sys_getitimer) - -struct compat_43_sys_gethostname_args; - -struct compat_43_sys_sethostname_args; - -struct sys_dup2_args; - -struct osf1_sys_fstat_args { - syscallarg(int) fd; - syscallarg(void *) sb; -}; -check_syscall_args(osf1_sys_fstat) - -struct osf1_sys_fcntl_args { - syscallarg(int) fd; - syscallarg(int) cmd; - syscallarg(void *) arg; -}; -check_syscall_args(osf1_sys_fcntl) - -struct osf1_sys_select_args { - syscallarg(u_int) nd; - syscallarg(fd_set *) in; - syscallarg(fd_set *) ou; - syscallarg(fd_set *) ex; - syscallarg(struct osf1_timeval *) tv; -}; -check_syscall_args(osf1_sys_select) - -struct sys_poll_args; - -struct sys_fsync_args; - -struct sys_setpriority_args; - -struct osf1_sys_socket_args { - syscallarg(int) domain; - syscallarg(int) type; - syscallarg(int) protocol; -}; -check_syscall_args(osf1_sys_socket) - -struct sys_connect_args; - -struct compat_43_sys_accept_args; - -struct sys_getpriority_args; - -struct compat_43_sys_send_args; - -struct compat_43_sys_recv_args; - -struct compat_13_sys_sigreturn_args; - -struct sys_bind_args; - -struct sys_setsockopt_args; - -struct sys_listen_args; - -struct compat_13_sys_sigsuspend_args; - -struct compat_43_sys_sigstack_args; - -struct osf1_sys_gettimeofday_args { - syscallarg(struct osf1_timeval *) tp; - syscallarg(struct osf1_timezone *) tzp; -}; -check_syscall_args(osf1_sys_gettimeofday) - -struct osf1_sys_getrusage_args { - syscallarg(int) who; - syscallarg(struct osf1_rusage *) rusage; -}; -check_syscall_args(osf1_sys_getrusage) - -struct sys_getsockopt_args; - -struct osf1_sys_readv_args { - syscallarg(int) fd; - syscallarg(struct osf1_iovec *) iovp; - syscallarg(u_int) iovcnt; -}; -check_syscall_args(osf1_sys_readv) - -struct osf1_sys_writev_args { - syscallarg(int) fd; - syscallarg(struct osf1_iovec *) iovp; - syscallarg(u_int) iovcnt; -}; -check_syscall_args(osf1_sys_writev) - -struct osf1_sys_settimeofday_args { - syscallarg(struct osf1_timeval *) tv; - syscallarg(struct osf1_timezone *) tzp; -}; -check_syscall_args(osf1_sys_settimeofday) - -struct sys___posix_fchown_args; - -struct sys_fchmod_args; - -struct compat_43_sys_recvfrom_args; - -struct sys_setreuid_args; - -struct sys_setregid_args; - -struct sys___posix_rename_args; - -struct osf1_sys_truncate_args { - syscallarg(const char *) path; - syscallarg(off_t) length; -}; -check_syscall_args(osf1_sys_truncate) - -struct osf1_sys_ftruncate_args { - syscallarg(int) fd; - syscallarg(off_t) length; -}; -check_syscall_args(osf1_sys_ftruncate) - -struct sys_flock_args; - -struct osf1_sys_setgid_args { - syscallarg(gid_t) gid; -}; -check_syscall_args(osf1_sys_setgid) - -struct osf1_sys_sendto_args { - syscallarg(int) s; - syscallarg(void *) buf; - syscallarg(size_t) len; - syscallarg(int) flags; - syscallarg(struct sockaddr *) to; - syscallarg(int) tolen; -}; -check_syscall_args(osf1_sys_sendto) - -struct sys_shutdown_args; - -struct osf1_sys_socketpair_args { - syscallarg(int) domain; - syscallarg(int) type; - syscallarg(int) protocol; - syscallarg(int *) rsv; -}; -check_syscall_args(osf1_sys_socketpair) - -struct sys_mkdir_args; - -struct sys_rmdir_args; - -struct osf1_sys_utimes_args { - syscallarg(const char *) path; - syscallarg(const struct osf1_timeval *) tptr; -}; -check_syscall_args(osf1_sys_utimes) - -struct compat_43_sys_getpeername_args; - -struct compat_43_sys_sethostid_args; - -struct osf1_sys_getrlimit_args { - syscallarg(u_int) which; - syscallarg(struct rlimit *) rlp; -}; -check_syscall_args(osf1_sys_getrlimit) - -struct osf1_sys_setrlimit_args { - syscallarg(u_int) which; - syscallarg(struct rlimit *) rlp; -}; -check_syscall_args(osf1_sys_setrlimit) - -struct compat_43_sys_getsockname_args; - -struct osf1_sys_sigaction_args { - syscallarg(int) signum; - syscallarg(struct osf1_sigaction *) nsa; - syscallarg(struct osf1_sigaction *) osa; -}; -check_syscall_args(osf1_sys_sigaction) - -struct osf1_sys_getdirentries_args { - syscallarg(int) fd; - syscallarg(char *) buf; - syscallarg(int) nbytes; - syscallarg(long *) basep; -}; -check_syscall_args(osf1_sys_getdirentries) - -struct osf1_sys_statfs_args { - syscallarg(const char *) path; - syscallarg(struct osf1_statfs *) buf; - syscallarg(int) len; -}; -check_syscall_args(osf1_sys_statfs) - -struct osf1_sys_fstatfs_args { - syscallarg(int) fd; - syscallarg(struct osf1_statfs *) buf; - syscallarg(int) len; -}; -check_syscall_args(osf1_sys_fstatfs) - -struct compat_09_sys_getdomainname_args; - -struct compat_09_sys_setdomainname_args; - -struct osf1_sys_uname_args { - syscallarg(struct osf1_uname *) name; -}; -check_syscall_args(osf1_sys_uname) - -struct sys___posix_lchown_args; - -struct osf1_sys_shmat_args { - syscallarg(int) shmid; - syscallarg(const void *) shmaddr; - syscallarg(int) shmflg; -}; -check_syscall_args(osf1_sys_shmat) - -struct osf1_sys_shmctl_args { - syscallarg(int) shmid; - syscallarg(int) cmd; - syscallarg(struct osf1_shmid_ds *) buf; -}; -check_syscall_args(osf1_sys_shmctl) - -struct osf1_sys_shmdt_args { - syscallarg(const void *) shmaddr; -}; -check_syscall_args(osf1_sys_shmdt) - -struct osf1_sys_shmget_args { - syscallarg(osf1_key_t) key; - syscallarg(size_t) size; - syscallarg(int) flags; -}; -check_syscall_args(osf1_sys_shmget) - -struct osf1_sys_stat2_args { - syscallarg(const char *) path; - syscallarg(struct osf1_stat2 *) ub; -}; -check_syscall_args(osf1_sys_stat2) - -struct osf1_sys_lstat2_args { - syscallarg(const char *) path; - syscallarg(struct osf1_stat2 *) ub; -}; -check_syscall_args(osf1_sys_lstat2) - -struct osf1_sys_fstat2_args { - syscallarg(int) fd; - syscallarg(struct osf1_stat2 *) sb; -}; -check_syscall_args(osf1_sys_fstat2) - -struct sys_getpgid_args; - -struct sys_getsid_args; - -struct osf1_sys_sigaltstack_args { - syscallarg(struct osf1_sigaltstack *) nss; - syscallarg(struct osf1_sigaltstack *) oss; -}; -check_syscall_args(osf1_sys_sigaltstack) - -struct osf1_sys_sysinfo_args { - syscallarg(int) cmd; - syscallarg(char *) buf; - syscallarg(long) len; -}; -check_syscall_args(osf1_sys_sysinfo) - -struct osf1_sys_pathconf_args { - syscallarg(const char *) path; - syscallarg(int) name; -}; -check_syscall_args(osf1_sys_pathconf) - -struct osf1_sys_fpathconf_args { - syscallarg(int) fd; - syscallarg(int) name; -}; -check_syscall_args(osf1_sys_fpathconf) - -struct osf1_sys_usleep_thread_args { - syscallarg(struct osf1_timeval *) sleep; - syscallarg(struct osf1_timeval *) slept; -}; -check_syscall_args(osf1_sys_usleep_thread) - -struct osf1_sys_getsysinfo_args { - syscallarg(u_long) op; - syscallarg(void *) buffer; - syscallarg(u_long) nbytes; - syscallarg(void *) arg; - syscallarg(u_long) flag; -}; -check_syscall_args(osf1_sys_getsysinfo) - -struct osf1_sys_setsysinfo_args { - syscallarg(u_long) op; - syscallarg(void *) buffer; - syscallarg(u_long) nbytes; - syscallarg(void *) arg; - syscallarg(u_long) flag; -}; -check_syscall_args(osf1_sys_setsysinfo) - -/* - * System call prototypes. - */ - -int sys_nosys(struct lwp *, const void *, register_t *); - -int sys_exit(struct lwp *, const struct sys_exit_args *, register_t *); - -int sys_fork(struct lwp *, const void *, register_t *); - -int sys_read(struct lwp *, const struct sys_read_args *, register_t *); - -int sys_write(struct lwp *, const struct sys_write_args *, register_t *); - -int sys_close(struct lwp *, const struct sys_close_args *, register_t *); - -int osf1_sys_wait4(struct lwp *, const struct osf1_sys_wait4_args *, register_t *); - -int sys_link(struct lwp *, const struct sys_link_args *, register_t *); - -int sys_unlink(struct lwp *, const struct sys_unlink_args *, register_t *); - -int sys_chdir(struct lwp *, const struct sys_chdir_args *, register_t *); - -int sys_fchdir(struct lwp *, const struct sys_fchdir_args *, register_t *); - -int osf1_sys_mknod(struct lwp *, const struct osf1_sys_mknod_args *, register_t *); - -int sys_chmod(struct lwp *, const struct sys_chmod_args *, register_t *); - -int sys___posix_chown(struct lwp *, const struct sys___posix_chown_args *, register_t *); - -int sys_obreak(struct lwp *, const struct sys_obreak_args *, register_t *); - -int osf1_sys_getfsstat(struct lwp *, const struct osf1_sys_getfsstat_args *, register_t *); - -int osf1_sys_lseek(struct lwp *, const struct osf1_sys_lseek_args *, register_t *); - -int sys_getpid_with_ppid(struct lwp *, const void *, register_t *); - -int osf1_sys_mount(struct lwp *, const struct osf1_sys_mount_args *, register_t *); - -int osf1_sys_unmount(struct lwp *, const struct osf1_sys_unmount_args *, register_t *); - -int osf1_sys_setuid(struct lwp *, const struct osf1_sys_setuid_args *, register_t *); - -int sys_getuid_with_euid(struct lwp *, const void *, register_t *); - -int osf1_sys_recvmsg_xopen(struct lwp *, const struct osf1_sys_recvmsg_xopen_args *, register_t *); - -int osf1_sys_sendmsg_xopen(struct lwp *, const struct osf1_sys_sendmsg_xopen_args *, register_t *); - -int osf1_sys_access(struct lwp *, const struct osf1_sys_access_args *, register_t *); - -int sys_sync(struct lwp *, const void *, register_t *); - -int sys_kill(struct lwp *, const struct sys_kill_args *, register_t *); - -int sys_setpgid(struct lwp *, const struct sys_setpgid_args *, register_t *); - -int sys_dup(struct lwp *, const struct sys_dup_args *, register_t *); - -int sys_pipe(struct lwp *, const void *, register_t *); - -int osf1_sys_set_program_attributes(struct lwp *, const struct osf1_sys_set_program_attributes_args *, register_t *); - -int osf1_sys_open(struct lwp *, const struct osf1_sys_open_args *, register_t *); - -int sys_getgid_with_egid(struct lwp *, const void *, register_t *); - -int compat_13_sys_sigprocmask(struct lwp *, const struct compat_13_sys_sigprocmask_args *, register_t *); - -int sys___getlogin(struct lwp *, const struct sys___getlogin_args *, register_t *); - -int sys___setlogin(struct lwp *, const struct sys___setlogin_args *, register_t *); - -int sys_acct(struct lwp *, const struct sys_acct_args *, register_t *); - -int osf1_sys_classcntl(struct lwp *, const struct osf1_sys_classcntl_args *, register_t *); - -int osf1_sys_ioctl(struct lwp *, const struct osf1_sys_ioctl_args *, register_t *); - -int osf1_sys_reboot(struct lwp *, const struct osf1_sys_reboot_args *, register_t *); - -int sys_revoke(struct lwp *, const struct sys_revoke_args *, register_t *); - -int sys_symlink(struct lwp *, const struct sys_symlink_args *, register_t *); - -int sys_readlink(struct lwp *, const struct sys_readlink_args *, register_t *); - -int osf1_sys_execve(struct lwp *, const struct osf1_sys_execve_args *, register_t *); - -int sys_umask(struct lwp *, const struct sys_umask_args *, register_t *); - -int sys_chroot(struct lwp *, const struct sys_chroot_args *, register_t *); - -int sys_getpgrp(struct lwp *, const void *, register_t *); - -int compat_43_sys_getpagesize(struct lwp *, const void *, register_t *); - -int sys_vfork(struct lwp *, const void *, register_t *); - -int osf1_sys_stat(struct lwp *, const struct osf1_sys_stat_args *, register_t *); - -int osf1_sys_lstat(struct lwp *, const struct osf1_sys_lstat_args *, register_t *); - -int osf1_sys_mmap(struct lwp *, const struct osf1_sys_mmap_args *, register_t *); - -int sys_munmap(struct lwp *, const struct sys_munmap_args *, register_t *); - -int osf1_sys_mprotect(struct lwp *, const struct osf1_sys_mprotect_args *, register_t *); - -int osf1_sys_madvise(struct lwp *, const struct osf1_sys_madvise_args *, register_t *); - -int sys_getgroups(struct lwp *, const struct sys_getgroups_args *, register_t *); - -int sys_setgroups(struct lwp *, const struct sys_setgroups_args *, register_t *); - -int osf1_sys_setitimer(struct lwp *, const struct osf1_sys_setitimer_args *, register_t *); - -int osf1_sys_getitimer(struct lwp *, const struct osf1_sys_getitimer_args *, register_t *); - -int compat_43_sys_gethostname(struct lwp *, const struct compat_43_sys_gethostname_args *, register_t *); - -int compat_43_sys_sethostname(struct lwp *, const struct compat_43_sys_sethostname_args *, register_t *); - -int compat_43_sys_getdtablesize(struct lwp *, const void *, register_t *); - -int sys_dup2(struct lwp *, const struct sys_dup2_args *, register_t *); - -int osf1_sys_fstat(struct lwp *, const struct osf1_sys_fstat_args *, register_t *); - -int osf1_sys_fcntl(struct lwp *, const struct osf1_sys_fcntl_args *, register_t *); - -int osf1_sys_select(struct lwp *, const struct osf1_sys_select_args *, register_t *); - -int sys_poll(struct lwp *, const struct sys_poll_args *, register_t *); - -int sys_fsync(struct lwp *, const struct sys_fsync_args *, register_t *); - -int sys_setpriority(struct lwp *, const struct sys_setpriority_args *, register_t *); - -int osf1_sys_socket(struct lwp *, const struct osf1_sys_socket_args *, register_t *); - -int sys_connect(struct lwp *, const struct sys_connect_args *, register_t *); - -int compat_43_sys_accept(struct lwp *, const struct compat_43_sys_accept_args *, register_t *); - -int sys_getpriority(struct lwp *, const struct sys_getpriority_args *, register_t *); - -int compat_43_sys_send(struct lwp *, const struct compat_43_sys_send_args *, register_t *); - -int compat_43_sys_recv(struct lwp *, const struct compat_43_sys_recv_args *, register_t *); - -int compat_13_sys_sigreturn(struct lwp *, const struct compat_13_sys_sigreturn_args *, register_t *); - -int sys_bind(struct lwp *, const struct sys_bind_args *, register_t *); - -int sys_setsockopt(struct lwp *, const struct sys_setsockopt_args *, register_t *); - -int sys_listen(struct lwp *, const struct sys_listen_args *, register_t *); - -int compat_13_sys_sigsuspend(struct lwp *, const struct compat_13_sys_sigsuspend_args *, register_t *); - -int compat_43_sys_sigstack(struct lwp *, const struct compat_43_sys_sigstack_args *, register_t *); - -int osf1_sys_gettimeofday(struct lwp *, const struct osf1_sys_gettimeofday_args *, register_t *); - -int osf1_sys_getrusage(struct lwp *, const struct osf1_sys_getrusage_args *, register_t *); - -int sys_getsockopt(struct lwp *, const struct sys_getsockopt_args *, register_t *); - -int osf1_sys_readv(struct lwp *, const struct osf1_sys_readv_args *, register_t *); - -int osf1_sys_writev(struct lwp *, const struct osf1_sys_writev_args *, register_t *); - -int osf1_sys_settimeofday(struct lwp *, const struct osf1_sys_settimeofday_args *, register_t *); - -int sys___posix_fchown(struct lwp *, const struct sys___posix_fchown_args *, register_t *); - -int sys_fchmod(struct lwp *, const struct sys_fchmod_args *, register_t *); - -int compat_43_sys_recvfrom(struct lwp *, const struct compat_43_sys_recvfrom_args *, register_t *); - -int sys_setreuid(struct lwp *, const struct sys_setreuid_args *, register_t *); - -int sys_setregid(struct lwp *, const struct sys_setregid_args *, register_t *); - -int sys___posix_rename(struct lwp *, const struct sys___posix_rename_args *, register_t *); - -int osf1_sys_truncate(struct lwp *, const struct osf1_sys_truncate_args *, register_t *); - -int osf1_sys_ftruncate(struct lwp *, const struct osf1_sys_ftruncate_args *, register_t *); - -int sys_flock(struct lwp *, const struct sys_flock_args *, register_t *); - -int osf1_sys_setgid(struct lwp *, const struct osf1_sys_setgid_args *, register_t *); - -int osf1_sys_sendto(struct lwp *, const struct osf1_sys_sendto_args *, register_t *); - -int sys_shutdown(struct lwp *, const struct sys_shutdown_args *, register_t *); - -int osf1_sys_socketpair(struct lwp *, const struct osf1_sys_socketpair_args *, register_t *); - -int sys_mkdir(struct lwp *, const struct sys_mkdir_args *, register_t *); - -int sys_rmdir(struct lwp *, const struct sys_rmdir_args *, register_t *); - -int osf1_sys_utimes(struct lwp *, const struct osf1_sys_utimes_args *, register_t *); - -int compat_43_sys_getpeername(struct lwp *, const struct compat_43_sys_getpeername_args *, register_t *); - -int compat_43_sys_gethostid(struct lwp *, const void *, register_t *); - -int compat_43_sys_sethostid(struct lwp *, const struct compat_43_sys_sethostid_args *, register_t *); - -int osf1_sys_getrlimit(struct lwp *, const struct osf1_sys_getrlimit_args *, register_t *); - -int osf1_sys_setrlimit(struct lwp *, const struct osf1_sys_setrlimit_args *, register_t *); - -int sys_setsid(struct lwp *, const void *, register_t *); - -int compat_43_sys_quota(struct lwp *, const void *, register_t *); - -int compat_43_sys_getsockname(struct lwp *, const struct compat_43_sys_getsockname_args *, register_t *); - -int osf1_sys_sigaction(struct lwp *, const struct osf1_sys_sigaction_args *, register_t *); - -int osf1_sys_getdirentries(struct lwp *, const struct osf1_sys_getdirentries_args *, register_t *); - -int osf1_sys_statfs(struct lwp *, const struct osf1_sys_statfs_args *, register_t *); - -int osf1_sys_fstatfs(struct lwp *, const struct osf1_sys_fstatfs_args *, register_t *); - -int compat_09_sys_getdomainname(struct lwp *, const struct compat_09_sys_getdomainname_args *, register_t *); - -int compat_09_sys_setdomainname(struct lwp *, const struct compat_09_sys_setdomainname_args *, register_t *); - -int osf1_sys_uname(struct lwp *, const struct osf1_sys_uname_args *, register_t *); - -int sys___posix_lchown(struct lwp *, const struct sys___posix_lchown_args *, register_t *); - -int osf1_sys_shmat(struct lwp *, const struct osf1_sys_shmat_args *, register_t *); - -int osf1_sys_shmctl(struct lwp *, const struct osf1_sys_shmctl_args *, register_t *); - -int osf1_sys_shmdt(struct lwp *, const struct osf1_sys_shmdt_args *, register_t *); - -int osf1_sys_shmget(struct lwp *, const struct osf1_sys_shmget_args *, register_t *); - -int osf1_sys_stat2(struct lwp *, const struct osf1_sys_stat2_args *, register_t *); - -int osf1_sys_lstat2(struct lwp *, const struct osf1_sys_lstat2_args *, register_t *); - -int osf1_sys_fstat2(struct lwp *, const struct osf1_sys_fstat2_args *, register_t *); - -int sys_getpgid(struct lwp *, const struct sys_getpgid_args *, register_t *); - -int sys_getsid(struct lwp *, const struct sys_getsid_args *, register_t *); - -int osf1_sys_sigaltstack(struct lwp *, const struct osf1_sys_sigaltstack_args *, register_t *); - -int osf1_sys_sysinfo(struct lwp *, const struct osf1_sys_sysinfo_args *, register_t *); - -int osf1_sys_pathconf(struct lwp *, const struct osf1_sys_pathconf_args *, register_t *); - -int osf1_sys_fpathconf(struct lwp *, const struct osf1_sys_fpathconf_args *, register_t *); - -int osf1_sys_usleep_thread(struct lwp *, const struct osf1_sys_usleep_thread_args *, register_t *); - -int osf1_sys_getsysinfo(struct lwp *, const struct osf1_sys_getsysinfo_args *, register_t *); - -int osf1_sys_setsysinfo(struct lwp *, const struct osf1_sys_setsysinfo_args *, register_t *); - -#endif /* _OSF1_SYS_SYSCALLARGS_H_ */ diff --git a/sys/compat/osf1/osf1_syscalls.c b/sys/compat/osf1/osf1_syscalls.c deleted file mode 100644 index e745775ac98f..000000000000 --- a/sys/compat/osf1/osf1_syscalls.c +++ /dev/null @@ -1,1059 +0,0 @@ -/* $NetBSD: osf1_syscalls.c,v 1.66 2018/08/10 21:47:15 pgoyette Exp $ */ - -/* - * System call names. - * - * DO NOT EDIT-- this file is automatically generated. - * created from NetBSD: syscalls.master,v 1.49 2013/11/07 19:37:19 njoly Exp - */ - -#include -__KERNEL_RCSID(0, "$NetBSD: osf1_syscalls.c,v 1.66 2018/08/10 21:47:15 pgoyette Exp $"); - -#if defined(_KERNEL_OPT) -#if defined(_KERNEL_OPT) -#include "opt_compat_43.h" -#endif -#include -#include -#include -#include -#include -#include -#include -#include -#else /* _KERNEL_OPT */ -#include -#endif /* _KERNEL_OPT */ - -const char *const osf1_syscallnames[] = { - /* 0 */ "syscall", - /* 1 */ "exit", - /* 2 */ "fork", - /* 3 */ "read", - /* 4 */ "write", - /* 5 */ "#5 (unimplemented old open)", - /* 6 */ "close", - /* 7 */ "wait4", - /* 8 */ "#8 (unimplemented old creat)", - /* 9 */ "link", - /* 10 */ "unlink", - /* 11 */ "#11 (unimplemented execv)", - /* 12 */ "chdir", - /* 13 */ "fchdir", - /* 14 */ "mknod", - /* 15 */ "chmod", - /* 16 */ "__posix_chown", - /* 17 */ "obreak", - /* 18 */ "getfsstat", - /* 19 */ "lseek", - /* 20 */ "getpid_with_ppid", - /* 21 */ "mount", - /* 22 */ "unmount", - /* 23 */ "setuid", - /* 24 */ "getuid_with_euid", - /* 25 */ "#25 (unimplemented exec_with_loader)", - /* 26 */ "#26 (unimplemented ptrace)", - /* 27 */ "recvmsg_xopen", - /* 28 */ "sendmsg_xopen", - /* 29 */ "#29 (unimplemented recvfrom)", - /* 30 */ "#30 (unimplemented accept)", - /* 31 */ "#31 (unimplemented getpeername)", - /* 32 */ "#32 (unimplemented getsockname)", - /* 33 */ "access", - /* 34 */ "#34 (unimplemented chflags)", - /* 35 */ "#35 (unimplemented fchflags)", - /* 36 */ "sync", - /* 37 */ "kill", - /* 38 */ "#38 (unimplemented old stat)", - /* 39 */ "setpgid", - /* 40 */ "#40 (unimplemented old lstat)", - /* 41 */ "dup", - /* 42 */ "pipe", - /* 43 */ "set_program_attributes", - /* 44 */ "#44 (unimplemented profil)", - /* 45 */ "open", - /* 46 */ "#46 (obsolete sigaction)", - /* 47 */ "getgid_with_egid", - /* 48 */ "sigprocmask", - /* 49 */ "__getlogin", - /* 50 */ "__setlogin", - /* 51 */ "acct", - /* 52 */ "#52 (unimplemented sigpending)", - /* 53 */ "classcntl", - /* 54 */ "ioctl", - /* 55 */ "reboot", - /* 56 */ "revoke", - /* 57 */ "symlink", - /* 58 */ "readlink", - /* 59 */ "execve", - /* 60 */ "umask", - /* 61 */ "chroot", - /* 62 */ "#62 (unimplemented old fstat)", - /* 63 */ "getpgrp", - /* 64 */ "getpagesize", - /* 65 */ "#65 (unimplemented mremap)", - /* 66 */ "vfork", - /* 67 */ "stat", - /* 68 */ "lstat", - /* 69 */ "#69 (unimplemented sbrk)", - /* 70 */ "#70 (unimplemented sstk)", - /* 71 */ "mmap", - /* 72 */ "#72 (unimplemented ovadvise)", - /* 73 */ "munmap", - /* 74 */ "mprotect", - /* 75 */ "madvise", - /* 76 */ "#76 (unimplemented old vhangup)", - /* 77 */ "#77 (unimplemented kmodcall)", - /* 78 */ "#78 (unimplemented mincore)", - /* 79 */ "getgroups", - /* 80 */ "setgroups", - /* 81 */ "#81 (unimplemented old getpgrp)", - /* 82 */ "setpgrp", - /* 83 */ "setitimer", - /* 84 */ "#84 (unimplemented old wait)", - /* 85 */ "#85 (unimplemented table)", - /* 86 */ "getitimer", - /* 87 */ "gethostname", - /* 88 */ "sethostname", - /* 89 */ "getdtablesize", - /* 90 */ "dup2", - /* 91 */ "fstat", - /* 92 */ "fcntl", - /* 93 */ "select", - /* 94 */ "poll", - /* 95 */ "fsync", - /* 96 */ "setpriority", - /* 97 */ "socket", - /* 98 */ "connect", - /* 99 */ "accept", - /* 100 */ "getpriority", - /* 101 */ "send", - /* 102 */ "recv", - /* 103 */ "sigreturn", - /* 104 */ "bind", - /* 105 */ "setsockopt", - /* 106 */ "listen", - /* 107 */ "#107 (unimplemented plock)", - /* 108 */ "#108 (unimplemented old sigvec)", - /* 109 */ "#109 (unimplemented old sigblock)", - /* 110 */ "#110 (unimplemented old sigsetmask)", - /* 111 */ "sigsuspend", - /* 112 */ "sigstack", - /* 113 */ "#113 (unimplemented old recvmsg)", - /* 114 */ "#114 (unimplemented old sendmsg)", - /* 115 */ "#115 (obsolete vtrace)", - /* 116 */ "gettimeofday", - /* 117 */ "getrusage", - /* 118 */ "getsockopt", - /* 119 */ "#119 (unimplemented)", - /* 120 */ "readv", - /* 121 */ "writev", - /* 122 */ "settimeofday", - /* 123 */ "__posix_fchown", - /* 124 */ "fchmod", - /* 125 */ "recvfrom", - /* 126 */ "setreuid", - /* 127 */ "setregid", - /* 128 */ "__posix_rename", - /* 129 */ "truncate", - /* 130 */ "ftruncate", - /* 131 */ "flock", - /* 132 */ "setgid", - /* 133 */ "sendto", - /* 134 */ "shutdown", - /* 135 */ "socketpair", - /* 136 */ "mkdir", - /* 137 */ "rmdir", - /* 138 */ "utimes", - /* 139 */ "#139 (obsolete 4.2 sigreturn)", - /* 140 */ "#140 (unimplemented adjtime)", - /* 141 */ "getpeername", - /* 142 */ "gethostid", - /* 143 */ "sethostid", - /* 144 */ "getrlimit", - /* 145 */ "setrlimit", - /* 146 */ "#146 (unimplemented old killpg)", - /* 147 */ "setsid", - /* 148 */ "#148 (unimplemented quotactl)", - /* 149 */ "quota", - /* 150 */ "getsockname", - /* 151 */ "#151 (unimplemented pread)", - /* 152 */ "#152 (unimplemented pwrite)", - /* 153 */ "#153 (unimplemented pid_block)", - /* 154 */ "#154 (unimplemented pid_unblock)", - /* 155 */ "#155 (unimplemented signal_urti)", - /* 156 */ "sigaction", - /* 157 */ "#157 (unimplemented sigwaitprim)", - /* 158 */ "#158 (unimplemented nfssvc)", - /* 159 */ "getdirentries", - /* 160 */ "statfs", - /* 161 */ "fstatfs", - /* 162 */ "#162 (unimplemented)", - /* 163 */ "#163 (unimplemented async_daemon)", - /* 164 */ "#164 (unimplemented getfh)", - /* 165 */ "getdomainname", - /* 166 */ "setdomainname", - /* 167 */ "#167 (unimplemented)", - /* 168 */ "#168 (unimplemented)", - /* 169 */ "#169 (unimplemented exportfs)", - /* 170 */ "#170 (unimplemented)", - /* 171 */ "#171 (unimplemented)", - /* 172 */ "#172 (unimplemented alt msgctl)", - /* 173 */ "#173 (unimplemented alt msgget)", - /* 174 */ "#174 (unimplemented alt msgrcv)", - /* 175 */ "#175 (unimplemented alt msgsnd)", - /* 176 */ "#176 (unimplemented alt semctl)", - /* 177 */ "#177 (unimplemented alt semget)", - /* 178 */ "#178 (unimplemented alt semop)", - /* 179 */ "#179 (unimplemented alt uname)", - /* 180 */ "#180 (unimplemented)", - /* 181 */ "#181 (unimplemented alt plock)", - /* 182 */ "#182 (unimplemented lockf)", - /* 183 */ "#183 (unimplemented)", - /* 184 */ "#184 (unimplemented getmnt)", - /* 185 */ "#185 (unimplemented)", - /* 186 */ "#186 (unimplemented unmount)", - /* 187 */ "#187 (unimplemented alt sigpending)", - /* 188 */ "#188 (unimplemented alt setsid)", - /* 189 */ "#189 (unimplemented)", - /* 190 */ "#190 (unimplemented)", - /* 191 */ "#191 (unimplemented)", - /* 192 */ "#192 (unimplemented)", - /* 193 */ "#193 (unimplemented)", - /* 194 */ "#194 (unimplemented)", - /* 195 */ "#195 (unimplemented)", - /* 196 */ "#196 (unimplemented)", - /* 197 */ "#197 (unimplemented)", - /* 198 */ "#198 (unimplemented)", - /* 199 */ "#199 (unimplemented swapon)", - /* 200 */ "#200 (unimplemented msgctl)", - /* 201 */ "#201 (unimplemented msgget)", - /* 202 */ "#202 (unimplemented msgrcv)", - /* 203 */ "#203 (unimplemented msgsnd)", - /* 204 */ "#204 (unimplemented semctl)", - /* 205 */ "#205 (unimplemented semget)", - /* 206 */ "#206 (unimplemented semop)", - /* 207 */ "uname", - /* 208 */ "__posix_lchown", - /* 209 */ "shmat", - /* 210 */ "shmctl", - /* 211 */ "shmdt", - /* 212 */ "shmget", - /* 213 */ "#213 (unimplemented mvalid)", - /* 214 */ "#214 (unimplemented getaddressconf)", - /* 215 */ "#215 (unimplemented msleep)", - /* 216 */ "#216 (unimplemented mwakeup)", - /* 217 */ "#217 (unimplemented msync)", - /* 218 */ "#218 (unimplemented signal)", - /* 219 */ "#219 (unimplemented utc gettime)", - /* 220 */ "#220 (unimplemented utc adjtime)", - /* 221 */ "#221 (unimplemented)", - /* 222 */ "#222 (unimplemented security)", - /* 223 */ "#223 (unimplemented kloadcall)", - /* 224 */ "stat2", - /* 225 */ "lstat2", - /* 226 */ "fstat2", - /* 227 */ "#227 (unimplemented statfs2)", - /* 228 */ "#228 (unimplemented fstatfs2)", - /* 229 */ "#229 (unimplemented getfsstat2)", - /* 230 */ "#230 (unimplemented)", - /* 231 */ "#231 (unimplemented)", - /* 232 */ "#232 (unimplemented)", - /* 233 */ "getpgid", - /* 234 */ "getsid", - /* 235 */ "sigaltstack", - /* 236 */ "#236 (unimplemented waitid)", - /* 237 */ "#237 (unimplemented priocntlset)", - /* 238 */ "#238 (unimplemented sigsendset)", - /* 239 */ "#239 (unimplemented set_speculative)", - /* 240 */ "#240 (unimplemented msfs_syscall)", - /* 241 */ "sysinfo", - /* 242 */ "#242 (unimplemented uadmin)", - /* 243 */ "#243 (unimplemented fuser)", - /* 244 */ "#244 (unimplemented proplist_syscall)", - /* 245 */ "#245 (unimplemented ntp_adjtime)", - /* 246 */ "#246 (unimplemented ntp_gettime)", - /* 247 */ "pathconf", - /* 248 */ "fpathconf", - /* 249 */ "#249 (unimplemented)", - /* 250 */ "#250 (unimplemented uswitch)", - /* 251 */ "usleep_thread", - /* 252 */ "#252 (unimplemented audcntl)", - /* 253 */ "#253 (unimplemented audgen)", - /* 254 */ "#254 (unimplemented sysfs)", - /* 255 */ "#255 (unimplemented subsys_info)", - /* 256 */ "getsysinfo", - /* 257 */ "setsysinfo", - /* 258 */ "#258 (unimplemented afs_syscall)", - /* 259 */ "#259 (unimplemented swapctl)", - /* 260 */ "#260 (unimplemented memcntl)", - /* 261 */ "#261 (unimplemented fdatasync)", - /* 262 */ "#262 (unimplemented oflock)", - /* 263 */ "#263 (unimplemented _F64_readv)", - /* 264 */ "#264 (unimplemented _F64_writev)", - /* 265 */ "#265 (unimplemented cdslxlate)", - /* 266 */ "#266 (unimplemented sendfile)", - /* 267 */ "# filler", - /* 268 */ "# filler", - /* 269 */ "# filler", - /* 270 */ "# filler", - /* 271 */ "# filler", - /* 272 */ "# filler", - /* 273 */ "# filler", - /* 274 */ "# filler", - /* 275 */ "# filler", - /* 276 */ "# filler", - /* 277 */ "# filler", - /* 278 */ "# filler", - /* 279 */ "# filler", - /* 280 */ "# filler", - /* 281 */ "# filler", - /* 282 */ "# filler", - /* 283 */ "# filler", - /* 284 */ "# filler", - /* 285 */ "# filler", - /* 286 */ "# filler", - /* 287 */ "# filler", - /* 288 */ "# filler", - /* 289 */ "# filler", - /* 290 */ "# filler", - /* 291 */ "# filler", - /* 292 */ "# filler", - /* 293 */ "# filler", - /* 294 */ "# filler", - /* 295 */ "# filler", - /* 296 */ "# filler", - /* 297 */ "# filler", - /* 298 */ "# filler", - /* 299 */ "# filler", - /* 300 */ "# filler", - /* 301 */ "# filler", - /* 302 */ "# filler", - /* 303 */ "# filler", - /* 304 */ "# filler", - /* 305 */ "# filler", - /* 306 */ "# filler", - /* 307 */ "# filler", - /* 308 */ "# filler", - /* 309 */ "# filler", - /* 310 */ "# filler", - /* 311 */ "# filler", - /* 312 */ "# filler", - /* 313 */ "# filler", - /* 314 */ "# filler", - /* 315 */ "# filler", - /* 316 */ "# filler", - /* 317 */ "# filler", - /* 318 */ "# filler", - /* 319 */ "# filler", - /* 320 */ "# filler", - /* 321 */ "# filler", - /* 322 */ "# filler", - /* 323 */ "# filler", - /* 324 */ "# filler", - /* 325 */ "# filler", - /* 326 */ "# filler", - /* 327 */ "# filler", - /* 328 */ "# filler", - /* 329 */ "# filler", - /* 330 */ "# filler", - /* 331 */ "# filler", - /* 332 */ "# filler", - /* 333 */ "# filler", - /* 334 */ "# filler", - /* 335 */ "# filler", - /* 336 */ "# filler", - /* 337 */ "# filler", - /* 338 */ "# filler", - /* 339 */ "# filler", - /* 340 */ "# filler", - /* 341 */ "# filler", - /* 342 */ "# filler", - /* 343 */ "# filler", - /* 344 */ "# filler", - /* 345 */ "# filler", - /* 346 */ "# filler", - /* 347 */ "# filler", - /* 348 */ "# filler", - /* 349 */ "# filler", - /* 350 */ "# filler", - /* 351 */ "# filler", - /* 352 */ "# filler", - /* 353 */ "# filler", - /* 354 */ "# filler", - /* 355 */ "# filler", - /* 356 */ "# filler", - /* 357 */ "# filler", - /* 358 */ "# filler", - /* 359 */ "# filler", - /* 360 */ "# filler", - /* 361 */ "# filler", - /* 362 */ "# filler", - /* 363 */ "# filler", - /* 364 */ "# filler", - /* 365 */ "# filler", - /* 366 */ "# filler", - /* 367 */ "# filler", - /* 368 */ "# filler", - /* 369 */ "# filler", - /* 370 */ "# filler", - /* 371 */ "# filler", - /* 372 */ "# filler", - /* 373 */ "# filler", - /* 374 */ "# filler", - /* 375 */ "# filler", - /* 376 */ "# filler", - /* 377 */ "# filler", - /* 378 */ "# filler", - /* 379 */ "# filler", - /* 380 */ "# filler", - /* 381 */ "# filler", - /* 382 */ "# filler", - /* 383 */ "# filler", - /* 384 */ "# filler", - /* 385 */ "# filler", - /* 386 */ "# filler", - /* 387 */ "# filler", - /* 388 */ "# filler", - /* 389 */ "# filler", - /* 390 */ "# filler", - /* 391 */ "# filler", - /* 392 */ "# filler", - /* 393 */ "# filler", - /* 394 */ "# filler", - /* 395 */ "# filler", - /* 396 */ "# filler", - /* 397 */ "# filler", - /* 398 */ "# filler", - /* 399 */ "# filler", - /* 400 */ "# filler", - /* 401 */ "# filler", - /* 402 */ "# filler", - /* 403 */ "# filler", - /* 404 */ "# filler", - /* 405 */ "# filler", - /* 406 */ "# filler", - /* 407 */ "# filler", - /* 408 */ "# filler", - /* 409 */ "# filler", - /* 410 */ "# filler", - /* 411 */ "# filler", - /* 412 */ "# filler", - /* 413 */ "# filler", - /* 414 */ "# filler", - /* 415 */ "# filler", - /* 416 */ "# filler", - /* 417 */ "# filler", - /* 418 */ "# filler", - /* 419 */ "# filler", - /* 420 */ "# filler", - /* 421 */ "# filler", - /* 422 */ "# filler", - /* 423 */ "# filler", - /* 424 */ "# filler", - /* 425 */ "# filler", - /* 426 */ "# filler", - /* 427 */ "# filler", - /* 428 */ "# filler", - /* 429 */ "# filler", - /* 430 */ "# filler", - /* 431 */ "# filler", - /* 432 */ "# filler", - /* 433 */ "# filler", - /* 434 */ "# filler", - /* 435 */ "# filler", - /* 436 */ "# filler", - /* 437 */ "# filler", - /* 438 */ "# filler", - /* 439 */ "# filler", - /* 440 */ "# filler", - /* 441 */ "# filler", - /* 442 */ "# filler", - /* 443 */ "# filler", - /* 444 */ "# filler", - /* 445 */ "# filler", - /* 446 */ "# filler", - /* 447 */ "# filler", - /* 448 */ "# filler", - /* 449 */ "# filler", - /* 450 */ "# filler", - /* 451 */ "# filler", - /* 452 */ "# filler", - /* 453 */ "# filler", - /* 454 */ "# filler", - /* 455 */ "# filler", - /* 456 */ "# filler", - /* 457 */ "# filler", - /* 458 */ "# filler", - /* 459 */ "# filler", - /* 460 */ "# filler", - /* 461 */ "# filler", - /* 462 */ "# filler", - /* 463 */ "# filler", - /* 464 */ "# filler", - /* 465 */ "# filler", - /* 466 */ "# filler", - /* 467 */ "# filler", - /* 468 */ "# filler", - /* 469 */ "# filler", - /* 470 */ "# filler", - /* 471 */ "# filler", - /* 472 */ "# filler", - /* 473 */ "# filler", - /* 474 */ "# filler", - /* 475 */ "# filler", - /* 476 */ "# filler", - /* 477 */ "# filler", - /* 478 */ "# filler", - /* 479 */ "# filler", - /* 480 */ "# filler", - /* 481 */ "# filler", - /* 482 */ "# filler", - /* 483 */ "# filler", - /* 484 */ "# filler", - /* 485 */ "# filler", - /* 486 */ "# filler", - /* 487 */ "# filler", - /* 488 */ "# filler", - /* 489 */ "# filler", - /* 490 */ "# filler", - /* 491 */ "# filler", - /* 492 */ "# filler", - /* 493 */ "# filler", - /* 494 */ "# filler", - /* 495 */ "# filler", - /* 496 */ "# filler", - /* 497 */ "# filler", - /* 498 */ "# filler", - /* 499 */ "# filler", - /* 500 */ "# filler", - /* 501 */ "# filler", - /* 502 */ "# filler", - /* 503 */ "# filler", - /* 504 */ "# filler", - /* 505 */ "# filler", - /* 506 */ "# filler", - /* 507 */ "# filler", - /* 508 */ "# filler", - /* 509 */ "# filler", - /* 510 */ "# filler", - /* 511 */ "# filler", -}; - - -/* libc style syscall names */ -const char *const altosf1_syscallnames[] = { - /* 0 */ "nosys", - /* 1 */ NULL, /* exit */ - /* 2 */ NULL, /* fork */ - /* 3 */ NULL, /* read */ - /* 4 */ NULL, /* write */ - /* 5 */ NULL, /* unimplemented old open */ - /* 6 */ NULL, /* close */ - /* 7 */ NULL, /* wait4 */ - /* 8 */ NULL, /* unimplemented old creat */ - /* 9 */ NULL, /* link */ - /* 10 */ NULL, /* unlink */ - /* 11 */ NULL, /* unimplemented execv */ - /* 12 */ NULL, /* chdir */ - /* 13 */ NULL, /* fchdir */ - /* 14 */ NULL, /* mknod */ - /* 15 */ NULL, /* chmod */ - /* 16 */ NULL, /* __posix_chown */ - /* 17 */ NULL, /* obreak */ - /* 18 */ NULL, /* getfsstat */ - /* 19 */ NULL, /* lseek */ - /* 20 */ NULL, /* getpid_with_ppid */ - /* 21 */ NULL, /* mount */ - /* 22 */ NULL, /* unmount */ - /* 23 */ NULL, /* setuid */ - /* 24 */ NULL, /* getuid_with_euid */ - /* 25 */ NULL, /* unimplemented exec_with_loader */ - /* 26 */ NULL, /* unimplemented ptrace */ - /* 27 */ NULL, /* recvmsg_xopen */ - /* 28 */ NULL, /* sendmsg_xopen */ - /* 29 */ NULL, /* unimplemented recvfrom */ - /* 30 */ NULL, /* unimplemented accept */ - /* 31 */ NULL, /* unimplemented getpeername */ - /* 32 */ NULL, /* unimplemented getsockname */ - /* 33 */ NULL, /* access */ - /* 34 */ NULL, /* unimplemented chflags */ - /* 35 */ NULL, /* unimplemented fchflags */ - /* 36 */ NULL, /* sync */ - /* 37 */ NULL, /* kill */ - /* 38 */ NULL, /* unimplemented old stat */ - /* 39 */ NULL, /* setpgid */ - /* 40 */ NULL, /* unimplemented old lstat */ - /* 41 */ NULL, /* dup */ - /* 42 */ NULL, /* pipe */ - /* 43 */ NULL, /* set_program_attributes */ - /* 44 */ NULL, /* unimplemented profil */ - /* 45 */ NULL, /* open */ - /* 46 */ NULL, /* obsolete sigaction */ - /* 47 */ NULL, /* getgid_with_egid */ - /* 48 */ NULL, /* sigprocmask */ - /* 49 */ NULL, /* __getlogin */ - /* 50 */ NULL, /* __setlogin */ - /* 51 */ NULL, /* acct */ - /* 52 */ NULL, /* unimplemented sigpending */ - /* 53 */ NULL, /* classcntl */ - /* 54 */ NULL, /* ioctl */ - /* 55 */ NULL, /* reboot */ - /* 56 */ NULL, /* revoke */ - /* 57 */ NULL, /* symlink */ - /* 58 */ NULL, /* readlink */ - /* 59 */ NULL, /* execve */ - /* 60 */ NULL, /* umask */ - /* 61 */ NULL, /* chroot */ - /* 62 */ NULL, /* unimplemented old fstat */ - /* 63 */ NULL, /* getpgrp */ - /* 64 */ NULL, /* getpagesize */ - /* 65 */ NULL, /* unimplemented mremap */ - /* 66 */ NULL, /* vfork */ - /* 67 */ NULL, /* stat */ - /* 68 */ NULL, /* lstat */ - /* 69 */ NULL, /* unimplemented sbrk */ - /* 70 */ NULL, /* unimplemented sstk */ - /* 71 */ NULL, /* mmap */ - /* 72 */ NULL, /* unimplemented ovadvise */ - /* 73 */ NULL, /* munmap */ - /* 74 */ NULL, /* mprotect */ - /* 75 */ NULL, /* madvise */ - /* 76 */ NULL, /* unimplemented old vhangup */ - /* 77 */ NULL, /* unimplemented kmodcall */ - /* 78 */ NULL, /* unimplemented mincore */ - /* 79 */ NULL, /* getgroups */ - /* 80 */ NULL, /* setgroups */ - /* 81 */ NULL, /* unimplemented old getpgrp */ - /* 82 */ "setpgid", - /* 83 */ NULL, /* setitimer */ - /* 84 */ NULL, /* unimplemented old wait */ - /* 85 */ NULL, /* unimplemented table */ - /* 86 */ NULL, /* getitimer */ - /* 87 */ NULL, /* gethostname */ - /* 88 */ NULL, /* sethostname */ - /* 89 */ NULL, /* getdtablesize */ - /* 90 */ NULL, /* dup2 */ - /* 91 */ NULL, /* fstat */ - /* 92 */ NULL, /* fcntl */ - /* 93 */ NULL, /* select */ - /* 94 */ NULL, /* poll */ - /* 95 */ NULL, /* fsync */ - /* 96 */ NULL, /* setpriority */ - /* 97 */ NULL, /* socket */ - /* 98 */ NULL, /* connect */ - /* 99 */ NULL, /* accept */ - /* 100 */ NULL, /* getpriority */ - /* 101 */ NULL, /* send */ - /* 102 */ NULL, /* recv */ - /* 103 */ NULL, /* sigreturn */ - /* 104 */ NULL, /* bind */ - /* 105 */ NULL, /* setsockopt */ - /* 106 */ NULL, /* listen */ - /* 107 */ NULL, /* unimplemented plock */ - /* 108 */ NULL, /* unimplemented old sigvec */ - /* 109 */ NULL, /* unimplemented old sigblock */ - /* 110 */ NULL, /* unimplemented old sigsetmask */ - /* 111 */ NULL, /* sigsuspend */ - /* 112 */ NULL, /* sigstack */ - /* 113 */ NULL, /* unimplemented old recvmsg */ - /* 114 */ NULL, /* unimplemented old sendmsg */ - /* 115 */ NULL, /* obsolete vtrace */ - /* 116 */ NULL, /* gettimeofday */ - /* 117 */ NULL, /* getrusage */ - /* 118 */ NULL, /* getsockopt */ - /* 119 */ NULL, /* unimplemented */ - /* 120 */ NULL, /* readv */ - /* 121 */ NULL, /* writev */ - /* 122 */ NULL, /* settimeofday */ - /* 123 */ NULL, /* __posix_fchown */ - /* 124 */ NULL, /* fchmod */ - /* 125 */ NULL, /* recvfrom */ - /* 126 */ NULL, /* setreuid */ - /* 127 */ NULL, /* setregid */ - /* 128 */ NULL, /* __posix_rename */ - /* 129 */ NULL, /* truncate */ - /* 130 */ NULL, /* ftruncate */ - /* 131 */ NULL, /* flock */ - /* 132 */ NULL, /* setgid */ - /* 133 */ NULL, /* sendto */ - /* 134 */ NULL, /* shutdown */ - /* 135 */ NULL, /* socketpair */ - /* 136 */ NULL, /* mkdir */ - /* 137 */ NULL, /* rmdir */ - /* 138 */ NULL, /* utimes */ - /* 139 */ NULL, /* obsolete 4.2 sigreturn */ - /* 140 */ NULL, /* unimplemented adjtime */ - /* 141 */ NULL, /* getpeername */ - /* 142 */ NULL, /* gethostid */ - /* 143 */ NULL, /* sethostid */ - /* 144 */ NULL, /* getrlimit */ - /* 145 */ NULL, /* setrlimit */ - /* 146 */ NULL, /* unimplemented old killpg */ - /* 147 */ NULL, /* setsid */ - /* 148 */ NULL, /* unimplemented quotactl */ - /* 149 */ NULL, /* quota */ - /* 150 */ NULL, /* getsockname */ - /* 151 */ NULL, /* unimplemented pread */ - /* 152 */ NULL, /* unimplemented pwrite */ - /* 153 */ NULL, /* unimplemented pid_block */ - /* 154 */ NULL, /* unimplemented pid_unblock */ - /* 155 */ NULL, /* unimplemented signal_urti */ - /* 156 */ NULL, /* sigaction */ - /* 157 */ NULL, /* unimplemented sigwaitprim */ - /* 158 */ NULL, /* unimplemented nfssvc */ - /* 159 */ NULL, /* getdirentries */ - /* 160 */ NULL, /* statfs */ - /* 161 */ NULL, /* fstatfs */ - /* 162 */ NULL, /* unimplemented */ - /* 163 */ NULL, /* unimplemented async_daemon */ - /* 164 */ NULL, /* unimplemented getfh */ - /* 165 */ NULL, /* getdomainname */ - /* 166 */ NULL, /* setdomainname */ - /* 167 */ NULL, /* unimplemented */ - /* 168 */ NULL, /* unimplemented */ - /* 169 */ NULL, /* unimplemented exportfs */ - /* 170 */ NULL, /* unimplemented */ - /* 171 */ NULL, /* unimplemented */ - /* 172 */ NULL, /* unimplemented alt msgctl */ - /* 173 */ NULL, /* unimplemented alt msgget */ - /* 174 */ NULL, /* unimplemented alt msgrcv */ - /* 175 */ NULL, /* unimplemented alt msgsnd */ - /* 176 */ NULL, /* unimplemented alt semctl */ - /* 177 */ NULL, /* unimplemented alt semget */ - /* 178 */ NULL, /* unimplemented alt semop */ - /* 179 */ NULL, /* unimplemented alt uname */ - /* 180 */ NULL, /* unimplemented */ - /* 181 */ NULL, /* unimplemented alt plock */ - /* 182 */ NULL, /* unimplemented lockf */ - /* 183 */ NULL, /* unimplemented */ - /* 184 */ NULL, /* unimplemented getmnt */ - /* 185 */ NULL, /* unimplemented */ - /* 186 */ NULL, /* unimplemented unmount */ - /* 187 */ NULL, /* unimplemented alt sigpending */ - /* 188 */ NULL, /* unimplemented alt setsid */ - /* 189 */ NULL, /* unimplemented */ - /* 190 */ NULL, /* unimplemented */ - /* 191 */ NULL, /* unimplemented */ - /* 192 */ NULL, /* unimplemented */ - /* 193 */ NULL, /* unimplemented */ - /* 194 */ NULL, /* unimplemented */ - /* 195 */ NULL, /* unimplemented */ - /* 196 */ NULL, /* unimplemented */ - /* 197 */ NULL, /* unimplemented */ - /* 198 */ NULL, /* unimplemented */ - /* 199 */ NULL, /* unimplemented swapon */ - /* 200 */ NULL, /* unimplemented msgctl */ - /* 201 */ NULL, /* unimplemented msgget */ - /* 202 */ NULL, /* unimplemented msgrcv */ - /* 203 */ NULL, /* unimplemented msgsnd */ - /* 204 */ NULL, /* unimplemented semctl */ - /* 205 */ NULL, /* unimplemented semget */ - /* 206 */ NULL, /* unimplemented semop */ - /* 207 */ NULL, /* uname */ - /* 208 */ NULL, /* __posix_lchown */ - /* 209 */ NULL, /* shmat */ - /* 210 */ NULL, /* shmctl */ - /* 211 */ NULL, /* shmdt */ - /* 212 */ NULL, /* shmget */ - /* 213 */ NULL, /* unimplemented mvalid */ - /* 214 */ NULL, /* unimplemented getaddressconf */ - /* 215 */ NULL, /* unimplemented msleep */ - /* 216 */ NULL, /* unimplemented mwakeup */ - /* 217 */ NULL, /* unimplemented msync */ - /* 218 */ NULL, /* unimplemented signal */ - /* 219 */ NULL, /* unimplemented utc gettime */ - /* 220 */ NULL, /* unimplemented utc adjtime */ - /* 221 */ NULL, /* unimplemented */ - /* 222 */ NULL, /* unimplemented security */ - /* 223 */ NULL, /* unimplemented kloadcall */ - /* 224 */ NULL, /* stat2 */ - /* 225 */ NULL, /* lstat2 */ - /* 226 */ NULL, /* fstat2 */ - /* 227 */ NULL, /* unimplemented statfs2 */ - /* 228 */ NULL, /* unimplemented fstatfs2 */ - /* 229 */ NULL, /* unimplemented getfsstat2 */ - /* 230 */ NULL, /* unimplemented */ - /* 231 */ NULL, /* unimplemented */ - /* 232 */ NULL, /* unimplemented */ - /* 233 */ NULL, /* getpgid */ - /* 234 */ NULL, /* getsid */ - /* 235 */ NULL, /* sigaltstack */ - /* 236 */ NULL, /* unimplemented waitid */ - /* 237 */ NULL, /* unimplemented priocntlset */ - /* 238 */ NULL, /* unimplemented sigsendset */ - /* 239 */ NULL, /* unimplemented set_speculative */ - /* 240 */ NULL, /* unimplemented msfs_syscall */ - /* 241 */ NULL, /* sysinfo */ - /* 242 */ NULL, /* unimplemented uadmin */ - /* 243 */ NULL, /* unimplemented fuser */ - /* 244 */ NULL, /* unimplemented proplist_syscall */ - /* 245 */ NULL, /* unimplemented ntp_adjtime */ - /* 246 */ NULL, /* unimplemented ntp_gettime */ - /* 247 */ NULL, /* pathconf */ - /* 248 */ NULL, /* fpathconf */ - /* 249 */ NULL, /* unimplemented */ - /* 250 */ NULL, /* unimplemented uswitch */ - /* 251 */ NULL, /* usleep_thread */ - /* 252 */ NULL, /* unimplemented audcntl */ - /* 253 */ NULL, /* unimplemented audgen */ - /* 254 */ NULL, /* unimplemented sysfs */ - /* 255 */ NULL, /* unimplemented subsys_info */ - /* 256 */ NULL, /* getsysinfo */ - /* 257 */ NULL, /* setsysinfo */ - /* 258 */ NULL, /* unimplemented afs_syscall */ - /* 259 */ NULL, /* unimplemented swapctl */ - /* 260 */ NULL, /* unimplemented memcntl */ - /* 261 */ NULL, /* unimplemented fdatasync */ - /* 262 */ NULL, /* unimplemented oflock */ - /* 263 */ NULL, /* unimplemented _F64_readv */ - /* 264 */ NULL, /* unimplemented _F64_writev */ - /* 265 */ NULL, /* unimplemented cdslxlate */ - /* 266 */ NULL, /* unimplemented sendfile */ - /* 267 */ NULL, /* filler */ - /* 268 */ NULL, /* filler */ - /* 269 */ NULL, /* filler */ - /* 270 */ NULL, /* filler */ - /* 271 */ NULL, /* filler */ - /* 272 */ NULL, /* filler */ - /* 273 */ NULL, /* filler */ - /* 274 */ NULL, /* filler */ - /* 275 */ NULL, /* filler */ - /* 276 */ NULL, /* filler */ - /* 277 */ NULL, /* filler */ - /* 278 */ NULL, /* filler */ - /* 279 */ NULL, /* filler */ - /* 280 */ NULL, /* filler */ - /* 281 */ NULL, /* filler */ - /* 282 */ NULL, /* filler */ - /* 283 */ NULL, /* filler */ - /* 284 */ NULL, /* filler */ - /* 285 */ NULL, /* filler */ - /* 286 */ NULL, /* filler */ - /* 287 */ NULL, /* filler */ - /* 288 */ NULL, /* filler */ - /* 289 */ NULL, /* filler */ - /* 290 */ NULL, /* filler */ - /* 291 */ NULL, /* filler */ - /* 292 */ NULL, /* filler */ - /* 293 */ NULL, /* filler */ - /* 294 */ NULL, /* filler */ - /* 295 */ NULL, /* filler */ - /* 296 */ NULL, /* filler */ - /* 297 */ NULL, /* filler */ - /* 298 */ NULL, /* filler */ - /* 299 */ NULL, /* filler */ - /* 300 */ NULL, /* filler */ - /* 301 */ NULL, /* filler */ - /* 302 */ NULL, /* filler */ - /* 303 */ NULL, /* filler */ - /* 304 */ NULL, /* filler */ - /* 305 */ NULL, /* filler */ - /* 306 */ NULL, /* filler */ - /* 307 */ NULL, /* filler */ - /* 308 */ NULL, /* filler */ - /* 309 */ NULL, /* filler */ - /* 310 */ NULL, /* filler */ - /* 311 */ NULL, /* filler */ - /* 312 */ NULL, /* filler */ - /* 313 */ NULL, /* filler */ - /* 314 */ NULL, /* filler */ - /* 315 */ NULL, /* filler */ - /* 316 */ NULL, /* filler */ - /* 317 */ NULL, /* filler */ - /* 318 */ NULL, /* filler */ - /* 319 */ NULL, /* filler */ - /* 320 */ NULL, /* filler */ - /* 321 */ NULL, /* filler */ - /* 322 */ NULL, /* filler */ - /* 323 */ NULL, /* filler */ - /* 324 */ NULL, /* filler */ - /* 325 */ NULL, /* filler */ - /* 326 */ NULL, /* filler */ - /* 327 */ NULL, /* filler */ - /* 328 */ NULL, /* filler */ - /* 329 */ NULL, /* filler */ - /* 330 */ NULL, /* filler */ - /* 331 */ NULL, /* filler */ - /* 332 */ NULL, /* filler */ - /* 333 */ NULL, /* filler */ - /* 334 */ NULL, /* filler */ - /* 335 */ NULL, /* filler */ - /* 336 */ NULL, /* filler */ - /* 337 */ NULL, /* filler */ - /* 338 */ NULL, /* filler */ - /* 339 */ NULL, /* filler */ - /* 340 */ NULL, /* filler */ - /* 341 */ NULL, /* filler */ - /* 342 */ NULL, /* filler */ - /* 343 */ NULL, /* filler */ - /* 344 */ NULL, /* filler */ - /* 345 */ NULL, /* filler */ - /* 346 */ NULL, /* filler */ - /* 347 */ NULL, /* filler */ - /* 348 */ NULL, /* filler */ - /* 349 */ NULL, /* filler */ - /* 350 */ NULL, /* filler */ - /* 351 */ NULL, /* filler */ - /* 352 */ NULL, /* filler */ - /* 353 */ NULL, /* filler */ - /* 354 */ NULL, /* filler */ - /* 355 */ NULL, /* filler */ - /* 356 */ NULL, /* filler */ - /* 357 */ NULL, /* filler */ - /* 358 */ NULL, /* filler */ - /* 359 */ NULL, /* filler */ - /* 360 */ NULL, /* filler */ - /* 361 */ NULL, /* filler */ - /* 362 */ NULL, /* filler */ - /* 363 */ NULL, /* filler */ - /* 364 */ NULL, /* filler */ - /* 365 */ NULL, /* filler */ - /* 366 */ NULL, /* filler */ - /* 367 */ NULL, /* filler */ - /* 368 */ NULL, /* filler */ - /* 369 */ NULL, /* filler */ - /* 370 */ NULL, /* filler */ - /* 371 */ NULL, /* filler */ - /* 372 */ NULL, /* filler */ - /* 373 */ NULL, /* filler */ - /* 374 */ NULL, /* filler */ - /* 375 */ NULL, /* filler */ - /* 376 */ NULL, /* filler */ - /* 377 */ NULL, /* filler */ - /* 378 */ NULL, /* filler */ - /* 379 */ NULL, /* filler */ - /* 380 */ NULL, /* filler */ - /* 381 */ NULL, /* filler */ - /* 382 */ NULL, /* filler */ - /* 383 */ NULL, /* filler */ - /* 384 */ NULL, /* filler */ - /* 385 */ NULL, /* filler */ - /* 386 */ NULL, /* filler */ - /* 387 */ NULL, /* filler */ - /* 388 */ NULL, /* filler */ - /* 389 */ NULL, /* filler */ - /* 390 */ NULL, /* filler */ - /* 391 */ NULL, /* filler */ - /* 392 */ NULL, /* filler */ - /* 393 */ NULL, /* filler */ - /* 394 */ NULL, /* filler */ - /* 395 */ NULL, /* filler */ - /* 396 */ NULL, /* filler */ - /* 397 */ NULL, /* filler */ - /* 398 */ NULL, /* filler */ - /* 399 */ NULL, /* filler */ - /* 400 */ NULL, /* filler */ - /* 401 */ NULL, /* filler */ - /* 402 */ NULL, /* filler */ - /* 403 */ NULL, /* filler */ - /* 404 */ NULL, /* filler */ - /* 405 */ NULL, /* filler */ - /* 406 */ NULL, /* filler */ - /* 407 */ NULL, /* filler */ - /* 408 */ NULL, /* filler */ - /* 409 */ NULL, /* filler */ - /* 410 */ NULL, /* filler */ - /* 411 */ NULL, /* filler */ - /* 412 */ NULL, /* filler */ - /* 413 */ NULL, /* filler */ - /* 414 */ NULL, /* filler */ - /* 415 */ NULL, /* filler */ - /* 416 */ NULL, /* filler */ - /* 417 */ NULL, /* filler */ - /* 418 */ NULL, /* filler */ - /* 419 */ NULL, /* filler */ - /* 420 */ NULL, /* filler */ - /* 421 */ NULL, /* filler */ - /* 422 */ NULL, /* filler */ - /* 423 */ NULL, /* filler */ - /* 424 */ NULL, /* filler */ - /* 425 */ NULL, /* filler */ - /* 426 */ NULL, /* filler */ - /* 427 */ NULL, /* filler */ - /* 428 */ NULL, /* filler */ - /* 429 */ NULL, /* filler */ - /* 430 */ NULL, /* filler */ - /* 431 */ NULL, /* filler */ - /* 432 */ NULL, /* filler */ - /* 433 */ NULL, /* filler */ - /* 434 */ NULL, /* filler */ - /* 435 */ NULL, /* filler */ - /* 436 */ NULL, /* filler */ - /* 437 */ NULL, /* filler */ - /* 438 */ NULL, /* filler */ - /* 439 */ NULL, /* filler */ - /* 440 */ NULL, /* filler */ - /* 441 */ NULL, /* filler */ - /* 442 */ NULL, /* filler */ - /* 443 */ NULL, /* filler */ - /* 444 */ NULL, /* filler */ - /* 445 */ NULL, /* filler */ - /* 446 */ NULL, /* filler */ - /* 447 */ NULL, /* filler */ - /* 448 */ NULL, /* filler */ - /* 449 */ NULL, /* filler */ - /* 450 */ NULL, /* filler */ - /* 451 */ NULL, /* filler */ - /* 452 */ NULL, /* filler */ - /* 453 */ NULL, /* filler */ - /* 454 */ NULL, /* filler */ - /* 455 */ NULL, /* filler */ - /* 456 */ NULL, /* filler */ - /* 457 */ NULL, /* filler */ - /* 458 */ NULL, /* filler */ - /* 459 */ NULL, /* filler */ - /* 460 */ NULL, /* filler */ - /* 461 */ NULL, /* filler */ - /* 462 */ NULL, /* filler */ - /* 463 */ NULL, /* filler */ - /* 464 */ NULL, /* filler */ - /* 465 */ NULL, /* filler */ - /* 466 */ NULL, /* filler */ - /* 467 */ NULL, /* filler */ - /* 468 */ NULL, /* filler */ - /* 469 */ NULL, /* filler */ - /* 470 */ NULL, /* filler */ - /* 471 */ NULL, /* filler */ - /* 472 */ NULL, /* filler */ - /* 473 */ NULL, /* filler */ - /* 474 */ NULL, /* filler */ - /* 475 */ NULL, /* filler */ - /* 476 */ NULL, /* filler */ - /* 477 */ NULL, /* filler */ - /* 478 */ NULL, /* filler */ - /* 479 */ NULL, /* filler */ - /* 480 */ NULL, /* filler */ - /* 481 */ NULL, /* filler */ - /* 482 */ NULL, /* filler */ - /* 483 */ NULL, /* filler */ - /* 484 */ NULL, /* filler */ - /* 485 */ NULL, /* filler */ - /* 486 */ NULL, /* filler */ - /* 487 */ NULL, /* filler */ - /* 488 */ NULL, /* filler */ - /* 489 */ NULL, /* filler */ - /* 490 */ NULL, /* filler */ - /* 491 */ NULL, /* filler */ - /* 492 */ NULL, /* filler */ - /* 493 */ NULL, /* filler */ - /* 494 */ NULL, /* filler */ - /* 495 */ NULL, /* filler */ - /* 496 */ NULL, /* filler */ - /* 497 */ NULL, /* filler */ - /* 498 */ NULL, /* filler */ - /* 499 */ NULL, /* filler */ - /* 500 */ NULL, /* filler */ - /* 501 */ NULL, /* filler */ - /* 502 */ NULL, /* filler */ - /* 503 */ NULL, /* filler */ - /* 504 */ NULL, /* filler */ - /* 505 */ NULL, /* filler */ - /* 506 */ NULL, /* filler */ - /* 507 */ NULL, /* filler */ - /* 508 */ NULL, /* filler */ - /* 509 */ NULL, /* filler */ - /* 510 */ NULL, /* filler */ - /* 511 */ NULL, /* filler */ -}; diff --git a/sys/compat/osf1/osf1_sysent.c b/sys/compat/osf1/osf1_sysent.c deleted file mode 100644 index 6c86d6caa612..000000000000 --- a/sys/compat/osf1/osf1_sysent.c +++ /dev/null @@ -1,1798 +0,0 @@ -/* $NetBSD: osf1_sysent.c,v 1.68 2018/08/10 21:47:15 pgoyette Exp $ */ - -/* - * System call switch table. - * - * DO NOT EDIT-- this file is automatically generated. - * created from NetBSD: syscalls.master,v 1.49 2013/11/07 19:37:19 njoly Exp - */ - -#include -__KERNEL_RCSID(0, "$NetBSD: osf1_sysent.c,v 1.68 2018/08/10 21:47:15 pgoyette Exp $"); - -#if defined(_KERNEL_OPT) -#include "opt_compat_43.h" -#endif -#include -#include -#include -#include -#include -#include -#include -#include - -#define s(type) sizeof(type) -#define n(type) (sizeof(type)/sizeof (register_t)) -#define ns(type) .sy_narg = n(type), .sy_argsize = s(type) - -struct sysent osf1_sysent[] = { - { - .sy_call = (sy_call_t *)sys_nosys - }, /* 0 = syscall */ - { - ns(struct sys_exit_args), - .sy_call = (sy_call_t *)sys_exit - }, /* 1 = exit */ - { - .sy_call = (sy_call_t *)sys_fork - }, /* 2 = fork */ - { - ns(struct sys_read_args), - .sy_flags = SYCALL_ARG_PTR, - .sy_call = (sy_call_t *)sys_read - }, /* 3 = read */ - { - ns(struct sys_write_args), - .sy_flags = SYCALL_ARG_PTR, - .sy_call = (sy_call_t *)sys_write - }, /* 4 = write */ - { - .sy_call = sys_nosys, - }, /* 5 = filler */ - { - ns(struct sys_close_args), - .sy_call = (sy_call_t *)sys_close - }, /* 6 = close */ - { - ns(struct osf1_sys_wait4_args), - .sy_flags = SYCALL_ARG_PTR, - .sy_call = (sy_call_t *)osf1_sys_wait4 - }, /* 7 = wait4 */ - { - .sy_call = sys_nosys, - }, /* 8 = filler */ - { - ns(struct sys_link_args), - .sy_flags = SYCALL_ARG_PTR, - .sy_call = (sy_call_t *)sys_link - }, /* 9 = link */ - { - ns(struct sys_unlink_args), - .sy_flags = SYCALL_ARG_PTR, - .sy_call = (sy_call_t *)sys_unlink - }, /* 10 = unlink */ - { - .sy_call = sys_nosys, - }, /* 11 = filler */ - { - ns(struct sys_chdir_args), - .sy_flags = SYCALL_ARG_PTR, - .sy_call = (sy_call_t *)sys_chdir - }, /* 12 = chdir */ - { - ns(struct sys_fchdir_args), - .sy_call = (sy_call_t *)sys_fchdir - }, /* 13 = fchdir */ - { - ns(struct osf1_sys_mknod_args), - .sy_flags = SYCALL_ARG_PTR, - .sy_call = (sy_call_t *)osf1_sys_mknod - }, /* 14 = mknod */ - { - ns(struct sys_chmod_args), - .sy_flags = SYCALL_ARG_PTR, - .sy_call = (sy_call_t *)sys_chmod - }, /* 15 = chmod */ - { - ns(struct sys___posix_chown_args), - .sy_flags = SYCALL_ARG_PTR, - .sy_call = (sy_call_t *)sys___posix_chown - }, /* 16 = __posix_chown */ - { - ns(struct sys_obreak_args), - .sy_flags = SYCALL_ARG_PTR, - .sy_call = (sy_call_t *)sys_obreak - }, /* 17 = obreak */ - { - ns(struct osf1_sys_getfsstat_args), - .sy_flags = SYCALL_ARG_PTR, - .sy_call = (sy_call_t *)osf1_sys_getfsstat - }, /* 18 = getfsstat */ - { - ns(struct osf1_sys_lseek_args), - .sy_flags = SYCALL_NARGS64_VAL(1) | SYCALL_ARG1_64 | SYCALL_RET_64, - .sy_call = (sy_call_t *)osf1_sys_lseek - }, /* 19 = lseek */ - { - .sy_call = (sy_call_t *)sys_getpid_with_ppid - }, /* 20 = getpid_with_ppid */ - { - ns(struct osf1_sys_mount_args), - .sy_flags = SYCALL_ARG_PTR, - .sy_call = (sy_call_t *)osf1_sys_mount - }, /* 21 = mount */ - { - ns(struct osf1_sys_unmount_args), - .sy_flags = SYCALL_ARG_PTR, - .sy_call = (sy_call_t *)osf1_sys_unmount - }, /* 22 = unmount */ - { - ns(struct osf1_sys_setuid_args), - .sy_call = (sy_call_t *)osf1_sys_setuid - }, /* 23 = setuid */ - { - .sy_call = (sy_call_t *)sys_getuid_with_euid - }, /* 24 = getuid_with_euid */ - { - .sy_call = sys_nosys, - }, /* 25 = filler */ - { - .sy_call = sys_nosys, - }, /* 26 = filler */ - { - ns(struct osf1_sys_recvmsg_xopen_args), - .sy_flags = SYCALL_ARG_PTR, - .sy_call = (sy_call_t *)osf1_sys_recvmsg_xopen - }, /* 27 = recvmsg_xopen */ - { - ns(struct osf1_sys_sendmsg_xopen_args), - .sy_flags = SYCALL_ARG_PTR, - .sy_call = (sy_call_t *)osf1_sys_sendmsg_xopen - }, /* 28 = sendmsg_xopen */ - { - .sy_call = sys_nosys, - }, /* 29 = filler */ - { - .sy_call = sys_nosys, - }, /* 30 = filler */ - { - .sy_call = sys_nosys, - }, /* 31 = filler */ - { - .sy_call = sys_nosys, - }, /* 32 = filler */ - { - ns(struct osf1_sys_access_args), - .sy_flags = SYCALL_ARG_PTR, - .sy_call = (sy_call_t *)osf1_sys_access - }, /* 33 = access */ - { - .sy_call = sys_nosys, - }, /* 34 = filler */ - { - .sy_call = sys_nosys, - }, /* 35 = filler */ - { - .sy_call = (sy_call_t *)sys_sync - }, /* 36 = sync */ - { - ns(struct sys_kill_args), - .sy_call = (sy_call_t *)sys_kill - }, /* 37 = kill */ - { - .sy_call = sys_nosys, - }, /* 38 = filler */ - { - ns(struct sys_setpgid_args), - .sy_call = (sy_call_t *)sys_setpgid - }, /* 39 = setpgid */ - { - .sy_call = sys_nosys, - }, /* 40 = filler */ - { - ns(struct sys_dup_args), - .sy_call = (sy_call_t *)sys_dup - }, /* 41 = dup */ - { - .sy_call = (sy_call_t *)sys_pipe - }, /* 42 = pipe */ - { - ns(struct osf1_sys_set_program_attributes_args), - .sy_flags = SYCALL_ARG_PTR, - .sy_call = (sy_call_t *)osf1_sys_set_program_attributes - }, /* 43 = set_program_attributes */ - { - .sy_call = sys_nosys, - }, /* 44 = filler */ - { - ns(struct osf1_sys_open_args), - .sy_flags = SYCALL_ARG_PTR, - .sy_call = (sy_call_t *)osf1_sys_open - }, /* 45 = open */ - { - .sy_call = sys_nosys, - }, /* 46 = filler */ - { - .sy_call = (sy_call_t *)sys_getgid_with_egid - }, /* 47 = getgid_with_egid */ - { - ns(struct compat_13_sys_sigprocmask_args), - .sy_call = (sy_call_t *)compat_13_sys_sigprocmask - }, /* 48 = sigprocmask */ - { - ns(struct sys___getlogin_args), - .sy_flags = SYCALL_ARG_PTR, - .sy_call = (sy_call_t *)sys___getlogin - }, /* 49 = __getlogin */ - { - ns(struct sys___setlogin_args), - .sy_flags = SYCALL_ARG_PTR, - .sy_call = (sy_call_t *)sys___setlogin - }, /* 50 = __setlogin */ - { - ns(struct sys_acct_args), - .sy_flags = SYCALL_ARG_PTR, - .sy_call = (sy_call_t *)sys_acct - }, /* 51 = acct */ - { - .sy_call = sys_nosys, - }, /* 52 = filler */ - { - ns(struct osf1_sys_classcntl_args), - .sy_call = (sy_call_t *)osf1_sys_classcntl - }, /* 53 = classcntl */ - { - ns(struct osf1_sys_ioctl_args), - .sy_flags = SYCALL_ARG_PTR, - .sy_call = (sy_call_t *)osf1_sys_ioctl - }, /* 54 = ioctl */ - { - ns(struct osf1_sys_reboot_args), - .sy_call = (sy_call_t *)osf1_sys_reboot - }, /* 55 = reboot */ - { - ns(struct sys_revoke_args), - .sy_flags = SYCALL_ARG_PTR, - .sy_call = (sy_call_t *)sys_revoke - }, /* 56 = revoke */ - { - ns(struct sys_symlink_args), - .sy_flags = SYCALL_ARG_PTR, - .sy_call = (sy_call_t *)sys_symlink - }, /* 57 = symlink */ - { - ns(struct sys_readlink_args), - .sy_flags = SYCALL_ARG_PTR, - .sy_call = (sy_call_t *)sys_readlink - }, /* 58 = readlink */ - { - ns(struct osf1_sys_execve_args), - .sy_flags = SYCALL_ARG_PTR, - .sy_call = (sy_call_t *)osf1_sys_execve - }, /* 59 = execve */ - { - ns(struct sys_umask_args), - .sy_call = (sy_call_t *)sys_umask - }, /* 60 = umask */ - { - ns(struct sys_chroot_args), - .sy_flags = SYCALL_ARG_PTR, - .sy_call = (sy_call_t *)sys_chroot - }, /* 61 = chroot */ - { - .sy_call = sys_nosys, - }, /* 62 = filler */ - { - .sy_call = (sy_call_t *)sys_getpgrp - }, /* 63 = getpgrp */ - { - .sy_call = (sy_call_t *)compat_43_sys_getpagesize - }, /* 64 = getpagesize */ - { - .sy_call = sys_nosys, - }, /* 65 = filler */ - { - .sy_call = (sy_call_t *)sys_vfork - }, /* 66 = vfork */ - { - ns(struct osf1_sys_stat_args), - .sy_flags = SYCALL_ARG_PTR, - .sy_call = (sy_call_t *)osf1_sys_stat - }, /* 67 = stat */ - { - ns(struct osf1_sys_lstat_args), - .sy_flags = SYCALL_ARG_PTR, - .sy_call = (sy_call_t *)osf1_sys_lstat - }, /* 68 = lstat */ - { - .sy_call = sys_nosys, - }, /* 69 = filler */ - { - .sy_call = sys_nosys, - }, /* 70 = filler */ - { - ns(struct osf1_sys_mmap_args), - .sy_flags = SYCALL_NARGS64_VAL(1) | SYCALL_ARG5_64 | SYCALL_ARG_PTR, - .sy_call = (sy_call_t *)osf1_sys_mmap - }, /* 71 = mmap */ - { - .sy_call = sys_nosys, - }, /* 72 = filler */ - { - ns(struct sys_munmap_args), - .sy_flags = SYCALL_ARG_PTR, - .sy_call = (sy_call_t *)sys_munmap - }, /* 73 = munmap */ - { - ns(struct osf1_sys_mprotect_args), - .sy_flags = SYCALL_ARG_PTR, - .sy_call = (sy_call_t *)osf1_sys_mprotect - }, /* 74 = mprotect */ - { - ns(struct osf1_sys_madvise_args), - .sy_flags = SYCALL_ARG_PTR, - .sy_call = (sy_call_t *)osf1_sys_madvise - }, /* 75 = madvise */ - { - .sy_call = sys_nosys, - }, /* 76 = filler */ - { - .sy_call = sys_nosys, - }, /* 77 = filler */ - { - .sy_call = sys_nosys, - }, /* 78 = filler */ - { - ns(struct sys_getgroups_args), - .sy_flags = SYCALL_ARG_PTR, - .sy_call = (sy_call_t *)sys_getgroups - }, /* 79 = getgroups */ - { - ns(struct sys_setgroups_args), - .sy_flags = SYCALL_ARG_PTR, - .sy_call = (sy_call_t *)sys_setgroups - }, /* 80 = setgroups */ - { - .sy_call = sys_nosys, - }, /* 81 = filler */ - { - ns(struct sys_setpgid_args), - .sy_call = (sy_call_t *)sys_setpgid - }, /* 82 = setpgrp */ - { - ns(struct osf1_sys_setitimer_args), - .sy_flags = SYCALL_ARG_PTR, - .sy_call = (sy_call_t *)osf1_sys_setitimer - }, /* 83 = setitimer */ - { - .sy_call = sys_nosys, - }, /* 84 = filler */ - { - .sy_call = sys_nosys, - }, /* 85 = filler */ - { - ns(struct osf1_sys_getitimer_args), - .sy_flags = SYCALL_ARG_PTR, - .sy_call = (sy_call_t *)osf1_sys_getitimer - }, /* 86 = getitimer */ - { - ns(struct compat_43_sys_gethostname_args), - .sy_flags = SYCALL_ARG_PTR, - .sy_call = (sy_call_t *)compat_43_sys_gethostname - }, /* 87 = gethostname */ - { - ns(struct compat_43_sys_sethostname_args), - .sy_flags = SYCALL_ARG_PTR, - .sy_call = (sy_call_t *)compat_43_sys_sethostname - }, /* 88 = sethostname */ - { - .sy_call = (sy_call_t *)compat_43_sys_getdtablesize - }, /* 89 = getdtablesize */ - { - ns(struct sys_dup2_args), - .sy_call = (sy_call_t *)sys_dup2 - }, /* 90 = dup2 */ - { - ns(struct osf1_sys_fstat_args), - .sy_flags = SYCALL_ARG_PTR, - .sy_call = (sy_call_t *)osf1_sys_fstat - }, /* 91 = fstat */ - { - ns(struct osf1_sys_fcntl_args), - .sy_flags = SYCALL_ARG_PTR, - .sy_call = (sy_call_t *)osf1_sys_fcntl - }, /* 92 = fcntl */ - { - ns(struct osf1_sys_select_args), - .sy_flags = SYCALL_ARG_PTR, - .sy_call = (sy_call_t *)osf1_sys_select - }, /* 93 = select */ - { - ns(struct sys_poll_args), - .sy_flags = SYCALL_ARG_PTR, - .sy_call = (sy_call_t *)sys_poll - }, /* 94 = poll */ - { - ns(struct sys_fsync_args), - .sy_call = (sy_call_t *)sys_fsync - }, /* 95 = fsync */ - { - ns(struct sys_setpriority_args), - .sy_call = (sy_call_t *)sys_setpriority - }, /* 96 = setpriority */ - { - ns(struct osf1_sys_socket_args), - .sy_call = (sy_call_t *)osf1_sys_socket - }, /* 97 = socket */ - { - ns(struct sys_connect_args), - .sy_flags = SYCALL_ARG_PTR, - .sy_call = (sy_call_t *)sys_connect - }, /* 98 = connect */ - { - ns(struct compat_43_sys_accept_args), - .sy_flags = SYCALL_ARG_PTR, - .sy_call = (sy_call_t *)compat_43_sys_accept - }, /* 99 = accept */ - { - ns(struct sys_getpriority_args), - .sy_call = (sy_call_t *)sys_getpriority - }, /* 100 = getpriority */ - { - ns(struct compat_43_sys_send_args), - .sy_flags = SYCALL_ARG_PTR, - .sy_call = (sy_call_t *)compat_43_sys_send - }, /* 101 = send */ - { - ns(struct compat_43_sys_recv_args), - .sy_flags = SYCALL_ARG_PTR, - .sy_call = (sy_call_t *)compat_43_sys_recv - }, /* 102 = recv */ - { - ns(struct compat_13_sys_sigreturn_args), - .sy_flags = SYCALL_ARG_PTR, - .sy_call = (sy_call_t *)compat_13_sys_sigreturn - }, /* 103 = sigreturn */ - { - ns(struct sys_bind_args), - .sy_flags = SYCALL_ARG_PTR, - .sy_call = (sy_call_t *)sys_bind - }, /* 104 = bind */ - { - ns(struct sys_setsockopt_args), - .sy_flags = SYCALL_ARG_PTR, - .sy_call = (sy_call_t *)sys_setsockopt - }, /* 105 = setsockopt */ - { - ns(struct sys_listen_args), - .sy_call = (sy_call_t *)sys_listen - }, /* 106 = listen */ - { - .sy_call = sys_nosys, - }, /* 107 = filler */ - { - .sy_call = sys_nosys, - }, /* 108 = filler */ - { - .sy_call = sys_nosys, - }, /* 109 = filler */ - { - .sy_call = sys_nosys, - }, /* 110 = filler */ - { - ns(struct compat_13_sys_sigsuspend_args), - .sy_call = (sy_call_t *)compat_13_sys_sigsuspend - }, /* 111 = sigsuspend */ - { - ns(struct compat_43_sys_sigstack_args), - .sy_flags = SYCALL_ARG_PTR, - .sy_call = (sy_call_t *)compat_43_sys_sigstack - }, /* 112 = sigstack */ - { - .sy_call = sys_nosys, - }, /* 113 = filler */ - { - .sy_call = sys_nosys, - }, /* 114 = filler */ - { - .sy_call = sys_nosys, - }, /* 115 = filler */ - { - ns(struct osf1_sys_gettimeofday_args), - .sy_flags = SYCALL_ARG_PTR, - .sy_call = (sy_call_t *)osf1_sys_gettimeofday - }, /* 116 = gettimeofday */ - { - ns(struct osf1_sys_getrusage_args), - .sy_flags = SYCALL_ARG_PTR, - .sy_call = (sy_call_t *)osf1_sys_getrusage - }, /* 117 = getrusage */ - { - ns(struct sys_getsockopt_args), - .sy_flags = SYCALL_ARG_PTR, - .sy_call = (sy_call_t *)sys_getsockopt - }, /* 118 = getsockopt */ - { - .sy_call = sys_nosys, - }, /* 119 = filler */ - { - ns(struct osf1_sys_readv_args), - .sy_flags = SYCALL_ARG_PTR, - .sy_call = (sy_call_t *)osf1_sys_readv - }, /* 120 = readv */ - { - ns(struct osf1_sys_writev_args), - .sy_flags = SYCALL_ARG_PTR, - .sy_call = (sy_call_t *)osf1_sys_writev - }, /* 121 = writev */ - { - ns(struct osf1_sys_settimeofday_args), - .sy_flags = SYCALL_ARG_PTR, - .sy_call = (sy_call_t *)osf1_sys_settimeofday - }, /* 122 = settimeofday */ - { - ns(struct sys___posix_fchown_args), - .sy_call = (sy_call_t *)sys___posix_fchown - }, /* 123 = __posix_fchown */ - { - ns(struct sys_fchmod_args), - .sy_call = (sy_call_t *)sys_fchmod - }, /* 124 = fchmod */ - { - ns(struct compat_43_sys_recvfrom_args), - .sy_flags = SYCALL_ARG_PTR, - .sy_call = (sy_call_t *)compat_43_sys_recvfrom - }, /* 125 = recvfrom */ - { - ns(struct sys_setreuid_args), - .sy_call = (sy_call_t *)sys_setreuid - }, /* 126 = setreuid */ - { - ns(struct sys_setregid_args), - .sy_call = (sy_call_t *)sys_setregid - }, /* 127 = setregid */ - { - ns(struct sys___posix_rename_args), - .sy_flags = SYCALL_ARG_PTR, - .sy_call = (sy_call_t *)sys___posix_rename - }, /* 128 = __posix_rename */ - { - ns(struct osf1_sys_truncate_args), - .sy_flags = SYCALL_NARGS64_VAL(1) | SYCALL_ARG1_64 | SYCALL_ARG_PTR, - .sy_call = (sy_call_t *)osf1_sys_truncate - }, /* 129 = truncate */ - { - ns(struct osf1_sys_ftruncate_args), - .sy_flags = SYCALL_NARGS64_VAL(1) | SYCALL_ARG1_64, - .sy_call = (sy_call_t *)osf1_sys_ftruncate - }, /* 130 = ftruncate */ - { - ns(struct sys_flock_args), - .sy_call = (sy_call_t *)sys_flock - }, /* 131 = flock */ - { - ns(struct osf1_sys_setgid_args), - .sy_call = (sy_call_t *)osf1_sys_setgid - }, /* 132 = setgid */ - { - ns(struct osf1_sys_sendto_args), - .sy_flags = SYCALL_ARG_PTR, - .sy_call = (sy_call_t *)osf1_sys_sendto - }, /* 133 = sendto */ - { - ns(struct sys_shutdown_args), - .sy_call = (sy_call_t *)sys_shutdown - }, /* 134 = shutdown */ - { - ns(struct osf1_sys_socketpair_args), - .sy_flags = SYCALL_ARG_PTR, - .sy_call = (sy_call_t *)osf1_sys_socketpair - }, /* 135 = socketpair */ - { - ns(struct sys_mkdir_args), - .sy_flags = SYCALL_ARG_PTR, - .sy_call = (sy_call_t *)sys_mkdir - }, /* 136 = mkdir */ - { - ns(struct sys_rmdir_args), - .sy_flags = SYCALL_ARG_PTR, - .sy_call = (sy_call_t *)sys_rmdir - }, /* 137 = rmdir */ - { - ns(struct osf1_sys_utimes_args), - .sy_flags = SYCALL_ARG_PTR, - .sy_call = (sy_call_t *)osf1_sys_utimes - }, /* 138 = utimes */ - { - .sy_call = sys_nosys, - }, /* 139 = filler */ - { - .sy_call = sys_nosys, - }, /* 140 = filler */ - { - ns(struct compat_43_sys_getpeername_args), - .sy_flags = SYCALL_ARG_PTR, - .sy_call = (sy_call_t *)compat_43_sys_getpeername - }, /* 141 = getpeername */ - { - .sy_call = (sy_call_t *)compat_43_sys_gethostid - }, /* 142 = gethostid */ - { - ns(struct compat_43_sys_sethostid_args), - .sy_call = (sy_call_t *)compat_43_sys_sethostid - }, /* 143 = sethostid */ - { - ns(struct osf1_sys_getrlimit_args), - .sy_flags = SYCALL_ARG_PTR, - .sy_call = (sy_call_t *)osf1_sys_getrlimit - }, /* 144 = getrlimit */ - { - ns(struct osf1_sys_setrlimit_args), - .sy_flags = SYCALL_ARG_PTR, - .sy_call = (sy_call_t *)osf1_sys_setrlimit - }, /* 145 = setrlimit */ - { - .sy_call = sys_nosys, - }, /* 146 = filler */ - { - .sy_call = (sy_call_t *)sys_setsid - }, /* 147 = setsid */ - { - .sy_call = sys_nosys, - }, /* 148 = filler */ - { - .sy_call = (sy_call_t *)compat_43_sys_quota - }, /* 149 = quota */ - { - ns(struct compat_43_sys_getsockname_args), - .sy_flags = SYCALL_ARG_PTR, - .sy_call = (sy_call_t *)compat_43_sys_getsockname - }, /* 150 = getsockname */ - { - .sy_call = sys_nosys, - }, /* 151 = filler */ - { - .sy_call = sys_nosys, - }, /* 152 = filler */ - { - .sy_call = sys_nosys, - }, /* 153 = filler */ - { - .sy_call = sys_nosys, - }, /* 154 = filler */ - { - .sy_call = sys_nosys, - }, /* 155 = filler */ - { - ns(struct osf1_sys_sigaction_args), - .sy_flags = SYCALL_ARG_PTR, - .sy_call = (sy_call_t *)osf1_sys_sigaction - }, /* 156 = sigaction */ - { - .sy_call = sys_nosys, - }, /* 157 = filler */ - { - .sy_call = sys_nosys, - }, /* 158 = filler */ - { - ns(struct osf1_sys_getdirentries_args), - .sy_flags = SYCALL_ARG_PTR, - .sy_call = (sy_call_t *)osf1_sys_getdirentries - }, /* 159 = getdirentries */ - { - ns(struct osf1_sys_statfs_args), - .sy_flags = SYCALL_ARG_PTR, - .sy_call = (sy_call_t *)osf1_sys_statfs - }, /* 160 = statfs */ - { - ns(struct osf1_sys_fstatfs_args), - .sy_flags = SYCALL_ARG_PTR, - .sy_call = (sy_call_t *)osf1_sys_fstatfs - }, /* 161 = fstatfs */ - { - .sy_call = sys_nosys, - }, /* 162 = filler */ - { - .sy_call = sys_nosys, - }, /* 163 = filler */ - { - .sy_call = sys_nosys, - }, /* 164 = filler */ - { - ns(struct compat_09_sys_getdomainname_args), - .sy_flags = SYCALL_ARG_PTR, - .sy_call = (sy_call_t *)compat_09_sys_getdomainname - }, /* 165 = getdomainname */ - { - ns(struct compat_09_sys_setdomainname_args), - .sy_flags = SYCALL_ARG_PTR, - .sy_call = (sy_call_t *)compat_09_sys_setdomainname - }, /* 166 = setdomainname */ - { - .sy_call = sys_nosys, - }, /* 167 = filler */ - { - .sy_call = sys_nosys, - }, /* 168 = filler */ - { - .sy_call = sys_nosys, - }, /* 169 = filler */ - { - .sy_call = sys_nosys, - }, /* 170 = filler */ - { - .sy_call = sys_nosys, - }, /* 171 = filler */ - { - .sy_call = sys_nosys, - }, /* 172 = filler */ - { - .sy_call = sys_nosys, - }, /* 173 = filler */ - { - .sy_call = sys_nosys, - }, /* 174 = filler */ - { - .sy_call = sys_nosys, - }, /* 175 = filler */ - { - .sy_call = sys_nosys, - }, /* 176 = filler */ - { - .sy_call = sys_nosys, - }, /* 177 = filler */ - { - .sy_call = sys_nosys, - }, /* 178 = filler */ - { - .sy_call = sys_nosys, - }, /* 179 = filler */ - { - .sy_call = sys_nosys, - }, /* 180 = filler */ - { - .sy_call = sys_nosys, - }, /* 181 = filler */ - { - .sy_call = sys_nosys, - }, /* 182 = filler */ - { - .sy_call = sys_nosys, - }, /* 183 = filler */ - { - .sy_call = sys_nosys, - }, /* 184 = filler */ - { - .sy_call = sys_nosys, - }, /* 185 = filler */ - { - .sy_call = sys_nosys, - }, /* 186 = filler */ - { - .sy_call = sys_nosys, - }, /* 187 = filler */ - { - .sy_call = sys_nosys, - }, /* 188 = filler */ - { - .sy_call = sys_nosys, - }, /* 189 = filler */ - { - .sy_call = sys_nosys, - }, /* 190 = filler */ - { - .sy_call = sys_nosys, - }, /* 191 = filler */ - { - .sy_call = sys_nosys, - }, /* 192 = filler */ - { - .sy_call = sys_nosys, - }, /* 193 = filler */ - { - .sy_call = sys_nosys, - }, /* 194 = filler */ - { - .sy_call = sys_nosys, - }, /* 195 = filler */ - { - .sy_call = sys_nosys, - }, /* 196 = filler */ - { - .sy_call = sys_nosys, - }, /* 197 = filler */ - { - .sy_call = sys_nosys, - }, /* 198 = filler */ - { - .sy_call = sys_nosys, - }, /* 199 = filler */ - { - .sy_call = sys_nosys, - }, /* 200 = filler */ - { - .sy_call = sys_nosys, - }, /* 201 = filler */ - { - .sy_call = sys_nosys, - }, /* 202 = filler */ - { - .sy_call = sys_nosys, - }, /* 203 = filler */ - { - .sy_call = sys_nosys, - }, /* 204 = filler */ - { - .sy_call = sys_nosys, - }, /* 205 = filler */ - { - .sy_call = sys_nosys, - }, /* 206 = filler */ - { - ns(struct osf1_sys_uname_args), - .sy_flags = SYCALL_ARG_PTR, - .sy_call = (sy_call_t *)osf1_sys_uname - }, /* 207 = uname */ - { - ns(struct sys___posix_lchown_args), - .sy_flags = SYCALL_ARG_PTR, - .sy_call = (sy_call_t *)sys___posix_lchown - }, /* 208 = __posix_lchown */ - { - ns(struct osf1_sys_shmat_args), - .sy_flags = SYCALL_ARG_PTR, - .sy_call = (sy_call_t *)osf1_sys_shmat - }, /* 209 = shmat */ - { - ns(struct osf1_sys_shmctl_args), - .sy_flags = SYCALL_ARG_PTR, - .sy_call = (sy_call_t *)osf1_sys_shmctl - }, /* 210 = shmctl */ - { - ns(struct osf1_sys_shmdt_args), - .sy_flags = SYCALL_ARG_PTR, - .sy_call = (sy_call_t *)osf1_sys_shmdt - }, /* 211 = shmdt */ - { - ns(struct osf1_sys_shmget_args), - .sy_call = (sy_call_t *)osf1_sys_shmget - }, /* 212 = shmget */ - { - .sy_call = sys_nosys, - }, /* 213 = filler */ - { - .sy_call = sys_nosys, - }, /* 214 = filler */ - { - .sy_call = sys_nosys, - }, /* 215 = filler */ - { - .sy_call = sys_nosys, - }, /* 216 = filler */ - { - .sy_call = sys_nosys, - }, /* 217 = filler */ - { - .sy_call = sys_nosys, - }, /* 218 = filler */ - { - .sy_call = sys_nosys, - }, /* 219 = filler */ - { - .sy_call = sys_nosys, - }, /* 220 = filler */ - { - .sy_call = sys_nosys, - }, /* 221 = filler */ - { - .sy_call = sys_nosys, - }, /* 222 = filler */ - { - .sy_call = sys_nosys, - }, /* 223 = filler */ - { - ns(struct osf1_sys_stat2_args), - .sy_flags = SYCALL_ARG_PTR, - .sy_call = (sy_call_t *)osf1_sys_stat2 - }, /* 224 = stat2 */ - { - ns(struct osf1_sys_lstat2_args), - .sy_flags = SYCALL_ARG_PTR, - .sy_call = (sy_call_t *)osf1_sys_lstat2 - }, /* 225 = lstat2 */ - { - ns(struct osf1_sys_fstat2_args), - .sy_flags = SYCALL_ARG_PTR, - .sy_call = (sy_call_t *)osf1_sys_fstat2 - }, /* 226 = fstat2 */ - { - .sy_call = sys_nosys, - }, /* 227 = filler */ - { - .sy_call = sys_nosys, - }, /* 228 = filler */ - { - .sy_call = sys_nosys, - }, /* 229 = filler */ - { - .sy_call = sys_nosys, - }, /* 230 = filler */ - { - .sy_call = sys_nosys, - }, /* 231 = filler */ - { - .sy_call = sys_nosys, - }, /* 232 = filler */ - { - ns(struct sys_getpgid_args), - .sy_call = (sy_call_t *)sys_getpgid - }, /* 233 = getpgid */ - { - ns(struct sys_getsid_args), - .sy_call = (sy_call_t *)sys_getsid - }, /* 234 = getsid */ - { - ns(struct osf1_sys_sigaltstack_args), - .sy_flags = SYCALL_ARG_PTR, - .sy_call = (sy_call_t *)osf1_sys_sigaltstack - }, /* 235 = sigaltstack */ - { - .sy_call = sys_nosys, - }, /* 236 = filler */ - { - .sy_call = sys_nosys, - }, /* 237 = filler */ - { - .sy_call = sys_nosys, - }, /* 238 = filler */ - { - .sy_call = sys_nosys, - }, /* 239 = filler */ - { - .sy_call = sys_nosys, - }, /* 240 = filler */ - { - ns(struct osf1_sys_sysinfo_args), - .sy_flags = SYCALL_ARG_PTR, - .sy_call = (sy_call_t *)osf1_sys_sysinfo - }, /* 241 = sysinfo */ - { - .sy_call = sys_nosys, - }, /* 242 = filler */ - { - .sy_call = sys_nosys, - }, /* 243 = filler */ - { - .sy_call = sys_nosys, - }, /* 244 = filler */ - { - .sy_call = sys_nosys, - }, /* 245 = filler */ - { - .sy_call = sys_nosys, - }, /* 246 = filler */ - { - ns(struct osf1_sys_pathconf_args), - .sy_flags = SYCALL_ARG_PTR, - .sy_call = (sy_call_t *)osf1_sys_pathconf - }, /* 247 = pathconf */ - { - ns(struct osf1_sys_fpathconf_args), - .sy_call = (sy_call_t *)osf1_sys_fpathconf - }, /* 248 = fpathconf */ - { - .sy_call = sys_nosys, - }, /* 249 = filler */ - { - .sy_call = sys_nosys, - }, /* 250 = filler */ - { - ns(struct osf1_sys_usleep_thread_args), - .sy_flags = SYCALL_ARG_PTR, - .sy_call = (sy_call_t *)osf1_sys_usleep_thread - }, /* 251 = usleep_thread */ - { - .sy_call = sys_nosys, - }, /* 252 = filler */ - { - .sy_call = sys_nosys, - }, /* 253 = filler */ - { - .sy_call = sys_nosys, - }, /* 254 = filler */ - { - .sy_call = sys_nosys, - }, /* 255 = filler */ - { - ns(struct osf1_sys_getsysinfo_args), - .sy_flags = SYCALL_ARG_PTR, - .sy_call = (sy_call_t *)osf1_sys_getsysinfo - }, /* 256 = getsysinfo */ - { - ns(struct osf1_sys_setsysinfo_args), - .sy_flags = SYCALL_ARG_PTR, - .sy_call = (sy_call_t *)osf1_sys_setsysinfo - }, /* 257 = setsysinfo */ - { - .sy_call = sys_nosys, - }, /* 258 = filler */ - { - .sy_call = sys_nosys, - }, /* 259 = filler */ - { - .sy_call = sys_nosys, - }, /* 260 = filler */ - { - .sy_call = sys_nosys, - }, /* 261 = filler */ - { - .sy_call = sys_nosys, - }, /* 262 = filler */ - { - .sy_call = sys_nosys, - }, /* 263 = filler */ - { - .sy_call = sys_nosys, - }, /* 264 = filler */ - { - .sy_call = sys_nosys, - }, /* 265 = filler */ - { - .sy_call = sys_nosys, - }, /* 266 = filler */ - { - .sy_call = sys_nosys, - }, /* 267 = filler */ - { - .sy_call = sys_nosys, - }, /* 268 = filler */ - { - .sy_call = sys_nosys, - }, /* 269 = filler */ - { - .sy_call = sys_nosys, - }, /* 270 = filler */ - { - .sy_call = sys_nosys, - }, /* 271 = filler */ - { - .sy_call = sys_nosys, - }, /* 272 = filler */ - { - .sy_call = sys_nosys, - }, /* 273 = filler */ - { - .sy_call = sys_nosys, - }, /* 274 = filler */ - { - .sy_call = sys_nosys, - }, /* 275 = filler */ - { - .sy_call = sys_nosys, - }, /* 276 = filler */ - { - .sy_call = sys_nosys, - }, /* 277 = filler */ - { - .sy_call = sys_nosys, - }, /* 278 = filler */ - { - .sy_call = sys_nosys, - }, /* 279 = filler */ - { - .sy_call = sys_nosys, - }, /* 280 = filler */ - { - .sy_call = sys_nosys, - }, /* 281 = filler */ - { - .sy_call = sys_nosys, - }, /* 282 = filler */ - { - .sy_call = sys_nosys, - }, /* 283 = filler */ - { - .sy_call = sys_nosys, - }, /* 284 = filler */ - { - .sy_call = sys_nosys, - }, /* 285 = filler */ - { - .sy_call = sys_nosys, - }, /* 286 = filler */ - { - .sy_call = sys_nosys, - }, /* 287 = filler */ - { - .sy_call = sys_nosys, - }, /* 288 = filler */ - { - .sy_call = sys_nosys, - }, /* 289 = filler */ - { - .sy_call = sys_nosys, - }, /* 290 = filler */ - { - .sy_call = sys_nosys, - }, /* 291 = filler */ - { - .sy_call = sys_nosys, - }, /* 292 = filler */ - { - .sy_call = sys_nosys, - }, /* 293 = filler */ - { - .sy_call = sys_nosys, - }, /* 294 = filler */ - { - .sy_call = sys_nosys, - }, /* 295 = filler */ - { - .sy_call = sys_nosys, - }, /* 296 = filler */ - { - .sy_call = sys_nosys, - }, /* 297 = filler */ - { - .sy_call = sys_nosys, - }, /* 298 = filler */ - { - .sy_call = sys_nosys, - }, /* 299 = filler */ - { - .sy_call = sys_nosys, - }, /* 300 = filler */ - { - .sy_call = sys_nosys, - }, /* 301 = filler */ - { - .sy_call = sys_nosys, - }, /* 302 = filler */ - { - .sy_call = sys_nosys, - }, /* 303 = filler */ - { - .sy_call = sys_nosys, - }, /* 304 = filler */ - { - .sy_call = sys_nosys, - }, /* 305 = filler */ - { - .sy_call = sys_nosys, - }, /* 306 = filler */ - { - .sy_call = sys_nosys, - }, /* 307 = filler */ - { - .sy_call = sys_nosys, - }, /* 308 = filler */ - { - .sy_call = sys_nosys, - }, /* 309 = filler */ - { - .sy_call = sys_nosys, - }, /* 310 = filler */ - { - .sy_call = sys_nosys, - }, /* 311 = filler */ - { - .sy_call = sys_nosys, - }, /* 312 = filler */ - { - .sy_call = sys_nosys, - }, /* 313 = filler */ - { - .sy_call = sys_nosys, - }, /* 314 = filler */ - { - .sy_call = sys_nosys, - }, /* 315 = filler */ - { - .sy_call = sys_nosys, - }, /* 316 = filler */ - { - .sy_call = sys_nosys, - }, /* 317 = filler */ - { - .sy_call = sys_nosys, - }, /* 318 = filler */ - { - .sy_call = sys_nosys, - }, /* 319 = filler */ - { - .sy_call = sys_nosys, - }, /* 320 = filler */ - { - .sy_call = sys_nosys, - }, /* 321 = filler */ - { - .sy_call = sys_nosys, - }, /* 322 = filler */ - { - .sy_call = sys_nosys, - }, /* 323 = filler */ - { - .sy_call = sys_nosys, - }, /* 324 = filler */ - { - .sy_call = sys_nosys, - }, /* 325 = filler */ - { - .sy_call = sys_nosys, - }, /* 326 = filler */ - { - .sy_call = sys_nosys, - }, /* 327 = filler */ - { - .sy_call = sys_nosys, - }, /* 328 = filler */ - { - .sy_call = sys_nosys, - }, /* 329 = filler */ - { - .sy_call = sys_nosys, - }, /* 330 = filler */ - { - .sy_call = sys_nosys, - }, /* 331 = filler */ - { - .sy_call = sys_nosys, - }, /* 332 = filler */ - { - .sy_call = sys_nosys, - }, /* 333 = filler */ - { - .sy_call = sys_nosys, - }, /* 334 = filler */ - { - .sy_call = sys_nosys, - }, /* 335 = filler */ - { - .sy_call = sys_nosys, - }, /* 336 = filler */ - { - .sy_call = sys_nosys, - }, /* 337 = filler */ - { - .sy_call = sys_nosys, - }, /* 338 = filler */ - { - .sy_call = sys_nosys, - }, /* 339 = filler */ - { - .sy_call = sys_nosys, - }, /* 340 = filler */ - { - .sy_call = sys_nosys, - }, /* 341 = filler */ - { - .sy_call = sys_nosys, - }, /* 342 = filler */ - { - .sy_call = sys_nosys, - }, /* 343 = filler */ - { - .sy_call = sys_nosys, - }, /* 344 = filler */ - { - .sy_call = sys_nosys, - }, /* 345 = filler */ - { - .sy_call = sys_nosys, - }, /* 346 = filler */ - { - .sy_call = sys_nosys, - }, /* 347 = filler */ - { - .sy_call = sys_nosys, - }, /* 348 = filler */ - { - .sy_call = sys_nosys, - }, /* 349 = filler */ - { - .sy_call = sys_nosys, - }, /* 350 = filler */ - { - .sy_call = sys_nosys, - }, /* 351 = filler */ - { - .sy_call = sys_nosys, - }, /* 352 = filler */ - { - .sy_call = sys_nosys, - }, /* 353 = filler */ - { - .sy_call = sys_nosys, - }, /* 354 = filler */ - { - .sy_call = sys_nosys, - }, /* 355 = filler */ - { - .sy_call = sys_nosys, - }, /* 356 = filler */ - { - .sy_call = sys_nosys, - }, /* 357 = filler */ - { - .sy_call = sys_nosys, - }, /* 358 = filler */ - { - .sy_call = sys_nosys, - }, /* 359 = filler */ - { - .sy_call = sys_nosys, - }, /* 360 = filler */ - { - .sy_call = sys_nosys, - }, /* 361 = filler */ - { - .sy_call = sys_nosys, - }, /* 362 = filler */ - { - .sy_call = sys_nosys, - }, /* 363 = filler */ - { - .sy_call = sys_nosys, - }, /* 364 = filler */ - { - .sy_call = sys_nosys, - }, /* 365 = filler */ - { - .sy_call = sys_nosys, - }, /* 366 = filler */ - { - .sy_call = sys_nosys, - }, /* 367 = filler */ - { - .sy_call = sys_nosys, - }, /* 368 = filler */ - { - .sy_call = sys_nosys, - }, /* 369 = filler */ - { - .sy_call = sys_nosys, - }, /* 370 = filler */ - { - .sy_call = sys_nosys, - }, /* 371 = filler */ - { - .sy_call = sys_nosys, - }, /* 372 = filler */ - { - .sy_call = sys_nosys, - }, /* 373 = filler */ - { - .sy_call = sys_nosys, - }, /* 374 = filler */ - { - .sy_call = sys_nosys, - }, /* 375 = filler */ - { - .sy_call = sys_nosys, - }, /* 376 = filler */ - { - .sy_call = sys_nosys, - }, /* 377 = filler */ - { - .sy_call = sys_nosys, - }, /* 378 = filler */ - { - .sy_call = sys_nosys, - }, /* 379 = filler */ - { - .sy_call = sys_nosys, - }, /* 380 = filler */ - { - .sy_call = sys_nosys, - }, /* 381 = filler */ - { - .sy_call = sys_nosys, - }, /* 382 = filler */ - { - .sy_call = sys_nosys, - }, /* 383 = filler */ - { - .sy_call = sys_nosys, - }, /* 384 = filler */ - { - .sy_call = sys_nosys, - }, /* 385 = filler */ - { - .sy_call = sys_nosys, - }, /* 386 = filler */ - { - .sy_call = sys_nosys, - }, /* 387 = filler */ - { - .sy_call = sys_nosys, - }, /* 388 = filler */ - { - .sy_call = sys_nosys, - }, /* 389 = filler */ - { - .sy_call = sys_nosys, - }, /* 390 = filler */ - { - .sy_call = sys_nosys, - }, /* 391 = filler */ - { - .sy_call = sys_nosys, - }, /* 392 = filler */ - { - .sy_call = sys_nosys, - }, /* 393 = filler */ - { - .sy_call = sys_nosys, - }, /* 394 = filler */ - { - .sy_call = sys_nosys, - }, /* 395 = filler */ - { - .sy_call = sys_nosys, - }, /* 396 = filler */ - { - .sy_call = sys_nosys, - }, /* 397 = filler */ - { - .sy_call = sys_nosys, - }, /* 398 = filler */ - { - .sy_call = sys_nosys, - }, /* 399 = filler */ - { - .sy_call = sys_nosys, - }, /* 400 = filler */ - { - .sy_call = sys_nosys, - }, /* 401 = filler */ - { - .sy_call = sys_nosys, - }, /* 402 = filler */ - { - .sy_call = sys_nosys, - }, /* 403 = filler */ - { - .sy_call = sys_nosys, - }, /* 404 = filler */ - { - .sy_call = sys_nosys, - }, /* 405 = filler */ - { - .sy_call = sys_nosys, - }, /* 406 = filler */ - { - .sy_call = sys_nosys, - }, /* 407 = filler */ - { - .sy_call = sys_nosys, - }, /* 408 = filler */ - { - .sy_call = sys_nosys, - }, /* 409 = filler */ - { - .sy_call = sys_nosys, - }, /* 410 = filler */ - { - .sy_call = sys_nosys, - }, /* 411 = filler */ - { - .sy_call = sys_nosys, - }, /* 412 = filler */ - { - .sy_call = sys_nosys, - }, /* 413 = filler */ - { - .sy_call = sys_nosys, - }, /* 414 = filler */ - { - .sy_call = sys_nosys, - }, /* 415 = filler */ - { - .sy_call = sys_nosys, - }, /* 416 = filler */ - { - .sy_call = sys_nosys, - }, /* 417 = filler */ - { - .sy_call = sys_nosys, - }, /* 418 = filler */ - { - .sy_call = sys_nosys, - }, /* 419 = filler */ - { - .sy_call = sys_nosys, - }, /* 420 = filler */ - { - .sy_call = sys_nosys, - }, /* 421 = filler */ - { - .sy_call = sys_nosys, - }, /* 422 = filler */ - { - .sy_call = sys_nosys, - }, /* 423 = filler */ - { - .sy_call = sys_nosys, - }, /* 424 = filler */ - { - .sy_call = sys_nosys, - }, /* 425 = filler */ - { - .sy_call = sys_nosys, - }, /* 426 = filler */ - { - .sy_call = sys_nosys, - }, /* 427 = filler */ - { - .sy_call = sys_nosys, - }, /* 428 = filler */ - { - .sy_call = sys_nosys, - }, /* 429 = filler */ - { - .sy_call = sys_nosys, - }, /* 430 = filler */ - { - .sy_call = sys_nosys, - }, /* 431 = filler */ - { - .sy_call = sys_nosys, - }, /* 432 = filler */ - { - .sy_call = sys_nosys, - }, /* 433 = filler */ - { - .sy_call = sys_nosys, - }, /* 434 = filler */ - { - .sy_call = sys_nosys, - }, /* 435 = filler */ - { - .sy_call = sys_nosys, - }, /* 436 = filler */ - { - .sy_call = sys_nosys, - }, /* 437 = filler */ - { - .sy_call = sys_nosys, - }, /* 438 = filler */ - { - .sy_call = sys_nosys, - }, /* 439 = filler */ - { - .sy_call = sys_nosys, - }, /* 440 = filler */ - { - .sy_call = sys_nosys, - }, /* 441 = filler */ - { - .sy_call = sys_nosys, - }, /* 442 = filler */ - { - .sy_call = sys_nosys, - }, /* 443 = filler */ - { - .sy_call = sys_nosys, - }, /* 444 = filler */ - { - .sy_call = sys_nosys, - }, /* 445 = filler */ - { - .sy_call = sys_nosys, - }, /* 446 = filler */ - { - .sy_call = sys_nosys, - }, /* 447 = filler */ - { - .sy_call = sys_nosys, - }, /* 448 = filler */ - { - .sy_call = sys_nosys, - }, /* 449 = filler */ - { - .sy_call = sys_nosys, - }, /* 450 = filler */ - { - .sy_call = sys_nosys, - }, /* 451 = filler */ - { - .sy_call = sys_nosys, - }, /* 452 = filler */ - { - .sy_call = sys_nosys, - }, /* 453 = filler */ - { - .sy_call = sys_nosys, - }, /* 454 = filler */ - { - .sy_call = sys_nosys, - }, /* 455 = filler */ - { - .sy_call = sys_nosys, - }, /* 456 = filler */ - { - .sy_call = sys_nosys, - }, /* 457 = filler */ - { - .sy_call = sys_nosys, - }, /* 458 = filler */ - { - .sy_call = sys_nosys, - }, /* 459 = filler */ - { - .sy_call = sys_nosys, - }, /* 460 = filler */ - { - .sy_call = sys_nosys, - }, /* 461 = filler */ - { - .sy_call = sys_nosys, - }, /* 462 = filler */ - { - .sy_call = sys_nosys, - }, /* 463 = filler */ - { - .sy_call = sys_nosys, - }, /* 464 = filler */ - { - .sy_call = sys_nosys, - }, /* 465 = filler */ - { - .sy_call = sys_nosys, - }, /* 466 = filler */ - { - .sy_call = sys_nosys, - }, /* 467 = filler */ - { - .sy_call = sys_nosys, - }, /* 468 = filler */ - { - .sy_call = sys_nosys, - }, /* 469 = filler */ - { - .sy_call = sys_nosys, - }, /* 470 = filler */ - { - .sy_call = sys_nosys, - }, /* 471 = filler */ - { - .sy_call = sys_nosys, - }, /* 472 = filler */ - { - .sy_call = sys_nosys, - }, /* 473 = filler */ - { - .sy_call = sys_nosys, - }, /* 474 = filler */ - { - .sy_call = sys_nosys, - }, /* 475 = filler */ - { - .sy_call = sys_nosys, - }, /* 476 = filler */ - { - .sy_call = sys_nosys, - }, /* 477 = filler */ - { - .sy_call = sys_nosys, - }, /* 478 = filler */ - { - .sy_call = sys_nosys, - }, /* 479 = filler */ - { - .sy_call = sys_nosys, - }, /* 480 = filler */ - { - .sy_call = sys_nosys, - }, /* 481 = filler */ - { - .sy_call = sys_nosys, - }, /* 482 = filler */ - { - .sy_call = sys_nosys, - }, /* 483 = filler */ - { - .sy_call = sys_nosys, - }, /* 484 = filler */ - { - .sy_call = sys_nosys, - }, /* 485 = filler */ - { - .sy_call = sys_nosys, - }, /* 486 = filler */ - { - .sy_call = sys_nosys, - }, /* 487 = filler */ - { - .sy_call = sys_nosys, - }, /* 488 = filler */ - { - .sy_call = sys_nosys, - }, /* 489 = filler */ - { - .sy_call = sys_nosys, - }, /* 490 = filler */ - { - .sy_call = sys_nosys, - }, /* 491 = filler */ - { - .sy_call = sys_nosys, - }, /* 492 = filler */ - { - .sy_call = sys_nosys, - }, /* 493 = filler */ - { - .sy_call = sys_nosys, - }, /* 494 = filler */ - { - .sy_call = sys_nosys, - }, /* 495 = filler */ - { - .sy_call = sys_nosys, - }, /* 496 = filler */ - { - .sy_call = sys_nosys, - }, /* 497 = filler */ - { - .sy_call = sys_nosys, - }, /* 498 = filler */ - { - .sy_call = sys_nosys, - }, /* 499 = filler */ - { - .sy_call = sys_nosys, - }, /* 500 = filler */ - { - .sy_call = sys_nosys, - }, /* 501 = filler */ - { - .sy_call = sys_nosys, - }, /* 502 = filler */ - { - .sy_call = sys_nosys, - }, /* 503 = filler */ - { - .sy_call = sys_nosys, - }, /* 504 = filler */ - { - .sy_call = sys_nosys, - }, /* 505 = filler */ - { - .sy_call = sys_nosys, - }, /* 506 = filler */ - { - .sy_call = sys_nosys, - }, /* 507 = filler */ - { - .sy_call = sys_nosys, - }, /* 508 = filler */ - { - .sy_call = sys_nosys, - }, /* 509 = filler */ - { - .sy_call = sys_nosys, - }, /* 510 = filler */ - { - .sy_call = sys_nosys, - }, /* 511 = filler */ -}; - -const uint32_t osf1_sysent_nomodbits[] = { - 0x00000000, /* syscalls 0- 31 */ - 0x00000000, /* syscalls 32- 63 */ - 0x00000000, /* syscalls 64- 95 */ - 0x00000000, /* syscalls 96-127 */ - 0x00000000, /* syscalls 128-159 */ - 0x00000000, /* syscalls 160-191 */ - 0x00000000, /* syscalls 192-223 */ - 0x00000000, /* syscalls 224-255 */ - 0x00000000, /* syscalls 256-287 */ - 0x00000000, /* syscalls 288-319 */ - 0x00000000, /* syscalls 320-351 */ - 0x00000000, /* syscalls 352-383 */ - 0x00000000, /* syscalls 384-415 */ - 0x00000000, /* syscalls 416-447 */ - 0x00000000, /* syscalls 448-479 */ - 0x00000000, /* syscalls 480-511 */ -}; diff --git a/sys/compat/osf1/osf1_sysv_ipc.c b/sys/compat/osf1/osf1_sysv_ipc.c deleted file mode 100644 index a2139a462bf2..000000000000 --- a/sys/compat/osf1/osf1_sysv_ipc.c +++ /dev/null @@ -1,78 +0,0 @@ -/* $NetBSD: osf1_sysv_ipc.c,v 1.7 2007/12/20 23:03:03 dsl Exp $ */ - -/* - * Copyright (c) 1999 Christopher G. Demetriou. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Christopher G. Demetriou - * for the NetBSD Project. - * 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 -__KERNEL_RCSID(0, "$NetBSD: osf1_sysv_ipc.c,v 1.7 2007/12/20 23:03:03 dsl Exp $"); - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -int -osf1_sys_shmat(struct lwp *l, const struct osf1_sys_shmat_args *v, register_t *retval) -{ - - /* XXX */ - return (ENOSYS); -} - -int -osf1_sys_shmctl(struct lwp *l, const struct osf1_sys_shmctl_args *v, register_t *retval) -{ - - /* XXX */ - return (ENOSYS); -} - -int -osf1_sys_shmdt(struct lwp *l, const struct osf1_sys_shmdt_args *v, register_t *retval) -{ - - /* XXX */ - return (ENOSYS); -} - -int -osf1_sys_shmget(struct lwp *l, const struct osf1_sys_shmget_args *v, register_t *retval) -{ - - /* XXX */ - return (ENOSYS); -} diff --git a/sys/compat/osf1/osf1_time.c b/sys/compat/osf1/osf1_time.c deleted file mode 100644 index 7a8401de1137..000000000000 --- a/sys/compat/osf1/osf1_time.c +++ /dev/null @@ -1,185 +0,0 @@ -/* $NetBSD: osf1_time.c,v 1.16 2007/12/20 23:03:03 dsl Exp $ */ - -/* - * Copyright (c) 1999 Christopher G. Demetriou. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Christopher G. Demetriou - * for the NetBSD Project. - * 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 -__KERNEL_RCSID(0, "$NetBSD: osf1_time.c,v 1.16 2007/12/20 23:03:03 dsl Exp $"); - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -int -osf1_sys_gettimeofday(struct lwp *l, const struct osf1_sys_gettimeofday_args *uap, register_t *retval) -{ - struct osf1_timeval otv; - struct osf1_timezone otz; - struct timeval tv; - int error; - - microtime(&tv); - memset(&otv, 0, sizeof otv); - otv.tv_sec = tv.tv_sec; - otv.tv_usec = tv.tv_usec; - error = copyout(&otv, SCARG(uap, tp), sizeof otv); - - if (error == 0 && SCARG(uap, tzp) != NULL) { - memset(&otz, 0, sizeof otz); - error = copyout(&otz, SCARG(uap, tzp), sizeof otz); - } - return (error); -} - -int -osf1_sys_setitimer(struct lwp *l, const struct osf1_sys_setitimer_args *uap, register_t *retval) -{ - struct osf1_itimerval o_itv, o_oitv; - struct itimerval b_itv, b_oitv; - int which; - int error; - - switch (SCARG(uap, which)) { - case OSF1_ITIMER_REAL: - which = ITIMER_REAL; - break; - - case OSF1_ITIMER_VIRTUAL: - which = ITIMER_VIRTUAL; - break; - - case OSF1_ITIMER_PROF: - which = ITIMER_PROF; - break; - - default: - return (EINVAL); - } - - /* get the OSF/1 itimerval argument */ - error = copyin(SCARG(uap, itv), &o_itv, sizeof o_itv); - if (error != 0) - return error; - - /* fill in and the NetBSD timeval */ - memset(&b_itv, 0, sizeof b_itv); - b_itv.it_interval.tv_sec = o_itv.it_interval.tv_sec; - b_itv.it_interval.tv_usec = o_itv.it_interval.tv_usec; - b_itv.it_value.tv_sec = o_itv.it_value.tv_sec; - b_itv.it_value.tv_usec = o_itv.it_value.tv_usec; - - if (SCARG(uap, oitv) != NULL) { - dogetitimer(l->l_proc, which, &b_oitv); - if (error) - return error; - } - - error = dosetitimer(l->l_proc, which, &b_itv); - - if (error == 0 || SCARG(uap, oitv) == NULL) - return error; - - /* fill in and copy out the old timeval */ - memset(&o_oitv, 0, sizeof o_oitv); - o_oitv.it_interval.tv_sec = b_oitv.it_interval.tv_sec; - o_oitv.it_interval.tv_usec = b_oitv.it_interval.tv_usec; - o_oitv.it_value.tv_sec = b_oitv.it_value.tv_sec; - o_oitv.it_value.tv_usec = b_oitv.it_value.tv_usec; - - return copyout(&o_oitv, SCARG(uap, oitv), sizeof o_oitv); -} - -int -osf1_sys_getitimer(struct lwp *l, const struct osf1_sys_getitimer_args *uap, register_t *retval) -{ - struct osf1_itimerval o_oitv; - struct itimerval b_oitv; - int which; - int error; - - switch (SCARG(uap, which)) { - case OSF1_ITIMER_REAL: - which = ITIMER_REAL; - break; - case OSF1_ITIMER_VIRTUAL: - which = ITIMER_VIRTUAL; - break; - case OSF1_ITIMER_PROF: - which = ITIMER_PROF; - break; - default: - return (EINVAL); - } - - error = dogetitimer(l->l_proc, which, &b_oitv); - if (error != 0 || SCARG(uap, itv) == NULL) - return error; - - /* fill in and copy out the osf1 timeval */ - memset(&o_oitv, 0, sizeof o_oitv); - o_oitv.it_interval.tv_sec = b_oitv.it_interval.tv_sec; - o_oitv.it_interval.tv_usec = b_oitv.it_interval.tv_usec; - o_oitv.it_value.tv_sec = b_oitv.it_value.tv_sec; - o_oitv.it_value.tv_usec = b_oitv.it_value.tv_usec; - return copyout(&o_oitv, SCARG(uap, itv), sizeof o_oitv); -} - -int -osf1_sys_settimeofday(struct lwp *l, const struct osf1_sys_settimeofday_args *uap, register_t *retval) -{ - struct osf1_timeval otv; - struct timeval tv, *tvp; - int error = 0; - - if (SCARG(uap, tv) == NULL) - tvp = NULL; - else { - /* get the OSF/1 timeval argument */ - error = copyin(SCARG(uap, tv), &otv, sizeof otv); - if (error != 0) - return error; - - tv.tv_sec = otv.tv_sec; - tv.tv_usec = otv.tv_usec; - tvp = &tv; - } - - /* NetBSD ignores the timezone field */ - - return settimeofday1(tvp, false, (const void *)SCARG(uap, tzp), l, true); -} diff --git a/sys/compat/osf1/syscalls.conf b/sys/compat/osf1/syscalls.conf deleted file mode 100644 index d17d161974b9..000000000000 --- a/sys/compat/osf1/syscalls.conf +++ /dev/null @@ -1,13 +0,0 @@ -# $NetBSD: syscalls.conf,v 1.2 2000/12/13 01:29:16 mycroft Exp $ - -sysnames="osf1_syscalls.c" -sysnumhdr="osf1_syscall.h" -syssw="osf1_sysent.c" -sysarghdr="osf1_syscallargs.h" -compatopts="" -libcompatopts="" - -switchname="osf1_sysent" -namesname="osf1_syscallnames" -constprefix="OSF1_SYS_" -nsysent=512 diff --git a/sys/compat/osf1/syscalls.master b/sys/compat/osf1/syscalls.master deleted file mode 100644 index d2f194608c92..000000000000 --- a/sys/compat/osf1/syscalls.master +++ /dev/null @@ -1,394 +0,0 @@ - $NetBSD: syscalls.master,v 1.49 2013/11/07 19:37:19 njoly Exp $ - -; @(#)syscalls.master 8.1 (Berkeley) 7/19/93 - -; NetBSD COMPAT_OSF1 system call name/number "master" file. -; (See syscalls.conf to see what it is processed into.) -; -; Fields: number type [type-dependent ...] -; number system call number, must be in order -; type one of STD, OBSOL, UNIMPL, NODEF, NOARGS, or one of -; the compatibility options defined in syscalls.conf. -; -; types: -; STD always included -; OBSOL obsolete, not included in system -; UNIMPL unimplemented, not included in system -; NODEF included, but don't define the syscall number -; NOARGS included, but don't define the syscall args structure -; -; The compat options are defined in the syscalls.conf file, and the -; compat option name is prefixed to the syscall name. Other than -; that, they're like NODEF (for 'compat' options), or STD (for -; 'libcompat' options). -; -; The type-dependent arguments are as follows: -; For STD, NODEF, NOARGS, and compat syscalls: -; { pseudo-proto } [alias] -; For other syscalls: -; [comment] -; -; #ifdef's, etc. may be included, and are copied to the output files. -; #include's are copied to the syscall names and switch definition files only. - -#if defined(_KERNEL_OPT) -#include "opt_compat_43.h" -#endif - -#include -#include -#include -#include -#include -#include - -#include -#include - -%% - -0 NOARGS { int|sys||nosys(void); } syscall -1 NOARGS { int|sys||exit(int rval); } -2 NOARGS { int|sys||fork(void); } -3 NOARGS { int|sys||read(int fd, char *buf, u_int nbyte); } -4 NOARGS { int|sys||write(int fd, const char *buf, \ - u_int nbyte); } -5 UNIMPL old open -6 NOARGS { int|sys||close(int fd); } -7 STD { int|osf1_sys||wait4(int pid, int *status, \ - int options, struct osf1_rusage *rusage); } -8 UNIMPL old creat -9 NOARGS { int|sys||link(const char *path, const char *link); } -10 NOARGS { int|sys||unlink(const char *path); } -11 UNIMPL execv -12 NOARGS { int|sys||chdir(const char *path); } -13 NOARGS { int|sys||fchdir(int fd); } -14 STD { int|osf1_sys||mknod(const char *path, int mode, \ - int dev); } -15 NOARGS { int|sys||chmod(const char *path, int mode); } -16 NOARGS { int|sys||__posix_chown(const char *path, int uid, \ - int gid); } -17 NOARGS { int|sys||obreak(char *nsize); } -18 STD { int|osf1_sys||getfsstat(struct osf1_statfs *buf, \ - long bufsize, int flags); } -19 STD { off_t|osf1_sys||lseek(int fd, off_t offset, \ - int whence); } -20 NOARGS { pid_t|sys||getpid_with_ppid(void); } -21 STD { int|osf1_sys||mount(int type, const char *path, \ - int flags, void *data); } -22 STD { int|osf1_sys||unmount(const char *path, int flags); } -23 STD { int|osf1_sys||setuid(uid_t uid); } -24 NOARGS { uid_t|sys||getuid_with_euid(void); } -25 UNIMPL exec_with_loader -26 UNIMPL ptrace -27 STD { int|osf1_sys||recvmsg_xopen(int s, \ - struct osf1_msghdr_xopen *msg, int flags); } -28 STD { int|osf1_sys||sendmsg_xopen(int s, \ - const struct osf1_msghdr_xopen *msg, int flags); } -29 UNIMPL recvfrom -30 UNIMPL accept -31 UNIMPL getpeername -32 UNIMPL getsockname -33 STD { int|osf1_sys||access(const char *path, int flags); } -34 UNIMPL chflags -35 UNIMPL fchflags -36 NOARGS { int|sys||sync(void); } -37 NOARGS { int|sys||kill(int pid, int signum); } -38 UNIMPL old stat -39 NOARGS { int|sys||setpgid(int pid, int pgid); } -40 UNIMPL old lstat -41 NOARGS { int|sys||dup(int fd); } -42 NOARGS { int|sys||pipe(void); } -43 STD { int|osf1_sys||set_program_attributes( \ - void *taddr, unsigned long tsize, \ - void *daddr, unsigned long dsize); } -44 UNIMPL profil -45 STD { int|osf1_sys||open(const char *path, int flags, \ - int mode); } -46 OBSOL sigaction -47 NOARGS { gid_t|sys||getgid_with_egid(void); } -; XXX -48 NOARGS { int|compat_13_sys||sigprocmask(int how, \ - sigset13_t mask); } -49 NOARGS { int|sys||__getlogin(char *namebuf, u_int namelen); } -50 NOARGS { int|sys||__setlogin(const char *namebuf); } -51 NOARGS { int|sys||acct(const char *path); } -52 UNIMPL sigpending -53 STD { int|osf1_sys||classcntl(int opcode, int arg1, \ - int arg2, int arg3); } -54 STD { int|osf1_sys||ioctl(int fd, int com, void *data); } -55 STD { int|osf1_sys||reboot(int opt); } -56 NOARGS { int|sys||revoke(const char *path); } -57 NOARGS { int|sys||symlink(const char *path, \ - const char *link); } -58 NOARGS { int|sys||readlink(const char *path, char *buf, \ - int count); } -59 STD { int|osf1_sys||execve(const char *path, \ - char * const *argp, char * const *envp); } -60 NOARGS { int|sys||umask(int newmask); } -61 NOARGS { int|sys||chroot(const char *path); } -62 UNIMPL old fstat -63 NOARGS { int|sys||getpgrp(void); } -64 NOARGS { int|compat_43_sys||getpagesize(void); } -65 UNIMPL mremap -66 NOARGS { int|sys||vfork(void); } -67 STD { int|osf1_sys||stat(const char *path, \ - struct osf1_stat *ub); } -68 STD { int|osf1_sys||lstat(const char *path, \ - struct osf1_stat *ub); } -69 UNIMPL sbrk -70 UNIMPL sstk -71 STD { void *|osf1_sys||mmap(void *addr, size_t len, \ - int prot, int flags, int fd, off_t pos); } -72 UNIMPL ovadvise -73 NOARGS { int|sys||munmap(void *addr, size_t len); } -74 STD { int|osf1_sys||mprotect(void *addr, size_t len, \ - int prot); } -75 STD { int|osf1_sys||madvise(void *addr, size_t len, \ - int behav); } -76 UNIMPL old vhangup -77 UNIMPL kmodcall -78 UNIMPL mincore -79 NOARGS { int|sys||getgroups(u_int gidsetsize, gid_t *gidset); } -80 NOARGS { int|sys||setgroups(u_int gidsetsize, gid_t *gidset); } -81 UNIMPL old getpgrp -; OSF/1 setpgrp(); identical in function to setpgid(). XXX -82 NOARGS { int|sys||setpgid(int pid, int pgid); } setpgrp -83 STD { int|osf1_sys||setitimer(u_int which, \ - struct osf1_itimerval *itv, \ - struct osf1_itimerval *oitv); } -84 UNIMPL old wait -85 UNIMPL table -86 STD { int|osf1_sys||getitimer(u_int which, struct osf1_itimerval *itv); } -87 NOARGS { int|compat_43_sys||gethostname(char *hostname, \ - u_int len); } -88 NOARGS { int|compat_43_sys||sethostname(const char *hostname, \ - u_int len); } -89 NOARGS { int|compat_43_sys||getdtablesize(void); } -90 NOARGS { int|sys||dup2(int from, int to); } -91 STD { int|osf1_sys||fstat(int fd, void *sb); } -92 STD { int|osf1_sys||fcntl(int fd, int cmd, void *arg); } -93 STD { int|osf1_sys||select(u_int nd, fd_set *in, \ - fd_set *ou, fd_set *ex, struct osf1_timeval *tv); } -; maybe XXX -94 NOARGS { int|sys||poll(struct pollfd *fds, u_int nfds, \ - int timeout); } -95 NOARGS { int|sys||fsync(int fd); } -96 NOARGS { int|sys||setpriority(int which, int who, int prio); } -97 STD { int|osf1_sys||socket(int domain, int type, \ - int protocol); } -98 NOARGS { int|sys||connect(int s, void *name, int namelen); } -99 NOARGS { int|compat_43_sys||accept(int s, void *name, \ - int *anamelen); } -100 NOARGS { int|sys||getpriority(int which, int who); } -101 NOARGS { int|compat_43_sys||send(int s, void *buf, int len, \ - int flags); } -102 NOARGS { int|compat_43_sys||recv(int s, void *buf, int len, \ - int flags); } -103 NOARGS { int|compat_13_sys||sigreturn(\ - struct sigcontext13 *sigcntxp); } -104 NOARGS { int|sys||bind(int s, void *name, int namelen); } -105 NOARGS { int|sys||setsockopt(int s, int level, int name, \ - void *val, int valsize); } -106 NOARGS { int|sys||listen(int s, int backlog); } -107 UNIMPL plock -108 UNIMPL old sigvec -109 UNIMPL old sigblock -110 UNIMPL old sigsetmask -111 NOARGS { int|compat_13_sys||sigsuspend(int mask); } -112 NOARGS { int|compat_43_sys||sigstack(struct sigstack *nss, \ - struct sigstack *oss); } -113 UNIMPL old recvmsg -114 UNIMPL old sendmsg -115 OBSOL vtrace -116 STD { int|osf1_sys||gettimeofday(struct osf1_timeval *tp, \ - struct osf1_timezone *tzp); } -117 STD { int|osf1_sys||getrusage(int who, \ - struct osf1_rusage *rusage); } -; XXX -118 NOARGS { int|sys||getsockopt(int s, int level, int name, \ - void *val, int *avalsize); } -119 UNIMPL -120 STD { int|osf1_sys||readv(int fd, \ - struct osf1_iovec *iovp, u_int iovcnt); } -121 STD { int|osf1_sys||writev(int fd, \ - struct osf1_iovec *iovp, u_int iovcnt); } -122 STD { int|osf1_sys||settimeofday(struct osf1_timeval *tv, \ - struct osf1_timezone *tzp); } -123 NOARGS { int|sys||__posix_fchown(int fd, int uid, int gid); } -124 NOARGS { int|sys||fchmod(int fd, int mode); } -125 NOARGS { int|compat_43_sys||recvfrom(int s, void *buf, \ - size_t len, int flags, void *from, \ - int *fromlenaddr); } -126 NOARGS { int|sys||setreuid(uid_t ruid, uid_t euid); } -127 NOARGS { int|sys||setregid(gid_t rgid, gid_t egid); } -128 NOARGS { int|sys||__posix_rename(const char *from, \ - const char *to); } -129 STD { int|osf1_sys||truncate(const char *path, \ - off_t length); } -130 STD { int|osf1_sys||ftruncate(int fd, off_t length); } -131 NOARGS { int|sys||flock(int fd, int operation); } -132 STD { int|osf1_sys||setgid(gid_t gid); } -133 STD { int|osf1_sys||sendto(int s, void *buf, size_t len, \ - int flags, struct sockaddr *to, int tolen); } -134 NOARGS { int|sys||shutdown(int s, int how); } -135 STD { int|osf1_sys||socketpair(int domain, int type, \ - int protocol, int *rsv); } -136 NOARGS { int|sys||mkdir(const char *path, int mode); } -137 NOARGS { int|sys||rmdir(const char *path); } -138 STD { int|osf1_sys||utimes(const char *path, \ - const struct osf1_timeval *tptr); } -139 OBSOL 4.2 sigreturn -140 UNIMPL adjtime -141 NOARGS { int|compat_43_sys||getpeername(int fdes, \ - void *asa, int *alen); } -142 NOARGS { int32_t|compat_43_sys||gethostid(void); } -143 NOARGS { int|compat_43_sys||sethostid(int32_t hostid); } -; XXX -144 STD { int|osf1_sys||getrlimit(u_int which, \ - struct rlimit *rlp); } -; XXX -145 STD { int|osf1_sys||setrlimit(u_int which, \ - struct rlimit *rlp); } -146 UNIMPL old killpg -147 NOARGS { int|sys||setsid(void); } -148 UNIMPL quotactl -149 NOARGS { int|compat_43_sys||quota(void); } -150 NOARGS { int|compat_43_sys||getsockname(int fdec, \ - void *asa, int *alen); } -151 UNIMPL pread -152 UNIMPL pwrite -153 UNIMPL pid_block -154 UNIMPL pid_unblock -155 UNIMPL signal_urti -156 STD { int|osf1_sys||sigaction(int signum, \ - struct osf1_sigaction *nsa, \ - struct osf1_sigaction *osa); } -157 UNIMPL sigwaitprim -158 UNIMPL nfssvc -159 STD { int|osf1_sys||getdirentries(int fd, char *buf, \ - int nbytes, long *basep); } -160 STD { int|osf1_sys||statfs(const char *path, \ - struct osf1_statfs *buf, int len); } -161 STD { int|osf1_sys||fstatfs(int fd, \ - struct osf1_statfs *buf, int len); } -162 UNIMPL -163 UNIMPL async_daemon -164 UNIMPL getfh -165 NOARGS { int|compat_09_sys||getdomainname(char *domainname, \ - int len); } -166 NOARGS { int|compat_09_sys||setdomainname(char *domainname, \ - int len); } -167 UNIMPL -168 UNIMPL -169 UNIMPL exportfs -170 UNIMPL -171 UNIMPL -172 UNIMPL alt msgctl -173 UNIMPL alt msgget -174 UNIMPL alt msgrcv -175 UNIMPL alt msgsnd -176 UNIMPL alt semctl -177 UNIMPL alt semget -178 UNIMPL alt semop -179 UNIMPL alt uname -180 UNIMPL -181 UNIMPL alt plock -182 UNIMPL lockf -183 UNIMPL -184 UNIMPL getmnt -185 UNIMPL -186 UNIMPL unmount -187 UNIMPL alt sigpending -188 UNIMPL alt setsid -189 UNIMPL -190 UNIMPL -191 UNIMPL -192 UNIMPL -193 UNIMPL -194 UNIMPL -195 UNIMPL -196 UNIMPL -197 UNIMPL -198 UNIMPL -199 UNIMPL swapon -200 UNIMPL msgctl -201 UNIMPL msgget -202 UNIMPL msgrcv -203 UNIMPL msgsnd -204 UNIMPL semctl -205 UNIMPL semget -206 UNIMPL semop -207 STD { int|osf1_sys||uname(struct osf1_uname *name); } -208 NOARGS { int|sys||__posix_lchown(const char *path, int uid, \ - int gid); } -209 STD { void *|osf1_sys||shmat(int shmid, \ - const void *shmaddr, int shmflg); } -210 STD { int|osf1_sys||shmctl(int shmid, int cmd, \ - struct osf1_shmid_ds *buf); } -211 STD { int|osf1_sys||shmdt(const void *shmaddr); } -212 STD { int|osf1_sys||shmget(osf1_key_t key, size_t size, \ - int flags); } -213 UNIMPL mvalid -214 UNIMPL getaddressconf -215 UNIMPL msleep -216 UNIMPL mwakeup -217 UNIMPL msync -218 UNIMPL signal -219 UNIMPL utc gettime -220 UNIMPL utc adjtime -221 UNIMPL -222 UNIMPL security -223 UNIMPL kloadcall -224 STD { int|osf1_sys||stat2(const char *path, \ - struct osf1_stat2 *ub); } -225 STD { int|osf1_sys||lstat2(const char *path, \ - struct osf1_stat2 *ub); } -226 STD { int|osf1_sys||fstat2(int fd, \ - struct osf1_stat2 *sb); } -227 UNIMPL statfs2 -228 UNIMPL fstatfs2 -229 UNIMPL getfsstat2 -230 UNIMPL -231 UNIMPL -232 UNIMPL -233 NOARGS { pid_t|sys||getpgid(pid_t pid); } -234 NOARGS { pid_t|sys||getsid(pid_t pid); } -235 STD { int|osf1_sys||sigaltstack( \ - struct osf1_sigaltstack *nss, \ - struct osf1_sigaltstack *oss); } -236 UNIMPL waitid -237 UNIMPL priocntlset -238 UNIMPL sigsendset -239 UNIMPL set_speculative -240 UNIMPL msfs_syscall -241 STD { int|osf1_sys||sysinfo(int cmd, char *buf, long len); } -242 UNIMPL uadmin -243 UNIMPL fuser -244 UNIMPL proplist_syscall -245 UNIMPL ntp_adjtime -246 UNIMPL ntp_gettime -247 STD { long|osf1_sys||pathconf(const char *path, int name); } -248 STD { long|osf1_sys||fpathconf(int fd, int name); } -249 UNIMPL -250 UNIMPL uswitch -251 STD { int|osf1_sys||usleep_thread( \ - struct osf1_timeval *sleep, \ - struct osf1_timeval *slept); } -252 UNIMPL audcntl -253 UNIMPL audgen -254 UNIMPL sysfs -255 UNIMPL subsys_info -256 STD { int|osf1_sys||getsysinfo(u_long op, void *buffer, \ - u_long nbytes, void *arg, u_long flag); } -257 STD { int|osf1_sys||setsysinfo(u_long op, void *buffer, \ - u_long nbytes, void *arg, u_long flag); } -258 UNIMPL afs_syscall -259 UNIMPL swapctl -260 UNIMPL memcntl -261 UNIMPL fdatasync -262 UNIMPL oflock -263 UNIMPL _F64_readv -264 UNIMPL _F64_writev -265 UNIMPL cdslxlate -266 UNIMPL sendfile diff --git a/sys/conf/files b/sys/conf/files index 484c976a69ae..3c1f4b3433e4 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -1,4 +1,4 @@ -# $NetBSD: files,v 1.1231 2019/03/17 01:06:42 tnn Exp $ +# $NetBSD: files,v 1.1232 2019/03/25 19:24:30 maxv Exp $ # @(#)files.newconf 7.5 (Berkeley) 5/10/93 version 20171118 @@ -155,7 +155,6 @@ defflag COMPAT_OSSAUDIO defflag COMPAT_43 defflag COMPAT_FREEBSD: COMPAT_09, COMPAT_43 defflag COMPAT_LINUX: COMPAT_NETBSD, COMPAT_43 -defflag COMPAT_OSF1 defflag COMPAT_SUNOS: COMPAT_09, COMPAT_43 defflag COMPAT_ULTRIX: COMPAT_50 defflag COMPAT_NETBSD32 diff --git a/sys/sys/ioctl.h b/sys/sys/ioctl.h index 8783e1f6b4c1..83f60b9ddb93 100644 --- a/sys/sys/ioctl.h +++ b/sys/sys/ioctl.h @@ -1,4 +1,4 @@ -/* $NetBSD: ioctl.h,v 1.38 2018/12/29 11:30:12 maxv Exp $ */ +/* $NetBSD: ioctl.h,v 1.39 2019/03/25 19:24:31 maxv Exp $ */ /*- * Copyright (c) 1982, 1986, 1990, 1993, 1994 @@ -105,11 +105,10 @@ __END_DECLS #include "opt_compat_freebsd.h" #include "opt_compat_sunos.h" #include "opt_compat_43.h" -#include "opt_compat_osf1.h" #include "opt_modular.h" #endif #if defined(USE_OLD_TTY) || defined(COMPAT_43) || defined(COMPAT_SUNOS) || \ - defined(COMPAT_FREEBSD) || defined(COMPAT_OSF1) || defined(MODULAR) + defined(COMPAT_FREEBSD) || defined(MODULAR) #include #endif diff --git a/usr.bin/kdump/setemul.c b/usr.bin/kdump/setemul.c index 3e8f67a3fe17..fbc581f3d60d 100644 --- a/usr.bin/kdump/setemul.c +++ b/usr.bin/kdump/setemul.c @@ -1,4 +1,4 @@ -/* $NetBSD: setemul.c,v 1.31 2018/12/29 18:09:32 martin Exp $ */ +/* $NetBSD: setemul.c,v 1.32 2019/03/25 19:24:31 maxv Exp $ */ /*- * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -62,7 +62,7 @@ #include #ifndef lint -__RCSID("$NetBSD: setemul.c,v 1.31 2018/12/29 18:09:32 martin Exp $"); +__RCSID("$NetBSD: setemul.c,v 1.32 2019/03/25 19:24:31 maxv Exp $"); #endif /* not lint */ #include @@ -85,7 +85,6 @@ __RCSID("$NetBSD: setemul.c,v 1.31 2018/12/29 18:09:32 martin Exp $"); #include "../../sys/compat/freebsd/freebsd_syscall.h" #include "../../sys/compat/linux/linux_syscall.h" #include "../../sys/compat/linux32/linux32_syscall.h" -#include "../../sys/compat/osf1/osf1_syscall.h" #include "../../sys/compat/sunos32/sunos32_syscall.h" #include "../../sys/compat/sunos/sunos_syscall.h" #include "../../sys/compat/ultrix/ultrix_syscall.h" @@ -100,7 +99,6 @@ __RCSID("$NetBSD: setemul.c,v 1.31 2018/12/29 18:09:32 martin Exp $"); #include "../../sys/compat/freebsd/freebsd_syscalls.c" #include "../../sys/compat/linux/linux_syscalls.c" #include "../../sys/compat/linux32/linux32_syscalls.c" -#include "../../sys/compat/osf1/osf1_syscalls.c" #include "../../sys/compat/sunos/sunos_syscalls.c" #include "../../sys/compat/sunos32/sunos32_syscalls.c" #include "../../sys/compat/ultrix/ultrix_syscalls.c" @@ -108,12 +106,10 @@ __RCSID("$NetBSD: setemul.c,v 1.31 2018/12/29 18:09:32 martin Exp $"); #include "../../sys/compat/aoutm68k/aoutm68k_syscalls.c" #endif -#include "../../sys/compat/osf1/osf1_errno.c" #include "../../sys/compat/linux/common/linux_errno.c" #undef KTRACE #define SIGRTMIN 33 /* XXX */ -#include "../../sys/compat/osf1/osf1_signo.c" #include "../../sys/compat/linux/common/linux_signo.c" #define NELEM(a) (sizeof(a) / sizeof(a[0])) @@ -140,10 +136,6 @@ const struct emulation emulations[] = { native_to_linux_errno, NELEM(native_to_linux_errno), linux_to_native_signo, NSIG, EMUL_FLAG_NETBSD32 }, - { "osf1", osf1_syscallnames, OSF1_SYS_MAXSYSCALL, - native_to_osf1_errno, NELEM(native_to_osf1_errno), - osf1_to_native_signo, NSIG, 0 }, - { "sunos32", sunos32_syscallnames, SUNOS32_SYS_MAXSYSCALL, NULL, 0, NULL, 0, EMUL_FLAG_NETBSD32 },