summaryrefslogtreecommitdiff
path: root/sys/compat
diff options
context:
space:
mode:
authorTed Unangst <tedu@cvs.openbsd.org>2010-06-30 20:39:30 +0000
committerTed Unangst <tedu@cvs.openbsd.org>2010-06-30 20:39:30 +0000
commit521d5ae08639910a1ee34593150928a885b1a834 (patch)
treed8a11728d8bc8e41e89bdd86b06e0ea6748c6070 /sys/compat
parentb300c3fb26343782f5bd6c3d25ac3077e4e3c083 (diff)
delete osf1 compat files
Diffstat (limited to 'sys/compat')
-rw-r--r--sys/compat/osf1/Makefile11
-rw-r--r--sys/compat/osf1/README.dynamic55
-rw-r--r--sys/compat/osf1/README.mach-traps69
-rw-r--r--sys/compat/osf1/README.syscalls164
-rw-r--r--sys/compat/osf1/files.osf135
-rw-r--r--sys/compat/osf1/osf1.h599
-rw-r--r--sys/compat/osf1/osf1_cvt.c705
-rw-r--r--sys/compat/osf1/osf1_cvt.h98
-rw-r--r--sys/compat/osf1/osf1_cvt_errno.c138
-rw-r--r--sys/compat/osf1/osf1_cvt_signal.c112
-rw-r--r--sys/compat/osf1/osf1_descrip.c291
-rw-r--r--sys/compat/osf1/osf1_errno.h149
-rw-r--r--sys/compat/osf1/osf1_exec.c343
-rw-r--r--sys/compat/osf1/osf1_file.c348
-rw-r--r--sys/compat/osf1/osf1_generic.c213
-rw-r--r--sys/compat/osf1/osf1_ioctl.c274
-rw-r--r--sys/compat/osf1/osf1_misc.c355
-rw-r--r--sys/compat/osf1/osf1_mmap.c229
-rw-r--r--sys/compat/osf1/osf1_mount.c361
-rw-r--r--sys/compat/osf1/osf1_prot.c142
-rw-r--r--sys/compat/osf1/osf1_resource.c171
-rw-r--r--sys/compat/osf1/osf1_signal.c381
-rw-r--r--sys/compat/osf1/osf1_signal.h51
-rw-r--r--sys/compat/osf1/osf1_socket.c229
-rw-r--r--sys/compat/osf1/osf1_syscall.h401
-rw-r--r--sys/compat/osf1/osf1_syscallargs.h467
-rw-r--r--sys/compat/osf1/osf1_syscalls.c277
-rw-r--r--sys/compat/osf1/osf1_sysent.c552
-rw-r--r--sys/compat/osf1/osf1_sysv_ipc.c88
-rw-r--r--sys/compat/osf1/osf1_time.c239
-rw-r--r--sys/compat/osf1/osf1_util.h17
-rw-r--r--sys/compat/osf1/syscalls.conf13
-rw-r--r--sys/compat/osf1/syscalls.master382
33 files changed, 0 insertions, 7959 deletions
diff --git a/sys/compat/osf1/Makefile b/sys/compat/osf1/Makefile
deleted file mode 100644
index 3b2fc0e7773..00000000000
--- a/sys/compat/osf1/Makefile
+++ /dev/null
@@ -1,11 +0,0 @@
-# $OpenBSD: Makefile,v 1.5 2001/08/26 03:23:44 deraadt Exp $
-# $NetBSD: Makefile,v 1.1 1995/02/13 21:39:00 cgd Exp $
-
-DEP= syscalls.conf syscalls.master ../../kern/makesyscalls.sh
-OBJS= osf1_sysent.c osf1_syscalls.c osf1_syscall.h osf1_syscallargs.h
-
-${OBJS}: ${DEP}
- sh ../../kern/makesyscalls.sh syscalls.conf syscalls.master
-
-clean:
- rm -f ${OBJS}
diff --git a/sys/compat/osf1/README.dynamic b/sys/compat/osf1/README.dynamic
deleted file mode 100644
index b8bba3b7bad..00000000000
--- a/sys/compat/osf1/README.dynamic
+++ /dev/null
@@ -1,55 +0,0 @@
-$OpenBSD: README.dynamic,v 1.5 2001/07/09 05:15:23 fgsch Exp $
-$NetBSD: README.dynamic,v 1.2 1999/04/27 06:39:49 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 c534546cdae..00000000000
--- a/sys/compat/osf1/README.mach-traps
+++ /dev/null
@@ -1,69 +0,0 @@
-$OpenBSD: README.mach-traps,v 1.4 2001/07/09 05:15:23 fgsch Exp $
-$NetBSD: README.mach-traps,v 1.1 1995/02/13 21:39:02 cgd 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.
-
-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 <mach/syscall_sw.h>.
-
-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 89ae0406e22..00000000000
--- a/sys/compat/osf1/README.syscalls
+++ /dev/null
@@ -1,164 +0,0 @@
-$OpenBSD: README.syscalls,v 1.5 2008/03/09 12:03:03 sobrado Exp $
-$NetBSD: README.syscalls,v 1.2 1999/04/27 16:09:28 cgd 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 b853b3c9d7f..00000000000
--- a/sys/compat/osf1/files.osf1
+++ /dev/null
@@ -1,35 +0,0 @@
-# $OpenBSD: files.osf1,v 1.5 2000/08/04 15:47:54 ericj Exp $
-# $NetBSD: files.osf1,v 1.15 1999/05/01 05:49:01 cgd 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
-
-# syscall table-related files
-file compat/osf1/osf1_syscalls.c compat_osf1 & syscall_debug
-file compat/osf1/osf1_sysent.c compat_osf1
-
-# OSF/1 <-> OpenBSD structure, flag, and value conversion files
-file compat/osf1/osf1_cvt.c compat_osf1
-file compat/osf1/osf1_cvt_errno.c compat_osf1
-file compat/osf1/osf1_cvt_signal.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_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_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 2a20142b384..00000000000
--- a/sys/compat/osf1/osf1.h
+++ /dev/null
@@ -1,599 +0,0 @@
-/* $OpenBSD: osf1.h,v 1.3 2002/03/14 01:26:50 millert Exp $ */
-/* $NetBSD: osf1.h,v 1.20 1999/05/10 21:41:07 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.
- */
-
-#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 <sys/types.h>
-#include <compat/osf1/osf1_errno.h>
-#include <compat/osf1/osf1_signal.h>
-
-/*
- * 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 void (*osf1_handler_t)(int);
-
-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) */
-
-#define sigemptyset(s) bzero((s), sizeof(*(s)))
-#define sigismember(s, n) (*(s) & sigmask(n))
-#define sigaddset(s, n) (*(s) |= sigmask(n))
-
-struct osf1_sigaction {
- osf1_handler_t sa__handler;
- osf1_sigset_t sa_mask;
- int sa_flags;
-};
-
-/* 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;
-};
-
-
-/* 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 */
-
-
-#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 48f7aa6c2ae..00000000000
--- a/sys/compat/osf1/osf1_cvt.c
+++ /dev/null
@@ -1,705 +0,0 @@
-/* $OpenBSD: osf1_cvt.c,v 1.3 2006/02/16 20:32:33 miod Exp $ */
-/* $NetBSD: osf1_cvt.c,v 1.7 1999/06/26 01:23:23 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.
- */
-
-/*
- * 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 <sys/param.h>
-#include <sys/systm.h>
-#include <sys/namei.h>
-#include <sys/proc.h>
-#include <sys/file.h>
-#include <sys/stat.h>
-#include <sys/filedesc.h>
-#include <sys/kernel.h>
-#include <sys/malloc.h>
-#include <sys/mman.h>
-#include <sys/mount.h>
-#include <sys/signal.h>
-#include <sys/signalvar.h>
-#include <sys/reboot.h>
-#include <sys/syscallargs.h>
-#include <sys/exec.h>
-#include <sys/vnode.h>
-#include <sys/socketvar.h>
-#include <sys/resource.h>
-#include <sys/resourcevar.h>
-#include <sys/wait.h>
-#include <uvm/uvm_extern.h> /* XXX see mmap emulation */
-
-#include <nfs/rpcv2.h>
-#include <nfs/nfsproto.h>
-#include <nfs/nfs.h>
-#include <nfs/nfsmount.h>
-
-#include <compat/osf1/osf1.h>
-#include <compat/osf1/osf1_util.h>
-#include <compat/osf1/osf1_cvt.h>
-
-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 },
- { OSF1_RB_DFLTROOT, OSF1_RB_DFLTROOT, RB_DFLTROOT },
-#if 0 /* no equivalents +++ */
- { 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_sigaltstack_flags_rxtab[] = {
- { SS_ONSTACK, SS_ONSTACK, OSF1_SS_ONSTACK },
- { SS_DISABLE, SS_DISABLE, OSF1_SS_DISABLE },
-#if 0 /* XXX no equivalents */
- { ???, ???, OSF1_SS_NOMASK },
- { ???, ???, OSF1_SS_UCONTEXT },
-#endif
- { 0 },
-};
-
-const struct emul_flags_xtab osf1_sigaltstack_flags_xtab[] = {
- { OSF1_SS_ONSTACK, OSF1_SS_ONSTACK, SS_ONSTACK },
- { OSF1_SS_DISABLE, OSF1_SS_DISABLE, SS_DISABLE },
-#if 0 /* XXX no equivalents */
- { OSF1_SS_NOMASK, OSF1_SS_NOMASK, ??? },
- { OSF1_SS_UCONTEXT, OSF1_SS_UCONTEXT, ??? },
-#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(nf, of)
- 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(of, nf)
- 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(omh, bmh)
- 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(oname, bnamep)
- int oname, *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(ru, oru)
- 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(bsa, osa)
- const struct sigaction *bsa;
- struct osf1_sigaction *osa;
-{
- osa->sa__handler = bsa->sa_handler;
- osf1_cvt_sigset_from_native(&bsa->sa_mask, &osa->sa_mask);
- osa->sa_flags = 0;
-
- /* Translate by hand */
- if ((bsa->sa_flags & SA_ONSTACK) != 0)
- osa->sa_flags |= OSF1_SA_ONSTACK;
- if ((bsa->sa_flags & SA_RESTART) != 0)
- osa->sa_flags |= OSF1_SA_RESTART;
- if ((bsa->sa_flags & SA_NOCLDSTOP) != 0)
- osa->sa_flags |= OSF1_SA_NOCLDSTOP;
- if ((bsa->sa_flags & SA_NOCLDWAIT) != 0)
- osa->sa_flags |= OSF1_SA_NOCLDWAIT;
- if ((bsa->sa_flags & SA_NODEFER) != 0)
- osa->sa_flags |= OSF1_SA_NODEFER;
- if ((bsa->sa_flags & SA_RESETHAND) != 0)
- osa->sa_flags |= OSF1_SA_RESETHAND;
- if ((bsa->sa_flags & SA_SIGINFO) != 0)
- osa->sa_flags |= OSF1_SA_SIGINFO;
-}
-
-int
-osf1_cvt_sigaction_to_native(osa, bsa)
- const struct osf1_sigaction *osa;
- struct sigaction *bsa;
-{
- bsa->sa_handler = osa->sa__handler;
- osf1_cvt_sigset_to_native(&osa->sa_mask, &bsa->sa_mask);
- bsa->sa_flags = 0;
-
- /* Translate by hand */
- if ((osa->sa_flags & OSF1_SA_ONSTACK) != 0)
- bsa->sa_flags |= SA_ONSTACK;
- if ((osa->sa_flags & OSF1_SA_RESTART) != 0)
- bsa->sa_flags |= SA_RESTART;
- if ((osa->sa_flags & OSF1_SA_RESETHAND) != 0)
- bsa->sa_flags |= SA_RESETHAND;
- if ((osa->sa_flags & OSF1_SA_NOCLDSTOP) != 0)
- bsa->sa_flags |= SA_NOCLDSTOP;
- if ((osa->sa_flags & OSF1_SA_NOCLDWAIT) != 0)
- bsa->sa_flags |= SA_NOCLDWAIT;
- if ((osa->sa_flags & OSF1_SA_NODEFER) != 0)
- bsa->sa_flags |= SA_NODEFER;
- if ((osa->sa_flags & OSF1_SA_SIGINFO) != 0)
- bsa->sa_flags |= SA_SIGINFO;
-
- return(0);
-}
-
-void
-osf1_cvt_sigaltstack_from_native(bss, oss)
- const struct sigaltstack *bss;
- struct osf1_sigaltstack *oss;
-{
-
- oss->ss_sp = bss->ss_sp;
- oss->ss_size = bss->ss_size;
-
- /* translate flags */
- oss->ss_flags = emul_flags_translate(osf1_sigaltstack_flags_rxtab,
- bss->ss_flags, NULL);
-}
-
-int
-osf1_cvt_sigaltstack_to_native(oss, bss)
- const struct osf1_sigaltstack *oss;
- struct sigaltstack *bss;
-{
- unsigned long leftovers;
-
- bss->ss_sp = oss->ss_sp;
- bss->ss_size = oss->ss_size;
-
- /* translate flags */
- bss->ss_flags = emul_flags_translate(osf1_sigaltstack_flags_xtab,
- oss->ss_flags, &leftovers);
-
- if (leftovers != 0) {
- printf("osf1_cvt_sigaltstack_to_native: leftovers = 0x%lx\n",
- leftovers);
- return (EINVAL);
- }
-
- return (0);
-}
-
-void
-osf1_cvt_sigset_from_native(bss, oss)
- 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 = osf1_signal_rxlist[i];
- if (newsig)
- osf1_sigaddset(oss, newsig);
- }
- }
-}
-
-int
-osf1_cvt_sigset_to_native(oss, bss)
- 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_signal_xlist[i];
- if (newsig)
- sigaddset(bss, newsig);
- }
- }
- return (0);
-}
-
-/*
- * Convert from a stat structure to an osf1 stat structure.
- */
-void
-osf1_cvt_stat_from_native(st, ost)
- 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;
-}
-
-void
-osf1_cvt_statfs_from_native(bsfs, osfs)
- const struct statfs *bsfs;
- struct osf1_statfs *osfs;
-{
-
- memset(osfs, 0, sizeof (struct osf1_statfs));
- if (!strncmp(MOUNT_FFS, bsfs->f_fstypename, MFSNAMELEN))
- osfs->f_type = OSF1_MOUNT_UFS;
- else if (!strncmp(MOUNT_NFS, bsfs->f_fstypename, MFSNAMELEN))
- osfs->f_type = OSF1_MOUNT_NFS;
- else if (!strncmp(MOUNT_MFS, bsfs->f_fstypename, MFSNAMELEN))
- 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_flags; /* XXX translate */
- osfs->f_fsize = bsfs->f_bsize;
- osfs->f_bsize = bsfs->f_iosize;
- 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_fsid,
- max(sizeof bsfs->f_fsid, sizeof osfs->f_fsid));
- /* osfs->f_spare zeroed above */
- memcpy(osfs->f_mntonname, bsfs->f_mntonname,
- max(sizeof bsfs->f_mntonname, sizeof osfs->f_mntonname));
- memcpy(osfs->f_mntfromname, bsfs->f_mntfromname,
- max(sizeof 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 1f8dd8f43b1..00000000000
--- a/sys/compat/osf1/osf1_cvt.h
+++ /dev/null
@@ -1,98 +0,0 @@
-/* $OpenBSD: osf1_cvt.h,v 1.1 2000/08/04 15:47:54 ericj Exp $ */
-/* $NetBSD: osf1_cvt.h,v 1.5 1999/05/10 05:58:44 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.
- */
-
-#ifndef _COMPAT_OSF1_OSF1_CVT_H_
-#define _COMPAT_OSF1_OSF1_CVT_H_
-
-#include <sys/param.h>
-#include <sys/proc.h>
-#include <sys/mount.h>
-#include <sys/resource.h>
-#include <sys/signal.h>
-#include <sys/stat.h>
-#include <sys/fcntl.h>
-
-#include <compat/common/compat_util.h>
-
-#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);
-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_sigaltstack_from_native(const struct sigaltstack *nss,
- struct osf1_sigaltstack *oss);
-int osf1_cvt_sigaltstack_to_native(const struct osf1_sigaltstack *oss,
- struct sigaltstack *nss);
-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_statfs_from_native(const struct statfs *nsfs,
- struct osf1_statfs *osfs);
-
-extern const int osf1_errno_rxlist[];
-extern const int osf1_signal_xlist[];
-extern const int osf1_signal_rxlist[];
-
-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_cvt_errno.c b/sys/compat/osf1/osf1_cvt_errno.c
deleted file mode 100644
index a57b14f3c35..00000000000
--- a/sys/compat/osf1/osf1_cvt_errno.c
+++ /dev/null
@@ -1,138 +0,0 @@
-/* $OpenBSD: osf1_cvt_errno.c,v 1.3 2009/10/28 16:38:43 jsg Exp $ */
-/* $NetBSD: osf1_cvt_errno.c,v 1.4 1999/05/01 02:16:01 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.
- */
-
-#include <sys/errno.h>
-#include <compat/osf1/osf1.h>
-#include <compat/osf1/osf1_cvt.h>
-
-/*
- * 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 osf1_errno_rxlist[1 + ELAST] = {
- 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_ENOSYS, /* EIPSEC (82) has no equivalent */
- OSF1_ENOSYS, /* ENOATTR (83) has no equivalent */
- OSF1_EILSEQ, /* EILSEQ (84) -> 116 */
- OSF1_ENOSYS, /* ENOMEDIUM (85) has no equivalent */
- OSF1_ENOSYS, /* EMEDIUMTYPE (86) has no equivalent */
- OSF1_EOVERFLOW, /* EOVERFLOW (87) -> 103 */
- OSF1_ECANCELED, /* ECANCELED (88) -> 94 */
- OSF1_EIDRM, /* EIDRM (89) -> 81 */
- OSF1_ENOMSG, /* ENOMSG (90) -> 80 */
- OSF1_ENOTSUP /* ENOTSUP (91) -> 99 */
-};
diff --git a/sys/compat/osf1/osf1_cvt_signal.c b/sys/compat/osf1/osf1_cvt_signal.c
deleted file mode 100644
index 1ae4d84e7a3..00000000000
--- a/sys/compat/osf1/osf1_cvt_signal.c
+++ /dev/null
@@ -1,112 +0,0 @@
-/* $OpenBSD: osf1_cvt_signal.c,v 1.1 2000/08/04 15:47:54 ericj Exp $ */
-/* $NetBSD: osf1_signal.c,v 1.13 1999/04/30 05:24:04 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.
- */
-
-#include <compat/osf1/osf1.h>
-#include <compat/osf1/osf1_cvt.h>
-
-/*
- * These tables are used to translate between NetBSD and OSF/1 signal
- * numbers.
- *
- * XXX IT IS NOT UP TO DATE.
- */
-
-const int osf1_signal_rxlist[] = {
- 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_signal_xlist[] = {
- 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_descrip.c b/sys/compat/osf1/osf1_descrip.c
deleted file mode 100644
index 4dfabbd2e8b..00000000000
--- a/sys/compat/osf1/osf1_descrip.c
+++ /dev/null
@@ -1,291 +0,0 @@
-/* $OpenBSD: osf1_descrip.c,v 1.8 2002/02/13 19:08:06 art Exp $ */
-/* $NetBSD: osf1_descrip.c,v 1.5 1999/06/26 01:24:41 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.
- */
-
-/*
- * 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 <sys/param.h>
-#include <sys/systm.h>
-#include <sys/namei.h>
-#include <sys/proc.h>
-#include <sys/file.h>
-#include <sys/stat.h>
-#include <sys/filedesc.h>
-#include <sys/kernel.h>
-#include <sys/malloc.h>
-#include <sys/mman.h>
-#include <sys/mount.h>
-#include <sys/signal.h>
-#include <sys/signalvar.h>
-#include <sys/reboot.h>
-#include <sys/syscallargs.h>
-#include <sys/exec.h>
-#include <sys/vnode.h>
-#include <sys/socketvar.h>
-#include <sys/resource.h>
-#include <sys/resourcevar.h>
-#include <sys/wait.h>
-
-#include <compat/osf1/osf1.h>
-#include <compat/osf1/osf1_syscallargs.h>
-#include <compat/osf1/osf1_cvt.h>
-
-int
-osf1_sys_fcntl(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct osf1_sys_fcntl_args *uap = v;
- struct sys_fcntl_args a;
- struct osf1_flock oflock;
- struct flock nflock;
- unsigned long xfl, leftovers;
- caddr_t sg;
- int error;
-
- sg = stackgap_init(p->p_emul);
-
- 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;
- SCARG(&a, arg) = stackgap_alloc(&sg, sizeof nflock);
-
- error = copyin(SCARG(uap, arg), &oflock, sizeof oflock);
- if (error == 0)
- error = osf1_cvt_flock_to_native(&oflock, &nflock);
- if (error == 0)
- error = copyout(&nflock, SCARG(&a, arg),
- sizeof nflock);
- if (error != 0)
- return (error);
- break;
-
- 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(p, &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;
-
- case OSF1_F_GETLK:
- error = copyin(SCARG(&a, arg), &nflock, sizeof nflock);
- if (error == 0) {
- osf1_cvt_flock_from_native(&nflock, &oflock);
- error = copyout(&oflock, SCARG(uap, arg),
- sizeof oflock);
- }
- break;
- }
-
- return error;
-}
-
-int
-osf1_sys_fpathconf(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct osf1_sys_fpathconf_args *uap = v;
- 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(p, &a, retval);
-
- return (error);
-}
-
-/*
- * Return status information about a file descriptor.
- */
-int
-osf1_sys_fstat(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct osf1_sys_fstat_args *uap = v;
- struct filedesc *fdp = p->p_fd;
- struct file *fp;
- struct stat ub;
- struct osf1_stat oub;
- int error;
-
- if ((fp = fd_getfile(fdp, SCARG(uap, fd))) == NULL)
- return (EBADF);
-
- FREF(fp);
- error = (*fp->f_ops->fo_stat)(fp, &ub, p);
- FRELE(fp);
- osf1_cvt_stat_from_native(&ub, &oub);
- if (error == 0)
- error = copyout((caddr_t)&oub, (caddr_t)SCARG(uap, sb),
- sizeof (oub));
-
- return (error);
-}
-
-int
-osf1_sys_ftruncate(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct osf1_sys_ftruncate_args *uap = v;
- struct sys_ftruncate_args a;
-
- SCARG(&a, fd) = SCARG(uap, fd);
- SCARG(&a, pad) = 0;
- SCARG(&a, length) = SCARG(uap, length);
-
- return sys_ftruncate(p, &a, retval);
-}
-
-int
-osf1_sys_lseek(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct osf1_sys_lseek_args *uap = v;
- 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(p, &a, retval);
-}
diff --git a/sys/compat/osf1/osf1_errno.h b/sys/compat/osf1/osf1_errno.h
deleted file mode 100644
index c69e14321ea..00000000000
--- a/sys/compat/osf1/osf1_errno.h
+++ /dev/null
@@ -1,149 +0,0 @@
-/* $OpenBSD: osf1_errno.h,v 1.1 2000/08/04 15:47:54 ericj Exp $ */
-/* $NetBSD: osf1_errno.h,v 1.2 1999/04/23 18:00:34 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
- * <sys/errno.h>.
- */
-
-#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 b9fcd97a7b6..00000000000
--- a/sys/compat/osf1/osf1_exec.c
+++ /dev/null
@@ -1,343 +0,0 @@
-/* $OpenBSD: osf1_exec.c,v 1.6 2009/03/05 19:52:24 kettenis Exp $ */
-/* $NetBSD$ */
-
-/*
- * 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 <sys/param.h>
-#include <sys/systm.h>
-#include <sys/kernel.h>
-#include <sys/proc.h>
-#include <sys/malloc.h>
-#include <sys/namei.h>
-#include <sys/vnode.h>
-#include <sys/mount.h>
-#include <sys/core.h>
-#include <sys/exec.h>
-#include <sys/exec_ecoff.h>
-#include <sys/signalvar.h>
-#include <sys/fcntl.h>
-#include <sys/stat.h>
-
-#include <compat/osf1/osf1.h>
-#include <compat/osf1/osf1_syscall.h>
-#include <compat/osf1/osf1_util.h>
-#include <compat/osf1/osf1_cvt.h>
-
-extern int scdebug;
-extern char *osf1_syscallnames[];
-
-
-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 void *osf1_copyargs(struct exec_package *pack,
- struct ps_strings *arginfo, void *stack, void *argp);
-int osf1_exec_ecoff_hook(struct proc *, struct exec_package *);
-static int osf1_exec_ecoff_dynamic(struct proc *, struct exec_package *);
-
-#define MAX_AUX_ENTRIES 4 /* max we'll ever push (right now) */
-
-extern struct sysent osf1_sysent[];
-extern void cpu_exec_ecoff_setregs(struct proc *, struct exec_package *,
- u_long, register_t *);
-extern char osf1_sigcode[], osf1_esigcode[];
-
-struct emul emul_osf1 = {
- "osf1",
- NULL,
- sendsig,
- OSF1_SYS_syscall,
- OSF1_SYS_MAXSYSCALL,
- osf1_sysent,
-#ifdef SYSCALL_DEBUG
- osf1_syscallnames,
-#else
- NULL,
-#endif
- 0,
- osf1_copyargs,
- cpu_exec_ecoff_setregs,
- NULL,
- coredump_trad,
- osf1_sigcode,
- osf1_esigcode,
-};
-
-int
-osf1_exec_ecoff_hook(struct proc *p, struct exec_package *epp)
-{
- struct ecoff_exechdr *execp = (struct ecoff_exechdr *)epp->ep_hdr;
- struct osf1_exec_emul_arg *emul_arg;
- int error;
-
- /* if we're here and we're exec-able at all, we're an OSF/1 binary */
- epp->ep_emul = &emul_osf1;
-
- /* set up the exec package emul arg as appropriate */
- emul_arg = malloc(sizeof *emul_arg, M_TEMP, M_WAITOK);
- epp->ep_emul_arg = emul_arg;
-
- emul_arg->flags = 0;
- if (epp->ep_ndp->ni_segflg == UIO_SYSSPACE)
- error = copystr(epp->ep_ndp->ni_dirp, emul_arg->exec_name,
- MAXPATHLEN + 1, NULL);
- else
- error = copyinstr(epp->ep_ndp->ni_dirp, emul_arg->exec_name,
- MAXPATHLEN + 1, NULL);
-#ifdef DIAGNOSTIC
- if (error != 0)
- panic("osf1_exec_ecoff_hook: copyinstr failed");
-#endif
-
- /* 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! */
- uprintf("can't execute OSF/1 shared libraries\n");
- error = ENOEXEC;
- break;
-
- case ECOFF_OBJECT_TYPE_CALL_SHARED:
- error = osf1_exec_ecoff_dynamic(p, epp);
- break;
-
- default:
- /* just let the normal ECOFF handlers deal with it. */
- error = 0;
- break;
- }
-
- if (error) {
- free(epp->ep_emul_arg, M_TEMP);
- epp->ep_emul_arg = NULL;
- 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.
- */
-static void *
-osf1_copyargs(pack, arginfo, stack, argp)
- struct exec_package *pack;
- struct ps_strings *arginfo;
- void *stack;
- void *argp;
-{
- struct proc *p = curproc; /* XXX !!! */
- struct osf1_exec_emul_arg *emul_arg = pack->ep_emul_arg;
- struct osf1_auxv ai[MAX_AUX_ENTRIES], *a;
- char *prognameloc, *loadernameloc;
- size_t len;
-
- stack = copyargs(pack, arginfo, stack, argp);
- if (!stack)
- goto bad;
-
- a = ai;
- memset(ai, 0, sizeof ai);
-
- prognameloc = (char *)stack + sizeof ai;
- if (copyoutstr(emul_arg->exec_name, prognameloc, MAXPATHLEN + 1, NULL))
- goto bad;
- 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 (copyoutstr(emul_arg->loader_name, loadernameloc,
- MAXPATHLEN + 1, NULL))
- goto bad;
- 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 (p->p_flag & P_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 (copyout(ai, stack, len))
- goto bad;
- stack = (caddr_t)stack + len;
-
-out:
- free(pack->ep_emul_arg, M_TEMP);
- pack->ep_emul_arg = NULL;
- return stack;
-
-bad:
- stack = NULL;
- goto out;
-}
-
-static int
-osf1_exec_ecoff_dynamic(struct proc *p, struct exec_package *epp)
-{
- struct osf1_exec_emul_arg *emul_arg = epp->ep_emul_arg;
- struct ecoff_exechdr ldr_exechdr;
- struct nameidata nd;
- struct vnode *ldr_vp;
- char *pathbuf;
- size_t resid;
- int error;
-
- /*
- * locate the loader
- */
- error = emul_find(p, NULL, osf1_emul_path,
- OSF1_LDR_EXEC_DEFAULT_LOADER, &pathbuf, 0);
- /* includes /emul/osf1 if appropriate */
- strlcpy(emul_arg->loader_name, pathbuf, sizeof(emul_arg->loader_name));
- emul_arg->flags |= OSF1_EXEC_EMUL_FLAGS_HAVE_LOADER;
- if (!error)
- free((char *)pathbuf, M_TEMP);
-
- uprintf("loader is %s\n", emul_arg->loader_name);
-
- /*
- * open the loader, see if it's an ECOFF executable,
- * make sure the object type is amenable, then arrange to
- * load it up.
- */
- NDINIT(&nd, LOOKUP, FOLLOW | LOCKLEAF, UIO_SYSSPACE,
- emul_arg->loader_name, p);
- if ((error = namei(&nd)) != 0)
- goto bad_no_vp;
- ldr_vp = nd.ni_vp;
-
- /*
- * 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, p->p_ucred, p)) != 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, 0, p);
-
- /*
- * read the header, and make sure we got all of it.
- */
- if ((error = vn_rdwr(UIO_READ, ldr_vp, (caddr_t)&ldr_exechdr,
- sizeof ldr_exechdr, 0, UIO_SYSSPACE, 0, p->p_ucred,
- &resid, p)) != 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(p, epp);
- break;
- case ECOFF_NMAGIC:
- error = exec_ecoff_prep_nmagic(p, epp);
- break;
- case ECOFF_ZMAGIC:
- error = exec_ecoff_prep_zmagic(p, epp);
- break;
- default:
- error = ENOEXEC;
- }
- if (error)
- goto bad;
-
- vrele(ldr_vp);
- return (0);
-
-badunlock:
- VOP_UNLOCK(ldr_vp, 0, p);
-bad:
- vrele(ldr_vp);
-bad_no_vp:
- return (error);
-}
diff --git a/sys/compat/osf1/osf1_file.c b/sys/compat/osf1/osf1_file.c
deleted file mode 100644
index 23e472e6ff9..00000000000
--- a/sys/compat/osf1/osf1_file.c
+++ /dev/null
@@ -1,348 +0,0 @@
-/* $OpenBSD: osf1_file.c,v 1.1 2000/08/04 15:47:55 ericj Exp $ */
-/* $NetBSD: osf1_file.c,v 1.6 2000/06/06 19:04:17 soren 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 <sys/param.h>
-#include <sys/systm.h>
-#include <sys/namei.h>
-#include <sys/proc.h>
-#include <sys/file.h>
-#include <sys/stat.h>
-#include <sys/filedesc.h>
-#include <sys/kernel.h>
-#include <sys/malloc.h>
-#include <sys/mman.h>
-#include <sys/mount.h>
-#include <sys/signal.h>
-#include <sys/signalvar.h>
-#include <sys/reboot.h>
-#include <sys/syscallargs.h>
-#include <sys/exec.h>
-#include <sys/vnode.h>
-#include <sys/socketvar.h>
-#include <sys/resource.h>
-#include <sys/resourcevar.h>
-#include <sys/wait.h>
-
-#include <compat/osf1/osf1.h>
-#include <compat/osf1/osf1_syscallargs.h>
-#include <compat/osf1/osf1_util.h>
-#include <compat/osf1/osf1_cvt.h>
-
-int
-osf1_sys_access(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct osf1_sys_access_args *uap = v;
- struct sys_access_args a;
- unsigned long leftovers;
- caddr_t sg;
-
- sg = stackgap_init(p->p_emul);
- OSF1_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
-
- 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(p, &a, retval);
-}
-
-int
-osf1_sys_execve(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct osf1_sys_execve_args *uap = v;
- struct sys_execve_args ap;
- caddr_t sg;
-
- sg = stackgap_init(p->p_emul);
- OSF1_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
-
- SCARG(&ap, path) = SCARG(uap, path);
- SCARG(&ap, argp) = SCARG(uap, argp);
- SCARG(&ap, envp) = SCARG(uap, envp);
-
- return sys_execve(p, &ap, retval);
-}
-
-/*
- * Get file status; this version does not follow links.
- */
-/* ARGSUSED */
-int
-osf1_sys_lstat(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct osf1_sys_lstat_args *uap = v;
- struct stat sb;
- struct osf1_stat osb;
- int error;
- struct nameidata nd;
- caddr_t sg;
-
- sg = stackgap_init(p->p_emul);
- OSF1_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
-
- NDINIT(&nd, LOOKUP, NOFOLLOW | LOCKLEAF, UIO_USERSPACE,
- SCARG(uap, path), p);
- if ((error = namei(&nd)))
- return (error);
- error = vn_stat(nd.ni_vp, &sb, p);
- vput(nd.ni_vp);
- if (error)
- return (error);
- osf1_cvt_stat_from_native(&sb, &osb);
- error = copyout((caddr_t)&osb, (caddr_t)SCARG(uap, ub), sizeof (osb));
- return (error);
-}
-
-int
-osf1_sys_mknod(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct osf1_sys_mknod_args *uap = v;
- struct sys_mknod_args a;
- caddr_t sg;
-
- sg = stackgap_init(p->p_emul);
- OSF1_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
-
- SCARG(&a, path) = SCARG(uap, path);
- SCARG(&a, mode) = SCARG(uap, mode);
- SCARG(&a, dev) = osf1_cvt_dev_to_native(SCARG(uap, dev));
-
- return sys_mknod(p, &a, retval);
-}
-
-int
-osf1_sys_open(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct osf1_sys_open_args *uap = v;
- struct sys_open_args a;
- char *path;
- caddr_t sg;
- 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
-
- sg = stackgap_init(p->p_emul);
-
- /* 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);
- if (SCARG(&a, flags) & O_CREAT)
- OSF1_CHECK_ALT_CREAT(p, &sg, path);
- else
- OSF1_CHECK_ALT_EXIST(p, &sg, path);
- SCARG(&a, path) = path;
-
- return sys_open(p, &a, retval);
-}
-
-int
-osf1_sys_pathconf(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct osf1_sys_pathconf_args *uap = v;
- struct sys_pathconf_args a;
- caddr_t sg;
- int error;
-
- sg = stackgap_init(p->p_emul);
-
- OSF1_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
- 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(p, &a, retval);
-
- return (error);
-}
-
-/*
- * Get file status; this version follows links.
- */
-/* ARGSUSED */
-int
-osf1_sys_stat(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct osf1_sys_stat_args *uap = v;
- struct stat sb;
- struct osf1_stat osb;
- int error;
- struct nameidata nd;
- caddr_t sg;
-
- sg = stackgap_init(p->p_emul);
- OSF1_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
-
- NDINIT(&nd, LOOKUP, FOLLOW | LOCKLEAF, UIO_USERSPACE,
- SCARG(uap, path), p);
- if ((error = namei(&nd)))
- return (error);
- error = vn_stat(nd.ni_vp, &sb, p);
- vput(nd.ni_vp);
- if (error)
- return (error);
- osf1_cvt_stat_from_native(&sb, &osb);
- error = copyout((caddr_t)&osb, (caddr_t)SCARG(uap, ub), sizeof (osb));
- return (error);
-}
-
-int
-osf1_sys_truncate(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct osf1_sys_truncate_args *uap = v;
- struct sys_truncate_args a;
- caddr_t sg;
-
- sg = stackgap_init(p->p_emul);
- OSF1_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
-
- SCARG(&a, path) = SCARG(uap, path);
- SCARG(&a, pad) = 0;
- SCARG(&a, length) = SCARG(uap, length);
-
- return sys_truncate(p, &a, retval);
-}
-
-int
-osf1_sys_utimes(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct osf1_sys_utimes_args *uap = v;
- struct sys_utimes_args a;
- struct osf1_timeval otv;
- struct timeval tv;
- caddr_t sg;
- int error;
-
- sg = stackgap_init(p->p_emul);
-
- OSF1_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
- SCARG(&a, path) = SCARG(uap, path);
-
- error = 0;
- if (SCARG(uap, tptr) == NULL)
- SCARG(&a, tptr) = NULL;
- else {
- SCARG(&a, tptr) = stackgap_alloc(&sg, sizeof tv);
-
- /* get the OSF/1 timeval argument */
- error = copyin((caddr_t)SCARG(uap, tptr),
- (caddr_t)&otv, sizeof otv);
- if (error == 0) {
-
- /* fill in and copy out the NetBSD timeval */
- memset(&tv, 0, sizeof tv);
- tv.tv_sec = otv.tv_sec;
- tv.tv_usec = otv.tv_usec;
-
- error = copyout((caddr_t)&tv,
- (caddr_t)SCARG(&a, tptr), sizeof tv);
- }
- }
-
- if (error == 0)
- error = sys_utimes(p, &a, retval);
-
- return (error);
-}
diff --git a/sys/compat/osf1/osf1_generic.c b/sys/compat/osf1/osf1_generic.c
deleted file mode 100644
index 853608877a5..00000000000
--- a/sys/compat/osf1/osf1_generic.c
+++ /dev/null
@@ -1,213 +0,0 @@
-/* $OpenBSD: osf1_generic.c,v 1.1 2000/08/04 15:47:55 ericj Exp $ */
-/* $NetBSD: osf1_generic.c,v 1.1 1999/05/01 05:06:46 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.
- */
-
-/*
- * 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 <sys/param.h>
-#include <sys/systm.h>
-#include <sys/namei.h>
-#include <sys/proc.h>
-#include <sys/file.h>
-#include <sys/stat.h>
-#include <sys/malloc.h>
-#include <sys/mman.h>
-#include <sys/mount.h>
-#include <sys/syscallargs.h>
-#include <sys/exec.h>
-
-#include <compat/osf1/osf1.h>
-#include <compat/osf1/osf1_syscallargs.h>
-#include <compat/osf1/osf1_cvt.h>
-
-/*
- * The structures end up being the same... but we can't be sure that
- * the other word of our iov_len is zero!
- */
-int
-osf1_sys_readv(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct osf1_sys_readv_args *uap = v;
- struct sys_readv_args a;
- struct osf1_iovec *oio;
- struct iovec *nio;
- caddr_t sg = stackgap_init(p->p_emul);
- int error, osize, nsize, i;
-
- if (SCARG(uap, iovcnt) > (STACKGAPLEN / sizeof (struct iovec)))
- return (EINVAL);
-
- osize = SCARG(uap, iovcnt) * sizeof (struct osf1_iovec);
- nsize = SCARG(uap, iovcnt) * sizeof (struct iovec);
-
- oio = malloc(osize, M_TEMP, M_WAITOK);
- nio = malloc(nsize, M_TEMP, M_WAITOK);
-
- error = 0;
- if ((error = copyin(SCARG(uap, iovp), oio, osize)))
- goto punt;
- for (i = 0; i < SCARG(uap, iovcnt); i++) {
- nio[i].iov_base = oio[i].iov_base;
- nio[i].iov_len = oio[i].iov_len;
- }
-
- SCARG(&a, fd) = SCARG(uap, fd);
- SCARG(&a, iovp) = stackgap_alloc(&sg, nsize);
- SCARG(&a, iovcnt) = SCARG(uap, iovcnt);
-
- if ((error = copyout(nio, (caddr_t)SCARG(&a, iovp), nsize)))
- goto punt;
- error = sys_readv(p, &a, retval);
-
-punt:
- free(oio, M_TEMP);
- free(nio, M_TEMP);
- return (error);
-}
-
-int
-osf1_sys_select(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct osf1_sys_select_args *uap = v;
- struct sys_select_args a;
- struct osf1_timeval otv;
- struct timeval tv;
- int error;
- caddr_t sg;
-
- SCARG(&a, nd) = SCARG(uap, nd);
- SCARG(&a, in) = SCARG(uap, in);
- SCARG(&a, ou) = SCARG(uap, ou);
- SCARG(&a, ex) = SCARG(uap, ex);
-
- error = 0;
- if (SCARG(uap, tv) == NULL)
- SCARG(&a, tv) = NULL;
- else {
- sg = stackgap_init(p->p_emul);
- SCARG(&a, tv) = stackgap_alloc(&sg, sizeof tv);
-
- /* get the OSF/1 timeval argument */
- error = copyin((caddr_t)SCARG(uap, tv),
- (caddr_t)&otv, sizeof otv);
- if (error == 0) {
-
- /* fill in and copy out the NetBSD timeval */
- memset(&tv, 0, sizeof tv);
- tv.tv_sec = otv.tv_sec;
- tv.tv_usec = otv.tv_usec;
-
- error = copyout((caddr_t)&tv,
- (caddr_t)SCARG(&a, tv), sizeof tv);
- }
- }
-
- if (error == 0)
- error = sys_select(p, &a, retval);
-
- return (error);
-}
-
-int
-osf1_sys_writev(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct osf1_sys_writev_args *uap = v;
- struct sys_writev_args a;
- struct osf1_iovec *oio;
- struct iovec *nio;
- caddr_t sg = stackgap_init(p->p_emul);
- int error, osize, nsize, i;
-
- if (SCARG(uap, iovcnt) > (STACKGAPLEN / sizeof (struct iovec)))
- return (EINVAL);
-
- osize = SCARG(uap, iovcnt) * sizeof (struct osf1_iovec);
- nsize = SCARG(uap, iovcnt) * sizeof (struct iovec);
-
- oio = malloc(osize, M_TEMP, M_WAITOK);
- nio = malloc(nsize, M_TEMP, M_WAITOK);
-
- error = 0;
- if ((error = copyin(SCARG(uap, iovp), oio, osize)))
- goto punt;
- for (i = 0; i < SCARG(uap, iovcnt); i++) {
- nio[i].iov_base = oio[i].iov_base;
- nio[i].iov_len = oio[i].iov_len;
- }
-
- SCARG(&a, fd) = SCARG(uap, fd);
- SCARG(&a, iovp) = stackgap_alloc(&sg, nsize);
- SCARG(&a, iovcnt) = SCARG(uap, iovcnt);
-
- if ((error = copyout(nio, (caddr_t)SCARG(&a, iovp), nsize)))
- goto punt;
- error = sys_writev(p, &a, retval);
-
-punt:
- free(oio, M_TEMP);
- free(nio, M_TEMP);
- return (error);
-}
diff --git a/sys/compat/osf1/osf1_ioctl.c b/sys/compat/osf1/osf1_ioctl.c
deleted file mode 100644
index 46412c7dbbe..00000000000
--- a/sys/compat/osf1/osf1_ioctl.c
+++ /dev/null
@@ -1,274 +0,0 @@
-/* $OpenBSD: osf1_ioctl.c,v 1.5 2002/03/14 01:26:50 millert Exp $ */
-/* $NetBSD: osf1_ioctl.c,v 1.11 1999/05/05 01:51:33 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.
- */
-
-/*
- * 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 <sys/param.h>
-#include <sys/systm.h>
-#include <sys/ioctl.h>
-#include <sys/termios.h>
-#include <sys/mount.h>
-#include <sys/syscallargs.h>
-
-#include <compat/osf1/osf1.h>
-#include <compat/osf1/osf1_syscallargs.h>
-
-#ifdef SYSCALL_DEBUG
-extern int scdebug;
-#endif
-
-int osf1_ioctl_f(struct proc *p, struct sys_ioctl_args *nuap,
- register_t *retval, int cmd, int dir, int len);
-int osf1_ioctl_i(struct proc *p, struct sys_ioctl_args *nuap,
- register_t *retval, int cmd, int dir, int len);
-int osf1_ioctl_t(struct proc *p, struct sys_ioctl_args *nuap,
- register_t *retval, int cmd, int dir, int len);
-int osf1_ioctl_m(struct proc *p, struct sys_ioctl_args *nuap,
- register_t *retval, int cmd, int dir, int len);
-
-int
-osf1_sys_ioctl(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct osf1_sys_ioctl_args *uap = v;
- struct sys_ioctl_args a;
- int op, dir, group, cmd, len;
-#ifdef SYSCALL_DEBUG
- 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(p, &a, retval, cmd, dir, len);
- case 'i':
- return osf1_ioctl_i(p, &a, retval, cmd, dir, len);
- case 't':
- return osf1_ioctl_t(p, &a, retval, cmd, dir, len);
- case 'm':
- return osf1_ioctl_m(p, &a, retval, cmd, dir, len);
- default:
- return (ENOTTY);
- }
-}
-
-int
-osf1_ioctl_f(p, uap, retval, cmd, dir, len)
- struct proc *p;
- 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 OpenBSD */
- break;
-
- default:
- return (ENOTTY);
- }
-
- return sys_ioctl(p, uap, retval);
-}
-
-/*
- * Mag Tape ioctl's
- */
-int
-osf1_ioctl_m(p, uap, retval, cmd, dir, len)
- struct proc *p;
- struct sys_ioctl_args *uap;
- register_t *retval;
- int cmd;
- int dir;
- int len;
-{
- switch (cmd) {
- case 1: /* OSF/1 MTIOCTOP (XXX) */
- case 2: /* OSF/1 MTIOCGET (XXX) */
- /* same as in OpenBSD */
- break;
- default:
- return (ENOTTY);
- }
-
- return sys_ioctl(p, uap, retval);
-}
-
-int
-osf1_ioctl_i(p, uap, retval, cmd, dir, len)
- struct proc *p;
- 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 OpenBSD */
- break;
-
- default:
- return (ENOTTY);
- }
-
- return sys_ioctl(p, uap, retval);
-}
-
-int
-osf1_ioctl_t(p, uap, retval, cmd, dir, len)
- struct proc *p;
- 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 OpenBSD */
- break;
-
- default:
- return (ENOTTY);
- }
-
- return sys_ioctl(p, uap, retval);
-}
diff --git a/sys/compat/osf1/osf1_misc.c b/sys/compat/osf1/osf1_misc.c
deleted file mode 100644
index e97a714e898..00000000000
--- a/sys/compat/osf1/osf1_misc.c
+++ /dev/null
@@ -1,355 +0,0 @@
-/* $OpenBSD: osf1_misc.c,v 1.18 2007/09/15 10:10:37 martin Exp $ */
-/* $NetBSD: osf1_misc.c,v 1.55 2000/06/28 15:39:33 mrg 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 <sys/param.h>
-#include <sys/systm.h>
-#include <sys/namei.h>
-#include <sys/proc.h>
-#include <sys/file.h>
-#include <sys/stat.h>
-#include <sys/filedesc.h>
-#include <sys/kernel.h>
-#include <sys/malloc.h>
-#include <sys/mman.h>
-#include <sys/mount.h>
-#include <sys/signal.h>
-#include <sys/signalvar.h>
-#include <sys/reboot.h>
-#include <sys/syscallargs.h>
-#include <sys/exec.h>
-#include <sys/vnode.h>
-#include <sys/socketvar.h>
-#include <sys/resource.h>
-#include <sys/resourcevar.h>
-#include <sys/wait.h>
-
-#include <compat/osf1/osf1.h>
-#include <compat/osf1/osf1_syscallargs.h>
-#include <compat/osf1/osf1_util.h>
-#include <compat/osf1/osf1_cvt.h>
-
-#ifdef SYSCALL_DEBUG
-extern int scdebug;
-#endif
-
-const char osf1_emul_path[] = "/emul/osf1";
-
-int
-osf1_sys_classcntl(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
-
- /* XXX */
- return (ENOSYS);
-}
-
-int
-osf1_sys_reboot(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct osf1_sys_reboot_args *uap = v;
- 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(p, &a, retval);
-}
-
-int
-osf1_sys_set_program_attributes(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct osf1_sys_set_program_attributes_args *uap = v;
- segsz_t tsize, dsize;
-
- tsize = atop(SCARG(uap, tsize));
- dsize = atop(SCARG(uap, dsize));
-
- if (dsize > p->p_rlimit[RLIMIT_DATA].rlim_cur)
- return (ENOMEM);
- if (tsize > MAXTSIZ)
- return (ENOMEM);
-
- 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_setsysinfo(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
-
- /* XXX */
- return (0);
-}
-
-int
-osf1_sys_sysinfo(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct osf1_sys_sysinfo_args *uap = v;
- const char *string;
- int error;
-
- error = 0;
- switch (SCARG(uap, cmd)) {
- case OSF1_SI_SYSNAME:
- goto should_handle;
- /* string = ostype; */
- break;
-
- case OSF1_SI_HOSTNAME:
- string = hostname;
- break;
-
- case OSF1_SI_RELEASE:
- string = version;
- 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:
- error = EINVAL;
- break;
- };
-
- if (error == 0)
- error = copyoutstr(string, SCARG(uap, buf), SCARG(uap, len),
- NULL);
-
- return (error);
-}
-
-int
-osf1_sys_uname(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct osf1_sys_uname_args *uap = v;
- struct osf1_utsname u;
- const char *cp;
- extern char hostname[], machine[];
- char *dp, *ep;
-
- /* XXX would use stackgap, but our struct utsname is too big! */
-
- bzero(&u, sizeof(u));
- strlcpy(u.sysname, ostype, sizeof(u.sysname));
- strlcpy(u.nodename, hostname, sizeof(u.nodename));
- strlcpy(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';
-
- strlcpy(u.machine, machine, sizeof(u.machine));
-
- return (copyout((caddr_t)&u, (caddr_t)SCARG(uap, name), sizeof u));
-}
-
-int
-osf1_sys_usleep_thread(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct osf1_sys_usleep_thread_args *uap = v;
- struct osf1_timeval otv, endotv;
- struct timeval tv, 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(p, PUSER|PCATCH, "uslpthrd", ticks); /* XXX */
-
- if (SCARG(uap, slept) != NULL) {
- struct timeval tv2;
-
- getmicrotime(&tv2);
- timersub(&tv2, &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(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct osf1_sys_wait4_args *uap = v;
- struct sys_wait4_args a;
- struct osf1_rusage osf1_rusage;
- struct rusage netbsd_rusage;
- unsigned long leftovers;
- caddr_t sg;
- int error;
-
- SCARG(&a, pid) = SCARG(uap, pid);
- SCARG(&a, status) = SCARG(uap, status);
-
- /* translate options */
- SCARG(&a, options) = emul_flags_translate(osf1_wait_options_xtab,
- SCARG(uap, options), &leftovers);
- if (leftovers != 0)
- return (EINVAL);
-
- if (SCARG(uap, rusage) == NULL)
- SCARG(&a, rusage) = NULL;
- else {
- sg = stackgap_init(p->p_emul);
- SCARG(&a, rusage) = stackgap_alloc(&sg, sizeof netbsd_rusage);
- }
-
- error = sys_wait4(p, &a, retval);
-
- if (error == 0 && SCARG(&a, rusage) != NULL) {
- error = copyin((caddr_t)SCARG(&a, rusage),
- (caddr_t)&netbsd_rusage, sizeof netbsd_rusage);
- if (error == 0) {
- osf1_cvt_rusage_from_native(&netbsd_rusage,
- &osf1_rusage);
- error = copyout((caddr_t)&osf1_rusage,
- (caddr_t)SCARG(uap, rusage), sizeof osf1_rusage);
- }
- }
-
- return (error);
-}
diff --git a/sys/compat/osf1/osf1_mmap.c b/sys/compat/osf1/osf1_mmap.c
deleted file mode 100644
index d480b06d420..00000000000
--- a/sys/compat/osf1/osf1_mmap.c
+++ /dev/null
@@ -1,229 +0,0 @@
-/* $OpenBSD: osf1_mmap.c,v 1.6 2006/03/04 19:33:21 miod Exp $ */
-/* $NetBSD: osf1_mmap.c,v 1.5 2000/04/11 05:26:27 chs 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 <sys/param.h>
-#include <sys/systm.h>
-#include <sys/proc.h>
-#include <sys/mman.h>
-#include <sys/mount.h>
-#include <sys/syscallargs.h>
-#include <uvm/uvm.h>
-
-#include <compat/osf1/osf1.h>
-#include <compat/osf1/osf1_syscallargs.h>
-#include <compat/osf1/osf1_cvt.h>
-
-int
-osf1_sys_madvise(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct osf1_sys_madvise_args *uap = v;
- 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;
-#if 0
- case OSF1_MADV_SPACEAVAIL:
- SCARG(&a, behav) = MADV_SPACEAVAIL;
- break;
-#endif
- 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(p, &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(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct osf1_sys_mmap_args *uap = v;
- 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 entries we try to find space in the address space
- * starting at that address. If the user specified zero, we
- * start looking at at least NBPG, 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 */
- /* XXX - UVM */
- 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, NBPG, 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(p, &a, retval);
-}
-
-int
-osf1_sys_mprotect(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct osf1_sys_mprotect_args *uap = v;
- 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(p, &a, retval);
-}
diff --git a/sys/compat/osf1/osf1_mount.c b/sys/compat/osf1/osf1_mount.c
deleted file mode 100644
index 221c760d35b..00000000000
--- a/sys/compat/osf1/osf1_mount.c
+++ /dev/null
@@ -1,361 +0,0 @@
-/* $OpenBSD: osf1_mount.c,v 1.11 2006/03/05 21:48:56 miod Exp $ */
-/* $NetBSD: osf1_mount.c,v 1.14 1999/05/05 01:51:34 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.
- */
-
-/*
- * 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 <sys/param.h>
-#include <sys/systm.h>
-#include <sys/namei.h>
-#include <sys/proc.h>
-#include <sys/file.h>
-#include <sys/filedesc.h>
-#include <sys/kernel.h>
-#include <sys/mount.h>
-#include <sys/vnode.h>
-#include <sys/syscallargs.h>
-
-#include <compat/osf1/osf1.h>
-#include <compat/osf1/osf1_syscallargs.h>
-#include <compat/osf1/osf1_util.h>
-#include <compat/osf1/osf1_cvt.h>
-
-#include <net/if.h>
-#include <netinet/in.h>
-
-#include <nfs/rpcv2.h>
-#include <nfs/nfsproto.h>
-#include <nfs/nfs.h>
-#include <nfs/nfsmount.h>
-
-#include <ufs/ufs/quota.h>
-#include <ufs/ufs/ufsmount.h>
-
-#include <machine/vmparam.h>
-
-#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 proc *,
- struct osf1_sys_mount_args *, struct sys_mount_args *);
-static int osf1_mount_nfs(struct proc *,
- struct osf1_sys_mount_args *, struct sys_mount_args *);
-
-int
-osf1_sys_fstatfs(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct osf1_sys_fstatfs_args *uap = v;
- struct file *fp;
- struct mount *mp;
- struct statfs *sp;
- struct osf1_statfs osfs;
- int error;
-
- if ((error = getvnode(p->p_fd, SCARG(uap, fd), &fp)))
- return (error);
- mp = ((struct vnode *)fp->f_data)->v_mount;
- sp = &mp->mnt_stat;
- error = VFS_STATFS(mp, sp, p);
- FRELE(fp);
- if (error)
- goto out;
- sp->f_flags = mp->mnt_flag & MNT_VISFLAGMASK;
- osf1_cvt_statfs_from_native(sp, &osfs);
- error = copyout(&osfs, SCARG(uap, buf), min(sizeof osfs,
- SCARG(uap, len)));
- out:
- return (error);
-}
-
-int
-osf1_sys_getfsstat(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct osf1_sys_getfsstat_args *uap = v;
- struct mount *mp, *nmp;
- struct statfs *sp;
- struct osf1_statfs osfs;
- caddr_t 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 = (caddr_t)SCARG(uap, buf);
- count = 0;
- for (mp = CIRCLEQ_FIRST(&mountlist); mp != CIRCLEQ_END(&mountlist);
- mp = nmp) {
- nmp = CIRCLEQ_NEXT(mp, mnt_list);
- 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_STATFS(mp, sp, p)))
- continue;
- sp->f_flags = mp->mnt_flag & MNT_VISFLAGMASK;
- osf1_cvt_statfs_from_native(sp, &osfs);
- if ((error = copyout(&osfs, osf_sfsp,
- sizeof (struct osf1_statfs))))
- return (error);
- osf_sfsp += sizeof (struct osf1_statfs);
- }
- count++;
- }
- if (osf_sfsp && count > maxcount)
- *retval = maxcount;
- else
- *retval = count;
- return (0);
-}
-
-int
-osf1_sys_mount(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct osf1_sys_mount_args *uap = v;
- struct sys_mount_args a;
- int error;
-
- SCARG(&a, path) = SCARG(uap, path);
-
- if (SCARG(uap, flags) & ~OSF1_MOUNT_FLAGS)
- return (EINVAL);
- SCARG(&a, flags) = SCARG(uap, flags); /* XXX - xlate */
-
- switch (SCARG(uap, type)) {
- case OSF1_MOUNT_NFS:
- if ((error = osf1_mount_nfs(p, uap, &a)))
- return error;
- break;
-
- case OSF1_MOUNT_MFS:
- if ((error = osf1_mount_mfs(p, uap, &a)))
- return error;
- break;
-
- default:
- return (EINVAL);
- }
-
- return sys_mount(p, &a, retval);
-}
-
-int
-osf1_sys_statfs(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct osf1_sys_statfs_args *uap = v;
- struct mount *mp;
- struct statfs *sp;
- struct osf1_statfs osfs;
- int error;
- struct nameidata nd;
-
- NDINIT(&nd, LOOKUP, FOLLOW, UIO_USERSPACE, SCARG(uap, path), p);
- if ((error = namei(&nd)))
- return (error);
- mp = nd.ni_vp->v_mount;
- sp = &mp->mnt_stat;
- vrele(nd.ni_vp);
- if ((error = VFS_STATFS(mp, sp, p)))
- return (error);
- sp->f_flags = mp->mnt_flag & MNT_VISFLAGMASK;
- osf1_cvt_statfs_from_native(sp, &osfs);
- return copyout(&osfs, SCARG(uap, buf), min(sizeof osfs,
- SCARG(uap, len)));
-}
-
-int
-osf1_sys_unmount(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct osf1_sys_unmount_args *uap = v;
- 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(p, &a, retval);
-}
-
-static int
-osf1_mount_mfs(p, osf_argp, bsd_argp)
- struct proc *p;
- struct osf1_sys_mount_args *osf_argp;
- struct sys_mount_args *bsd_argp;
-{
- struct osf1_mfs_args osf_ma;
- struct mfs_args bsd_ma;
- caddr_t sg = stackgap_init(p->p_emul);
- int error, len;
- static const char mfs_name[] = MOUNT_MFS;
-
- if ((error = copyin(SCARG(osf_argp, 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;
-
- SCARG(bsd_argp, data) = stackgap_alloc(&sg, sizeof bsd_ma);
- if ((error = copyout(&bsd_ma, SCARG(bsd_argp, data), sizeof bsd_ma)))
- return error;
-
- len = strlen(mfs_name) + 1;
- SCARG(bsd_argp, type) = stackgap_alloc(&sg, len);
- if ((error = copyout(mfs_name, (void *)SCARG(bsd_argp, type), len)))
- return error;
-
- return 0;
-}
-
-static int
-osf1_mount_nfs(p, osf_argp, bsd_argp)
- struct proc *p;
- struct osf1_sys_mount_args *osf_argp;
- struct sys_mount_args *bsd_argp;
-{
- struct osf1_nfs_args osf_na;
- struct nfs_args bsd_na;
- caddr_t sg = stackgap_init(p->p_emul);
- int error, len;
- static const char nfs_name[] = MOUNT_NFS;
- unsigned long leftovers;
-
- if ((error = copyin(SCARG(osf_argp, 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;
-
- SCARG(bsd_argp, data) = stackgap_alloc(&sg, sizeof bsd_na);
- if ((error = copyout(&bsd_na, SCARG(bsd_argp, data), sizeof bsd_na)))
- return error;
-
- len = strlen(nfs_name) + 1;
- SCARG(bsd_argp, type) = stackgap_alloc(&sg, len);
- if ((error = copyout(MOUNT_NFS, (void *)SCARG(bsd_argp, type), len)))
- return error;
-
- return 0;
-}
diff --git a/sys/compat/osf1/osf1_prot.c b/sys/compat/osf1/osf1_prot.c
deleted file mode 100644
index 6f4a860661d..00000000000
--- a/sys/compat/osf1/osf1_prot.c
+++ /dev/null
@@ -1,142 +0,0 @@
-/* $OpenBSD: osf1_prot.c,v 1.3 2007/03/15 10:22:30 art Exp $ */
-/* $NetBSD: osf1_prot.c,v 1.2 1999/05/05 01:51:35 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.
- */
-
-/*
- * 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 <sys/param.h>
-#include <sys/systm.h>
-#include <sys/proc.h>
-#include <sys/mount.h>
-#include <sys/syscallargs.h>
-
-#include <compat/osf1/osf1.h>
-#include <compat/osf1/osf1_syscallargs.h>
-#include <compat/osf1/osf1_cvt.h>
-
-/*
- * 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(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct osf1_sys_setgid_args *uap = v;
- struct pcred *pc = p->p_cred;
- gid_t gid = SCARG(uap, gid);
- int error;
-
- if ((error = suser(p, 0)) != 0 &&
- gid != pc->p_rgid && gid != pc->p_svgid)
- return (error);
-
- pc->pc_ucred = crcopy(pc->pc_ucred);
- pc->pc_ucred->cr_gid = gid;
- if (error == 0) {
- pc->p_rgid = gid;
- pc->p_svgid = gid;
- }
- atomic_setbits_int(&p->p_flag, P_SUGID);
- return (0);
-}
-
-/*
- * 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(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct osf1_sys_setuid_args *uap = v;
- struct pcred *pc = p->p_cred;
- uid_t uid = SCARG(uap, uid);
- int error;
-
- if ((error = suser(p, 0)) != 0 &&
- uid != pc->p_ruid && uid != pc->p_svuid)
- return (error);
-
- pc->pc_ucred = crcopy(pc->pc_ucred);
- pc->pc_ucred->cr_uid = uid;
- if (error == 0) {
- (void)chgproccnt(pc->p_ruid, -1);
- (void)chgproccnt(uid, 1);
- pc->p_ruid = uid;
- pc->p_svuid = uid;
- }
- atomic_setbits_int(&p->p_flag, P_SUGID);
- return (0);
-}
diff --git a/sys/compat/osf1/osf1_resource.c b/sys/compat/osf1/osf1_resource.c
deleted file mode 100644
index 7285af7ee50..00000000000
--- a/sys/compat/osf1/osf1_resource.c
+++ /dev/null
@@ -1,171 +0,0 @@
-/* $OpenBSD: osf1_resource.c,v 1.1 2000/08/04 15:47:55 ericj Exp $ */
-/* $NetBSD: osf1_resource.c,v 1.1 1999/05/01 05:41:56 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.
- */
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/proc.h>
-#include <sys/mount.h>
-#include <sys/syscallargs.h>
-#include <sys/resource.h>
-#include <sys/resourcevar.h>
-
-#include <compat/osf1/osf1.h>
-#include <compat/osf1/osf1_syscallargs.h>
-#include <compat/osf1/osf1_cvt.h>
-
-int
-osf1_sys_getrlimit(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct osf1_sys_getrlimit_args *uap = v;
- 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: /* unhandled */
- default:
- return (EINVAL);
- }
-
- /* XXX should translate */
- SCARG(&a, rlp) = SCARG(uap, rlp);
-
- return sys_getrlimit(p, &a, retval);
-}
-
-int
-osf1_sys_getrusage(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct osf1_sys_getrusage_args *uap = v;
- struct sys_getrusage_args a;
- struct osf1_rusage osf1_rusage;
- struct rusage netbsd_rusage;
- caddr_t sg;
- int error;
-
- switch (SCARG(uap, who)) {
- case OSF1_RUSAGE_SELF:
- SCARG(&a, who) = RUSAGE_SELF;
- break;
-
- case OSF1_RUSAGE_CHILDREN:
- SCARG(&a, who) = RUSAGE_CHILDREN;
- break;
-
- case OSF1_RUSAGE_THREAD: /* XXX not supported */
- default:
- return (EINVAL);
- }
-
- sg = stackgap_init(p->p_emul);
- SCARG(&a, rusage) = stackgap_alloc(&sg, sizeof netbsd_rusage);
-
- error = sys_getrusage(p, &a, retval);
- if (error == 0)
- error = copyin((caddr_t)SCARG(&a, rusage),
- (caddr_t)&netbsd_rusage, sizeof netbsd_rusage);
- if (error == 0) {
- osf1_cvt_rusage_from_native(&netbsd_rusage, &osf1_rusage);
- error = copyout((caddr_t)&osf1_rusage,
- (caddr_t)SCARG(uap, rusage), sizeof osf1_rusage);
- }
-
- return (error);
-}
-
-int
-osf1_sys_setrlimit(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct osf1_sys_setrlimit_args *uap = v;
- 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: /* unhandled */
- default:
- return (EINVAL);
- }
-
- /* XXX should translate */
- SCARG(&a, rlp) = SCARG(uap, rlp);
-
- return sys_setrlimit(p, &a, retval);
-}
diff --git a/sys/compat/osf1/osf1_signal.c b/sys/compat/osf1/osf1_signal.c
deleted file mode 100644
index 336586ef7ef..00000000000
--- a/sys/compat/osf1/osf1_signal.c
+++ /dev/null
@@ -1,381 +0,0 @@
-/* $OpenBSD: osf1_signal.c,v 1.10 2008/05/01 11:53:26 miod Exp $ */
-/* $NetBSD: osf1_signal.c,v 1.15 1999/05/05 00:57:43 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.
- */
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/namei.h>
-#include <sys/proc.h>
-#include <sys/filedesc.h>
-#include <sys/ioctl.h>
-#include <sys/mount.h>
-#include <sys/kernel.h>
-#include <sys/signal.h>
-#include <sys/signalvar.h>
-#include <sys/malloc.h>
-
-#include <sys/syscallargs.h>
-
-#include <compat/osf1/osf1.h>
-#include <compat/osf1/osf1_signal.h>
-#include <compat/osf1/osf1_syscallargs.h>
-#include <compat/osf1/osf1_util.h>
-#include <compat/osf1/osf1_cvt.h>
-
-#if 0
-int
-osf1_sys_kill(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct osf1_sys_kill_args *uap = v;
- struct sys_kill_args ka;
-
- SCARG(&ka, pid) = SCARG(uap, pid);
- SCARG(&ka, signum) = osf1_signal_xlist[SCARG(uap, signum)];
- return sys_kill(p, &ka, retval);
-}
-#endif
-
-int
-osf1_sys_sigaction(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct osf1_sys_sigaction_args *uap = v;
- struct osf1_sigaction *nosa, *oosa, tmposa;
- struct sigaction *nbsa, *obsa, tmpbsa;
- struct sys_sigaction_args sa;
- caddr_t sg;
- int error;
-
- sg = stackgap_init(p->p_emul);
- nosa = SCARG(uap, nsa);
- oosa = SCARG(uap, osa);
-
- if (oosa != NULL)
- obsa = stackgap_alloc(&sg, sizeof(struct sigaction));
- else
- obsa = NULL;
-
- if (nosa != NULL) {
- nbsa = stackgap_alloc(&sg, sizeof(struct sigaction));
- if ((error = copyin(nosa, &tmposa, sizeof(tmposa))) != 0)
- return error;
- osf1_cvt_sigaction_to_native(&tmposa, &tmpbsa);
- if ((error = copyout(&tmpbsa, nbsa, sizeof(tmpbsa))) != 0)
- return error;
- } else
- nbsa = NULL;
-
- SCARG(&sa, signum) = osf1_signal_xlist[SCARG(uap, signum)];
- SCARG(&sa, nsa) = nbsa;
- SCARG(&sa, osa) = obsa;
-
- /* XXX */
- if ((error = sys_sigaction(p, &sa, retval)) != 0)
- return error;
-
- if (oosa != NULL) {
- if ((error = copyin(obsa, &tmpbsa, sizeof(tmpbsa))) != 0)
- return error;
- osf1_cvt_sigaction_from_native(&tmpbsa, &tmposa);
- if ((error = copyout(&tmposa, oosa, sizeof(tmposa))) != 0)
- return error;
- }
-
- return 0;
-}
-
-int
-osf1_sys_sigaltstack(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct osf1_sys_sigaltstack_args *uap = v;
- struct osf1_sigaltstack *noss, *ooss, tmposs;
- struct sigaltstack *nbss, *obss, tmpbss;
- struct sys_sigaltstack_args sa;
- caddr_t sg;
- int error;
-
- sg = stackgap_init(p->p_emul);
- noss = SCARG(uap, nss);
- ooss = SCARG(uap, oss);
-
- if (ooss != NULL)
- obss = stackgap_alloc(&sg, sizeof(struct sigaltstack));
- else
- obss = NULL;
-
- if (noss != NULL) {
- nbss = stackgap_alloc(&sg, sizeof(struct sigaltstack));
- if ((error = copyin(noss, &tmposs, sizeof(tmposs))) != 0)
- return error;
- if ((error = osf1_cvt_sigaltstack_to_native(&tmposs, &tmpbss)) != 0)
- return error;
- if ((error = copyout(&tmpbss, nbss, sizeof(tmpbss))) != 0)
- return error;
- } else
- nbss = NULL;
-
- SCARG(&sa, nss) = nbss;
- SCARG(&sa, oss) = obss;
-
- /* XXX */
- if ((error = sys_sigaltstack(p, &sa, retval)) != 0)
- return error;
-
- if (obss != NULL) {
- if ((error = copyin(obss, &tmpbss, sizeof(tmpbss))) != 0)
- return error;
- osf1_cvt_sigaltstack_from_native(&tmpbss, &tmposs);
- if ((error = copyout(&tmposs, ooss, sizeof(tmposs))) != 0)
- return error;
- }
-
- return 0;
-}
-
-#if 0
-int
-osf1_sys_signal(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct osf1_sys_signal_args *uap = v;
- int signum = osf1_signal_xlist[OSF1_SIGNO(SCARG(uap, signum))];
- int error;
- caddr_t sg = stackgap_init(p->p_emul);
-
- 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(p, &sa, retval);
- }
- /* FALLTHROUGH */
-
- case OSF1_SIGNAL_MASK:
- {
- struct sys_sigaction_args sa_args;
- struct sigaction *nbsa, *obsa, sa;
-
- nbsa = stackgap_alloc(&sg, sizeof(struct sigaction));
- obsa = stackgap_alloc(&sg, sizeof(struct sigaction));
- SCARG(&sa_args, signum) = signum;
- SCARG(&sa_args, nsa) = nbsa;
- SCARG(&sa_args, osa) = obsa;
-
- sa.sa_handler = SCARG(uap, handler);
- sigemptyset(&sa.sa_mask);
- sa.sa_flags = 0;
-#if 0
- if (signum != SIGALRM)
- sa.sa_flags = SA_RESTART;
-#endif
- if ((error = copyout(&sa, nbsa, sizeof(sa))) != 0)
- return error;
- if ((error = sys_sigaction(p, &sa_args, retval)) != 0) {
- DPRINTF(("signal: sigaction failed: %d\n",
- error));
- *retval = (int)OSF1_SIG_ERR;
- return error;
- }
- if ((error = copyin(obsa, &sa, sizeof(sa))) != 0)
- return error;
- *retval = (int)sa.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(p, &sa, retval);
- }
-
- case OSF1_SIGRELSE_MASK:
- {
- struct sys_sigprocmask_args sa;
-
- SCARG(&sa, how) = SIG_UNBLOCK;
- SCARG(&sa, mask) = sigmask(signum);
- return sys_sigprocmask(p, &sa, retval);
- }
-
- case OSF1_SIGIGNORE_MASK:
- {
- struct sys_sigaction_args sa_args;
- struct sigaction *bsa, sa;
-
- bsa = stackgap_alloc(&sg, sizeof(struct sigaction));
- SCARG(&sa_args, signum) = signum;
- SCARG(&sa_args, nsa) = bsa;
- SCARG(&sa_args, osa) = NULL;
-
- sa.sa_handler = SIG_IGN;
- sigemptyset(&sa.sa_mask);
- sa.sa_flags = 0;
- if ((error = copyout(&sa, bsa, sizeof(sa))) != 0)
- return error;
- if ((error = sys_sigaction(p, &sa_args, retval)) != 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(p, &sa, retval);
- }
-
- default:
- return ENOSYS;
- }
-}
-
-int
-osf1_sys_sigpending(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct osf1_sys_sigpending_args *uap = v;
- 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(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct osf1_sys_sigprocmask_args *uap = v;
- osf1_sigset_t oss;
- sigset_t bss;
- int error = 0;
- int s;
-
- 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);
-
- s = splhigh();
-
- switch (SCARG(uap, how)) {
- case OSF1_SIG_BLOCK:
- p->p_sigmask |= bss & ~sigcantmask;
- break;
-
- case OSF1_SIG_UNBLOCK:
- p->p_sigmask &= ~bss;
- break;
-
- case OSF1_SIG_SETMASK:
- p->p_sigmask = bss & ~sigcantmask;
- break;
-
- default:
- error = EINVAL;
- break;
- }
-
- splx(s);
-
- return error;
-}
-
-int
-osf1_sys_sigsuspend(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct osf1_sys_sigsuspend_args *uap = v;
- 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(p, &sa, retval);
-}
-#endif
diff --git a/sys/compat/osf1/osf1_signal.h b/sys/compat/osf1/osf1_signal.h
deleted file mode 100644
index a224df51cb6..00000000000
--- a/sys/compat/osf1/osf1_signal.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/* $OpenBSD: osf1_signal.h,v 1.4 2000/08/04 15:47:55 ericj Exp $ */
-/* $NetBSD: osf1_signal.h,v 1.5 1999/05/01 02:57:11 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_socket.c b/sys/compat/osf1/osf1_socket.c
deleted file mode 100644
index 846ee8090ed..00000000000
--- a/sys/compat/osf1/osf1_socket.c
+++ /dev/null
@@ -1,229 +0,0 @@
-/* $OpenBSD: osf1_socket.c,v 1.1 2000/08/04 15:47:55 ericj Exp $ */
-/* $NetBSD: osf1_socket.c,v 1.4 1999/05/10 01:58:37 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.
- */
-
-/*
- * 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 <sys/param.h>
-#include <sys/systm.h>
-#include <sys/namei.h>
-#include <sys/proc.h>
-#include <sys/file.h>
-#include <sys/mount.h>
-#include <sys/syscallargs.h>
-#include <sys/socketvar.h>
-#include <sys/exec.h>
-
-#include <compat/osf1/osf1.h>
-#include <compat/osf1/osf1_syscallargs.h>
-#include <compat/osf1/osf1_util.h>
-#include <compat/osf1/osf1_cvt.h>
-
-int
-osf1_sys_recvmsg_xopen(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
-
- /* XXX */
- return (EINVAL);
-}
-
-int
-osf1_sys_sendmsg_xopen(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct osf1_sys_sendmsg_xopen_args *uap = v;
- struct sys_sendmsg_args a;
- struct osf1_msghdr_xopen osf_msghdr;
- struct osf1_iovec_xopen osf_iovec, *osf_iovec_ptr;
- struct msghdr bsd_msghdr;
- struct iovec bsd_iovec, *bsd_iovec_ptr;
- unsigned long leftovers;
- caddr_t sg;
- unsigned int i;
- int error;
-
- sg = stackgap_init(p->p_emul);
-
- SCARG(&a, s) = SCARG(uap, s);
-
- /*
- * 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);
-
- if (STACKGAPLEN < (bsd_msghdr.msg_iovlen * sizeof (struct iovec) +
- sizeof (struct msghdr)))
-{
-printf("sendmsg space\n");
- return (EINVAL);
-}
-
- SCARG(&a, msg) = stackgap_alloc(&sg, sizeof bsd_msghdr);
- bsd_msghdr.msg_iov = stackgap_alloc(&sg,
- bsd_msghdr.msg_iovlen * sizeof (struct iovec));
-
- if ((error = copyout(&bsd_msghdr, (caddr_t)SCARG(&a, msg),
- sizeof bsd_msghdr)) != 0)
- return (error);
-
- osf_iovec_ptr = osf_msghdr.msg_iov;
- bsd_iovec_ptr = bsd_msghdr.msg_iov;
- for (i = 0; i < bsd_msghdr.msg_iovlen; i++) {
- if ((error = copyin(&osf_iovec_ptr[i], &osf_iovec,
- sizeof osf_iovec)) != 0)
- return (error);
-
- bsd_iovec.iov_base = osf_iovec.iov_base;
- bsd_iovec.iov_len = osf_iovec.iov_len;
-
- if ((error = copyout(&bsd_iovec, &bsd_iovec_ptr[i],
- sizeof bsd_iovec)) != 0)
- return (error);
- }
-
- /*
- * translate flags
- */
- SCARG(&a, flags) = emul_flags_translate(osf1_sendrecv_msg_flags_xtab,
- SCARG(uap, flags), &leftovers);
- if (leftovers != 0)
-{
-printf("sendmsg flags leftover: 0x%lx\n", leftovers);
- return (EINVAL);
-}
-
- return sys_sendmsg(p, &a, retval);
-}
-
-int
-osf1_sys_sendto(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct osf1_sys_sendto_args *uap = v;
- 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(p, &a, retval);
-}
-
-int
-osf1_sys_socket(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct osf1_sys_socket_args *uap = v;
- struct 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 sys_socket(p, &a, retval);
-}
-
-int
-osf1_sys_socketpair(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct osf1_sys_socketpair_args *uap = v;
- 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(p, &a, retval);
-}
diff --git a/sys/compat/osf1/osf1_syscall.h b/sys/compat/osf1/osf1_syscall.h
deleted file mode 100644
index 5f6319440bf..00000000000
--- a/sys/compat/osf1/osf1_syscall.h
+++ /dev/null
@@ -1,401 +0,0 @@
-/* $OpenBSD: osf1_syscall.h,v 1.14 2008/01/05 00:38:13 miod Exp $ */
-
-/*
- * System call numbers.
- *
- * DO NOT EDIT-- this file is automatically generated.
- * created from OpenBSD: syscalls.master,v 1.11 2008/01/05 00:36:13 miod Exp
- */
-
-/* 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: "char *" "int" "int" */
-#define OSF1_SYS_mknod 14
-
-/* syscall: "chmod" ret: "int" args: "const char *" "int" */
-#define OSF1_SYS_chmod 15
-
-/* syscall: "chown" ret: "int" args: "const char *" "int" "int" */
-#define OSF1_SYS_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" ret: "pid_t" args: */
-#define OSF1_SYS_getpid 20
-
-/* syscall: "mount" ret: "int" args: "int" "const char *" "int" "caddr_t" */
-#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" ret: "uid_t" args: */
-#define OSF1_SYS_getuid 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: "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: "u_int" */
-#define OSF1_SYS_dup 41
-
-/* syscall: "pipe" ret: "int" args: */
-#define OSF1_SYS_pipe 42
-
-/* syscall: "set_program_attributes" ret: "int" args: "caddr_t" "unsigned long" "caddr_t" "unsigned long" */
-#define OSF1_SYS_set_program_attributes 43
-
-/* syscall: "open" ret: "int" args: "char *" "int" "int" */
-#define OSF1_SYS_open 45
-
- /* 46 is obsolete sigaction */
-/* syscall: "getgid" ret: "gid_t" args: */
-#define OSF1_SYS_getgid 47
-
-/* syscall: "sigprocmask" ret: "int" args: "int" "sigset_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" "caddr_t" */
-#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: "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: "char *" "struct osf1_stat *" */
-#define OSF1_SYS_stat 67
-
-/* syscall: "lstat" ret: "int" args: "char *" "struct osf1_stat *" */
-#define OSF1_SYS_lstat 68
-
-/* syscall: "mmap" ret: "caddr_t" args: "caddr_t" "size_t" "int" "int" "int" "off_t" */
-#define OSF1_SYS_mmap 71
-
- /* 72 is obsolete vadvise */
-/* syscall: "munmap" ret: "int" args: "caddr_t" "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: "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: "u_int" "u_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" "caddr_t" "int" */
-#define OSF1_SYS_connect 98
-
-/* syscall: "accept" ret: "int" args: "int" "caddr_t" "int *" */
-#define OSF1_SYS_accept 99
-
-/* syscall: "getpriority" ret: "int" args: "int" "int" */
-#define OSF1_SYS_getpriority 100
-
-/* syscall: "send" ret: "int" args: "int" "caddr_t" "int" "int" */
-#define OSF1_SYS_send 101
-
-/* syscall: "recv" ret: "int" args: "int" "caddr_t" "int" "int" */
-#define OSF1_SYS_recv 102
-
-/* syscall: "sigreturn" ret: "int" args: "struct sigcontext *" */
-#define OSF1_SYS_sigreturn 103
-
-/* syscall: "bind" ret: "int" args: "int" "caddr_t" "int" */
-#define OSF1_SYS_bind 104
-
-/* syscall: "setsockopt" ret: "int" args: "int" "int" "int" "caddr_t" "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" "caddr_t" "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: "fchown" ret: "int" args: "int" "int" "int" */
-#define OSF1_SYS_fchown 123
-
-/* syscall: "fchmod" ret: "int" args: "int" "int" */
-#define OSF1_SYS_fchmod 124
-
-/* syscall: "recvfrom" ret: "int" args: "int" "caddr_t" "size_t" "int" "caddr_t" "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: "rename" ret: "int" args: "const char *" "const char *" */
-#define OSF1_SYS_rename 128
-
-/* syscall: "truncate" ret: "int" args: "char *" "off_t" */
-#define OSF1_SYS_truncate 129
-
-/* syscall: "ftruncate" ret: "int" args: "int" "off_t" */
-#define OSF1_SYS_ftruncate 130
-
-/* syscall: "setgid" ret: "int" args: "gid_t" */
-#define OSF1_SYS_setgid 132
-
-/* syscall: "sendto" ret: "int" args: "int" "caddr_t" "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: "char *" "const struct osf1_timeval *" */
-#define OSF1_SYS_utimes 138
-
- /* 139 is obsolete 4.2 sigreturn */
-/* syscall: "getpeername" ret: "int" args: "int" "caddr_t" "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" "caddr_t" "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 *" "u_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: "lchown" ret: "int" args: "const char *" "int" "int" */
-#define OSF1_SYS_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: "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: "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: "setsysinfo" ret: "int" args: "u_long" "caddr_t" "u_long" "caddr_t" "u_long" */
-#define OSF1_SYS_setsysinfo 257
-
-#define OSF1_SYS_MAXSYSCALL 262
diff --git a/sys/compat/osf1/osf1_syscallargs.h b/sys/compat/osf1/osf1_syscallargs.h
deleted file mode 100644
index f7d345f4c38..00000000000
--- a/sys/compat/osf1/osf1_syscallargs.h
+++ /dev/null
@@ -1,467 +0,0 @@
-/* $OpenBSD: osf1_syscallargs.h,v 1.14 2008/01/05 00:38:13 miod Exp $ */
-
-/*
- * System call argument lists.
- *
- * DO NOT EDIT-- this file is automatically generated.
- * created from OpenBSD: syscalls.master,v 1.11 2008/01/05 00:36:13 miod Exp
- */
-
-#ifdef syscallarg
-#undef syscallarg
-#endif
-
-#define syscallarg(x) \
- union { \
- register_t pad; \
- struct { x datum; } le; \
- struct { \
- int8_t pad[ (sizeof (register_t) < sizeof (x)) \
- ? 0 \
- : sizeof (register_t) - sizeof (x)]; \
- x datum; \
- } be; \
- }
-
-struct osf1_sys_wait4_args {
- syscallarg(int) pid;
- syscallarg(int *) status;
- syscallarg(int) options;
- syscallarg(struct osf1_rusage *) rusage;
-};
-
-struct osf1_sys_mknod_args {
- syscallarg(char *) path;
- syscallarg(int) mode;
- syscallarg(int) dev;
-};
-
-struct osf1_sys_getfsstat_args {
- syscallarg(struct osf1_statfs *) buf;
- syscallarg(long) bufsize;
- syscallarg(int) flags;
-};
-
-struct osf1_sys_lseek_args {
- syscallarg(int) fd;
- syscallarg(off_t) offset;
- syscallarg(int) whence;
-};
-
-struct osf1_sys_mount_args {
- syscallarg(int) type;
- syscallarg(const char *) path;
- syscallarg(int) flags;
- syscallarg(caddr_t) data;
-};
-
-struct osf1_sys_unmount_args {
- syscallarg(const char *) path;
- syscallarg(int) flags;
-};
-
-struct osf1_sys_setuid_args {
- syscallarg(uid_t) uid;
-};
-
-struct osf1_sys_recvmsg_xopen_args {
- syscallarg(int) s;
- syscallarg(struct osf1_msghdr_xopen *) msg;
- syscallarg(int) flags;
-};
-
-struct osf1_sys_sendmsg_xopen_args {
- syscallarg(int) s;
- syscallarg(const struct osf1_msghdr_xopen *) msg;
- syscallarg(int) flags;
-};
-
-struct osf1_sys_access_args {
- syscallarg(char *) path;
- syscallarg(int) flags;
-};
-
-struct osf1_sys_set_program_attributes_args {
- syscallarg(caddr_t) taddr;
- syscallarg(unsigned long) tsize;
- syscallarg(caddr_t) daddr;
- syscallarg(unsigned long) dsize;
-};
-
-struct osf1_sys_open_args {
- syscallarg(char *) path;
- syscallarg(int) flags;
- syscallarg(int) mode;
-};
-
-struct osf1_sys_classcntl_args {
- syscallarg(int) opcode;
- syscallarg(int) arg1;
- syscallarg(int) arg2;
- syscallarg(int) arg3;
-};
-
-struct osf1_sys_ioctl_args {
- syscallarg(int) fd;
- syscallarg(int) com;
- syscallarg(caddr_t) data;
-};
-
-struct osf1_sys_reboot_args {
- syscallarg(int) opt;
-};
-
-struct osf1_sys_execve_args {
- syscallarg(char *) path;
- syscallarg(char *const *) argp;
- syscallarg(char *const *) envp;
-};
-
-struct osf1_sys_stat_args {
- syscallarg(char *) path;
- syscallarg(struct osf1_stat *) ub;
-};
-
-struct osf1_sys_lstat_args {
- syscallarg(char *) path;
- syscallarg(struct osf1_stat *) ub;
-};
-
-struct osf1_sys_mmap_args {
- syscallarg(caddr_t) addr;
- syscallarg(size_t) len;
- syscallarg(int) prot;
- syscallarg(int) flags;
- syscallarg(int) fd;
- syscallarg(off_t) pos;
-};
-
-struct osf1_sys_mprotect_args {
- syscallarg(void *) addr;
- syscallarg(size_t) len;
- syscallarg(int) prot;
-};
-
-struct osf1_sys_madvise_args {
- syscallarg(void *) addr;
- syscallarg(size_t) len;
- syscallarg(int) behav;
-};
-
-struct osf1_sys_setitimer_args {
- syscallarg(u_int) which;
- syscallarg(struct osf1_itimerval *) itv;
- syscallarg(struct osf1_itimerval *) oitv;
-};
-
-struct osf1_sys_fstat_args {
- syscallarg(int) fd;
- syscallarg(void *) sb;
-};
-
-struct osf1_sys_fcntl_args {
- syscallarg(int) fd;
- syscallarg(int) cmd;
- syscallarg(void *) arg;
-};
-
-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;
-};
-
-struct osf1_sys_socket_args {
- syscallarg(int) domain;
- syscallarg(int) type;
- syscallarg(int) protocol;
-};
-
-struct osf1_sys_gettimeofday_args {
- syscallarg(struct osf1_timeval *) tp;
- syscallarg(struct osf1_timezone *) tzp;
-};
-
-struct osf1_sys_getrusage_args {
- syscallarg(int) who;
- syscallarg(struct osf1_rusage *) rusage;
-};
-
-struct osf1_sys_readv_args {
- syscallarg(int) fd;
- syscallarg(struct osf1_iovec *) iovp;
- syscallarg(u_int) iovcnt;
-};
-
-struct osf1_sys_writev_args {
- syscallarg(int) fd;
- syscallarg(struct osf1_iovec *) iovp;
- syscallarg(u_int) iovcnt;
-};
-
-struct osf1_sys_settimeofday_args {
- syscallarg(struct osf1_timeval *) tv;
- syscallarg(struct osf1_timezone *) tzp;
-};
-
-struct osf1_sys_truncate_args {
- syscallarg(char *) path;
- syscallarg(off_t) length;
-};
-
-struct osf1_sys_ftruncate_args {
- syscallarg(int) fd;
- syscallarg(off_t) length;
-};
-
-struct osf1_sys_setgid_args {
- syscallarg(gid_t) gid;
-};
-
-struct osf1_sys_sendto_args {
- syscallarg(int) s;
- syscallarg(caddr_t) buf;
- syscallarg(size_t) len;
- syscallarg(int) flags;
- syscallarg(struct sockaddr *) to;
- syscallarg(int) tolen;
-};
-
-struct osf1_sys_socketpair_args {
- syscallarg(int) domain;
- syscallarg(int) type;
- syscallarg(int) protocol;
- syscallarg(int *) rsv;
-};
-
-struct osf1_sys_utimes_args {
- syscallarg(char *) path;
- syscallarg(const struct osf1_timeval *) tptr;
-};
-
-struct osf1_sys_getrlimit_args {
- syscallarg(u_int) which;
- syscallarg(struct rlimit *) rlp;
-};
-
-struct osf1_sys_setrlimit_args {
- syscallarg(u_int) which;
- syscallarg(struct rlimit *) rlp;
-};
-
-struct osf1_sys_sigaction_args {
- syscallarg(int) signum;
- syscallarg(struct osf1_sigaction *) nsa;
- syscallarg(struct osf1_sigaction *) osa;
-};
-
-struct osf1_sys_statfs_args {
- syscallarg(const char *) path;
- syscallarg(struct osf1_statfs *) buf;
- syscallarg(int) len;
-};
-
-struct osf1_sys_fstatfs_args {
- syscallarg(int) fd;
- syscallarg(struct osf1_statfs *) buf;
- syscallarg(int) len;
-};
-
-struct osf1_sys_uname_args {
- syscallarg(struct osf1_uname *) name;
-};
-
-struct osf1_sys_shmat_args {
- syscallarg(int) shmid;
- syscallarg(const void *) shmaddr;
- syscallarg(int) shmflg;
-};
-
-struct osf1_sys_shmctl_args {
- syscallarg(int) shmid;
- syscallarg(int) cmd;
- syscallarg(struct osf1_shmid_ds *) buf;
-};
-
-struct osf1_sys_shmdt_args {
- syscallarg(const void *) shmaddr;
-};
-
-struct osf1_sys_shmget_args {
- syscallarg(osf1_key_t) key;
- syscallarg(size_t) size;
- syscallarg(int) flags;
-};
-
-struct osf1_sys_sigaltstack_args {
- syscallarg(struct osf1_sigaltstack *) nss;
- syscallarg(struct osf1_sigaltstack *) oss;
-};
-
-struct osf1_sys_sysinfo_args {
- syscallarg(int) cmd;
- syscallarg(char *) buf;
- syscallarg(long) len;
-};
-
-struct osf1_sys_pathconf_args {
- syscallarg(char *) path;
- syscallarg(int) name;
-};
-
-struct osf1_sys_fpathconf_args {
- syscallarg(int) fd;
- syscallarg(int) name;
-};
-
-struct osf1_sys_usleep_thread_args {
- syscallarg(struct osf1_timeval *) sleep;
- syscallarg(struct osf1_timeval *) slept;
-};
-
-struct osf1_sys_setsysinfo_args {
- syscallarg(u_long) op;
- syscallarg(caddr_t) buffer;
- syscallarg(u_long) nbytes;
- syscallarg(caddr_t) arg;
- syscallarg(u_long) flag;
-};
-
-/*
- * System call prototypes.
- */
-
-int sys_nosys(struct proc *, void *, register_t *);
-int sys_exit(struct proc *, void *, register_t *);
-int sys_fork(struct proc *, void *, register_t *);
-int sys_read(struct proc *, void *, register_t *);
-int sys_write(struct proc *, void *, register_t *);
-int sys_close(struct proc *, void *, register_t *);
-int osf1_sys_wait4(struct proc *, void *, register_t *);
-int sys_link(struct proc *, void *, register_t *);
-int sys_unlink(struct proc *, void *, register_t *);
-int sys_chdir(struct proc *, void *, register_t *);
-int sys_fchdir(struct proc *, void *, register_t *);
-int osf1_sys_mknod(struct proc *, void *, register_t *);
-int sys_chmod(struct proc *, void *, register_t *);
-int sys_chown(struct proc *, void *, register_t *);
-int sys_obreak(struct proc *, void *, register_t *);
-int osf1_sys_getfsstat(struct proc *, void *, register_t *);
-int osf1_sys_lseek(struct proc *, void *, register_t *);
-int sys_getpid(struct proc *, void *, register_t *);
-int osf1_sys_mount(struct proc *, void *, register_t *);
-int osf1_sys_unmount(struct proc *, void *, register_t *);
-int osf1_sys_setuid(struct proc *, void *, register_t *);
-int sys_getuid(struct proc *, void *, register_t *);
-int osf1_sys_recvmsg_xopen(struct proc *, void *, register_t *);
-int osf1_sys_sendmsg_xopen(struct proc *, void *, register_t *);
-int osf1_sys_access(struct proc *, void *, register_t *);
-int sys_sync(struct proc *, void *, register_t *);
-int sys_kill(struct proc *, void *, register_t *);
-int sys_setpgid(struct proc *, void *, register_t *);
-int sys_dup(struct proc *, void *, register_t *);
-int sys_pipe(struct proc *, void *, register_t *);
-int osf1_sys_set_program_attributes(struct proc *, void *, register_t *);
-int osf1_sys_open(struct proc *, void *, register_t *);
-int sys_getgid(struct proc *, void *, register_t *);
-int sys_sigprocmask(struct proc *, void *, register_t *);
-int sys_getlogin(struct proc *, void *, register_t *);
-int sys_setlogin(struct proc *, void *, register_t *);
-#ifdef ACCOUNTING
-int sys_acct(struct proc *, void *, register_t *);
-#else
-#endif
-int osf1_sys_classcntl(struct proc *, void *, register_t *);
-int osf1_sys_ioctl(struct proc *, void *, register_t *);
-int osf1_sys_reboot(struct proc *, void *, register_t *);
-int sys_revoke(struct proc *, void *, register_t *);
-int sys_symlink(struct proc *, void *, register_t *);
-int sys_readlink(struct proc *, void *, register_t *);
-int osf1_sys_execve(struct proc *, void *, register_t *);
-int sys_umask(struct proc *, void *, register_t *);
-int sys_chroot(struct proc *, void *, register_t *);
-int sys_getpgrp(struct proc *, void *, register_t *);
-int compat_43_sys_getpagesize(struct proc *, void *, register_t *);
-int sys_vfork(struct proc *, void *, register_t *);
-int osf1_sys_stat(struct proc *, void *, register_t *);
-int osf1_sys_lstat(struct proc *, void *, register_t *);
-int osf1_sys_mmap(struct proc *, void *, register_t *);
-int sys_munmap(struct proc *, void *, register_t *);
-int osf1_sys_mprotect(struct proc *, void *, register_t *);
-int osf1_sys_madvise(struct proc *, void *, register_t *);
-int sys_getgroups(struct proc *, void *, register_t *);
-int sys_setgroups(struct proc *, void *, register_t *);
-int sys_setpgid(struct proc *, void *, register_t *);
-int osf1_sys_setitimer(struct proc *, void *, register_t *);
-int compat_43_sys_gethostname(struct proc *, void *, register_t *);
-int compat_43_sys_sethostname(struct proc *, void *, register_t *);
-int compat_43_sys_getdtablesize(struct proc *, void *, register_t *);
-int sys_dup2(struct proc *, void *, register_t *);
-int osf1_sys_fstat(struct proc *, void *, register_t *);
-int osf1_sys_fcntl(struct proc *, void *, register_t *);
-int osf1_sys_select(struct proc *, void *, register_t *);
-int sys_poll(struct proc *, void *, register_t *);
-int sys_fsync(struct proc *, void *, register_t *);
-int sys_setpriority(struct proc *, void *, register_t *);
-int osf1_sys_socket(struct proc *, void *, register_t *);
-int sys_connect(struct proc *, void *, register_t *);
-int compat_43_sys_accept(struct proc *, void *, register_t *);
-int sys_getpriority(struct proc *, void *, register_t *);
-int compat_43_sys_send(struct proc *, void *, register_t *);
-int compat_43_sys_recv(struct proc *, void *, register_t *);
-int sys_sigreturn(struct proc *, void *, register_t *);
-int sys_bind(struct proc *, void *, register_t *);
-int sys_setsockopt(struct proc *, void *, register_t *);
-int sys_listen(struct proc *, void *, register_t *);
-int sys_sigsuspend(struct proc *, void *, register_t *);
-int compat_43_sys_sigstack(struct proc *, void *, register_t *);
-int osf1_sys_gettimeofday(struct proc *, void *, register_t *);
-int osf1_sys_getrusage(struct proc *, void *, register_t *);
-int sys_getsockopt(struct proc *, void *, register_t *);
-int osf1_sys_readv(struct proc *, void *, register_t *);
-int osf1_sys_writev(struct proc *, void *, register_t *);
-int osf1_sys_settimeofday(struct proc *, void *, register_t *);
-int sys_fchown(struct proc *, void *, register_t *);
-int sys_fchmod(struct proc *, void *, register_t *);
-int compat_43_sys_recvfrom(struct proc *, void *, register_t *);
-int sys_setreuid(struct proc *, void *, register_t *);
-int sys_setregid(struct proc *, void *, register_t *);
-int sys_rename(struct proc *, void *, register_t *);
-int osf1_sys_truncate(struct proc *, void *, register_t *);
-int osf1_sys_ftruncate(struct proc *, void *, register_t *);
-int osf1_sys_setgid(struct proc *, void *, register_t *);
-int osf1_sys_sendto(struct proc *, void *, register_t *);
-int sys_shutdown(struct proc *, void *, register_t *);
-int osf1_sys_socketpair(struct proc *, void *, register_t *);
-int sys_mkdir(struct proc *, void *, register_t *);
-int sys_rmdir(struct proc *, void *, register_t *);
-int osf1_sys_utimes(struct proc *, void *, register_t *);
-int compat_43_sys_getpeername(struct proc *, void *, register_t *);
-int compat_43_sys_gethostid(struct proc *, void *, register_t *);
-int compat_43_sys_sethostid(struct proc *, void *, register_t *);
-int osf1_sys_getrlimit(struct proc *, void *, register_t *);
-int osf1_sys_setrlimit(struct proc *, void *, register_t *);
-int sys_setsid(struct proc *, void *, register_t *);
-int compat_43_sys_quota(struct proc *, void *, register_t *);
-int compat_43_sys_getsockname(struct proc *, void *, register_t *);
-int osf1_sys_sigaction(struct proc *, void *, register_t *);
-int compat_43_sys_getdirentries(struct proc *, void *, register_t *);
-int osf1_sys_statfs(struct proc *, void *, register_t *);
-int osf1_sys_fstatfs(struct proc *, void *, register_t *);
-int compat_09_sys_getdomainname(struct proc *, void *, register_t *);
-int compat_09_sys_setdomainname(struct proc *, void *, register_t *);
-int osf1_sys_uname(struct proc *, void *, register_t *);
-int sys_lchown(struct proc *, void *, register_t *);
-int osf1_sys_shmat(struct proc *, void *, register_t *);
-int osf1_sys_shmctl(struct proc *, void *, register_t *);
-int osf1_sys_shmdt(struct proc *, void *, register_t *);
-int osf1_sys_shmget(struct proc *, void *, register_t *);
-int sys_getsid(struct proc *, void *, register_t *);
-int osf1_sys_sigaltstack(struct proc *, void *, register_t *);
-int osf1_sys_sysinfo(struct proc *, void *, register_t *);
-int osf1_sys_pathconf(struct proc *, void *, register_t *);
-int osf1_sys_fpathconf(struct proc *, void *, register_t *);
-int osf1_sys_usleep_thread(struct proc *, void *, register_t *);
-int osf1_sys_setsysinfo(struct proc *, void *, register_t *);
diff --git a/sys/compat/osf1/osf1_syscalls.c b/sys/compat/osf1/osf1_syscalls.c
deleted file mode 100644
index 1f170606ef3..00000000000
--- a/sys/compat/osf1/osf1_syscalls.c
+++ /dev/null
@@ -1,277 +0,0 @@
-/* $OpenBSD: osf1_syscalls.c,v 1.13 2008/01/05 00:38:13 miod Exp $ */
-
-/*
- * System call names.
- *
- * DO NOT EDIT-- this file is automatically generated.
- * created from OpenBSD: syscalls.master,v 1.11 2008/01/05 00:36:13 miod Exp
- */
-
-char *osf1_syscallnames[] = {
- "syscall", /* 0 = syscall */
- "exit", /* 1 = exit */
- "fork", /* 2 = fork */
- "read", /* 3 = read */
- "write", /* 4 = write */
- "#5 (unimplemented old open)", /* 5 = unimplemented old open */
- "close", /* 6 = close */
- "wait4", /* 7 = wait4 */
- "#8 (unimplemented old creat)", /* 8 = unimplemented old creat */
- "link", /* 9 = link */
- "unlink", /* 10 = unlink */
- "#11 (unimplemented execv)", /* 11 = unimplemented execv */
- "chdir", /* 12 = chdir */
- "fchdir", /* 13 = fchdir */
- "mknod", /* 14 = mknod */
- "chmod", /* 15 = chmod */
- "chown", /* 16 = chown */
- "obreak", /* 17 = obreak */
- "getfsstat", /* 18 = getfsstat */
- "lseek", /* 19 = lseek */
- "getpid", /* 20 = getpid */
- "mount", /* 21 = mount */
- "unmount", /* 22 = unmount */
- "setuid", /* 23 = setuid */
- "getuid", /* 24 = getuid */
- "#25 (unimplemented exec_with_loader)", /* 25 = unimplemented exec_with_loader */
- "#26 (unimplemented ptrace)", /* 26 = unimplemented ptrace */
- "recvmsg_xopen", /* 27 = recvmsg_xopen */
- "sendmsg_xopen", /* 28 = sendmsg_xopen */
- "#29 (unimplemented recvfrom)", /* 29 = unimplemented recvfrom */
- "#30 (unimplemented accept)", /* 30 = unimplemented accept */
- "#31 (unimplemented getpeername)", /* 31 = unimplemented getpeername */
- "#32 (unimplemented getsockname)", /* 32 = unimplemented getsockname */
- "access", /* 33 = access */
- "#34 (unimplemented chflags)", /* 34 = unimplemented chflags */
- "#35 (unimplemented fchflags)", /* 35 = unimplemented fchflags */
- "sync", /* 36 = sync */
- "kill", /* 37 = kill */
- "#38 (unimplemented old stat)", /* 38 = unimplemented old stat */
- "setpgid", /* 39 = setpgid */
- "#40 (unimplemented old lstat)", /* 40 = unimplemented old lstat */
- "dup", /* 41 = dup */
- "pipe", /* 42 = pipe */
- "set_program_attributes", /* 43 = set_program_attributes */
- "#44 (unimplemented profil)", /* 44 = unimplemented profil */
- "open", /* 45 = open */
- "#46 (obsolete sigaction)", /* 46 = obsolete sigaction */
- "getgid", /* 47 = getgid */
- "sigprocmask", /* 48 = sigprocmask */
- "getlogin", /* 49 = getlogin */
- "setlogin", /* 50 = setlogin */
-#ifdef ACCOUNTING
- "acct", /* 51 = acct */
-#else
- "#51 (unimplemented acct)", /* 51 = unimplemented acct */
-#endif
- "#52 (unimplemented sigpending)", /* 52 = unimplemented sigpending */
- "classcntl", /* 53 = classcntl */
- "ioctl", /* 54 = ioctl */
- "reboot", /* 55 = reboot */
- "revoke", /* 56 = revoke */
- "symlink", /* 57 = symlink */
- "readlink", /* 58 = readlink */
- "execve", /* 59 = execve */
- "umask", /* 60 = umask */
- "chroot", /* 61 = chroot */
- "#62 (unimplemented old fstat)", /* 62 = unimplemented old fstat */
- "getpgrp", /* 63 = getpgrp */
- "getpagesize", /* 64 = getpagesize */
- "#65 (unimplemented mremap)", /* 65 = unimplemented mremap */
- "vfork", /* 66 = vfork */
- "stat", /* 67 = stat */
- "lstat", /* 68 = lstat */
- "#69 (unimplemented sbrk)", /* 69 = unimplemented sbrk */
- "#70 (unimplemented sstk)", /* 70 = unimplemented sstk */
- "mmap", /* 71 = mmap */
- "#72 (obsolete vadvise)", /* 72 = obsolete vadvise */
- "munmap", /* 73 = munmap */
- "mprotect", /* 74 = mprotect */
- "madvise", /* 75 = madvise */
- "#76 (unimplemented old vhangup)", /* 76 = unimplemented old vhangup */
- "#77 (unimplemented kmodcall)", /* 77 = unimplemented kmodcall */
- "#78 (unimplemented mincore)", /* 78 = unimplemented mincore */
- "getgroups", /* 79 = getgroups */
- "setgroups", /* 80 = setgroups */
- "#81 (unimplemented old getpgrp)", /* 81 = unimplemented old getpgrp */
- "setpgrp", /* 82 = setpgrp */
- "setitimer", /* 83 = setitimer */
- "#84 (unimplemented old wait)", /* 84 = unimplemented old wait */
- "#85 (unimplemented table)", /* 85 = unimplemented table */
- "#86 (unimplemented getitimer)", /* 86 = unimplemented getitimer */
- "gethostname", /* 87 = gethostname */
- "sethostname", /* 88 = sethostname */
- "getdtablesize", /* 89 = getdtablesize */
- "dup2", /* 90 = dup2 */
- "fstat", /* 91 = fstat */
- "fcntl", /* 92 = fcntl */
- "select", /* 93 = select */
- "poll", /* 94 = poll */
- "fsync", /* 95 = fsync */
- "setpriority", /* 96 = setpriority */
- "socket", /* 97 = socket */
- "connect", /* 98 = connect */
- "accept", /* 99 = accept */
- "getpriority", /* 100 = getpriority */
- "send", /* 101 = send */
- "recv", /* 102 = recv */
- "sigreturn", /* 103 = sigreturn */
- "bind", /* 104 = bind */
- "setsockopt", /* 105 = setsockopt */
- "listen", /* 106 = listen */
- "#107 (unimplemented plock)", /* 107 = unimplemented plock */
- "#108 (unimplemented old sigvec)", /* 108 = unimplemented old sigvec */
- "#109 (unimplemented old sigblock)", /* 109 = unimplemented old sigblock */
- "#110 (unimplemented old sigsetmask)", /* 110 = unimplemented old sigsetmask */
- "sigsuspend", /* 111 = sigsuspend */
- "sigstack", /* 112 = sigstack */
- "#113 (unimplemented old recvmsg)", /* 113 = unimplemented old recvmsg */
- "#114 (unimplemented old sendmsg)", /* 114 = unimplemented old sendmsg */
- "#115 (obsolete vtrace)", /* 115 = obsolete vtrace */
- "gettimeofday", /* 116 = gettimeofday */
- "getrusage", /* 117 = getrusage */
- "getsockopt", /* 118 = getsockopt */
- "#119 (unimplemented)", /* 119 = unimplemented */
- "readv", /* 120 = readv */
- "writev", /* 121 = writev */
- "settimeofday", /* 122 = settimeofday */
- "fchown", /* 123 = fchown */
- "fchmod", /* 124 = fchmod */
- "recvfrom", /* 125 = recvfrom */
- "setreuid", /* 126 = setreuid */
- "setregid", /* 127 = setregid */
- "rename", /* 128 = rename */
- "truncate", /* 129 = truncate */
- "ftruncate", /* 130 = ftruncate */
- "#131 (unimplemented flock)", /* 131 = unimplemented flock */
- "setgid", /* 132 = setgid */
- "sendto", /* 133 = sendto */
- "shutdown", /* 134 = shutdown */
- "socketpair", /* 135 = socketpair */
- "mkdir", /* 136 = mkdir */
- "rmdir", /* 137 = rmdir */
- "utimes", /* 138 = utimes */
- "#139 (obsolete 4.2 sigreturn)", /* 139 = obsolete 4.2 sigreturn */
- "#140 (unimplemented adjtime)", /* 140 = unimplemented adjtime */
- "getpeername", /* 141 = getpeername */
- "gethostid", /* 142 = gethostid */
- "sethostid", /* 143 = sethostid */
- "getrlimit", /* 144 = getrlimit */
- "setrlimit", /* 145 = setrlimit */
- "#146 (unimplemented old killpg)", /* 146 = unimplemented old killpg */
- "setsid", /* 147 = setsid */
- "#148 (unimplemented quotactl)", /* 148 = unimplemented quotactl */
- "quota", /* 149 = quota */
- "getsockname", /* 150 = getsockname */
- "#151 (unimplemented pread)", /* 151 = unimplemented pread */
- "#152 (unimplemented pwrite)", /* 152 = unimplemented pwrite */
- "#153 (unimplemented pid_block)", /* 153 = unimplemented pid_block */
- "#154 (unimplemented pid_unblock)", /* 154 = unimplemented pid_unblock */
- "#155 (unimplemented signal_urti)", /* 155 = unimplemented signal_urti */
- "sigaction", /* 156 = sigaction */
- "#157 (unimplemented sigwaitprim)", /* 157 = unimplemented sigwaitprim */
- "#158 (unimplemented nfssvc)", /* 158 = unimplemented nfssvc */
- "getdirentries", /* 159 = getdirentries */
- "statfs", /* 160 = statfs */
- "fstatfs", /* 161 = fstatfs */
- "#162 (unimplemented)", /* 162 = unimplemented */
- "#163 (unimplemented async_daemon)", /* 163 = unimplemented async_daemon */
- "#164 (unimplemented getfh)", /* 164 = unimplemented getfh */
- "getdomainname", /* 165 = getdomainname */
- "setdomainname", /* 166 = setdomainname */
- "#167 (unimplemented)", /* 167 = unimplemented */
- "#168 (unimplemented)", /* 168 = unimplemented */
- "#169 (unimplemented exportfs)", /* 169 = unimplemented exportfs */
- "#170 (unimplemented)", /* 170 = unimplemented */
- "#171 (unimplemented)", /* 171 = unimplemented */
- "#172 (unimplemented alt msgctl)", /* 172 = unimplemented alt msgctl */
- "#173 (unimplemented alt msgget)", /* 173 = unimplemented alt msgget */
- "#174 (unimplemented alt msgrcv)", /* 174 = unimplemented alt msgrcv */
- "#175 (unimplemented alt msgsnd)", /* 175 = unimplemented alt msgsnd */
- "#176 (unimplemented alt semctl)", /* 176 = unimplemented alt semctl */
- "#177 (unimplemented alt semget)", /* 177 = unimplemented alt semget */
- "#178 (unimplemented alt semop)", /* 178 = unimplemented alt semop */
- "#179 (unimplemented alt uname)", /* 179 = unimplemented alt uname */
- "#180 (unimplemented)", /* 180 = unimplemented */
- "#181 (unimplemented alt plock)", /* 181 = unimplemented alt plock */
- "#182 (unimplemented lockf)", /* 182 = unimplemented lockf */
- "#183 (unimplemented)", /* 183 = unimplemented */
- "#184 (unimplemented getmnt)", /* 184 = unimplemented getmnt */
- "#185 (unimplemented)", /* 185 = unimplemented */
- "#186 (unimplemented unmount)", /* 186 = unimplemented unmount */
- "#187 (unimplemented alt sigpending)", /* 187 = unimplemented alt sigpending */
- "#188 (unimplemented alt setsid)", /* 188 = unimplemented alt setsid */
- "#189 (unimplemented)", /* 189 = unimplemented */
- "#190 (unimplemented)", /* 190 = unimplemented */
- "#191 (unimplemented)", /* 191 = unimplemented */
- "#192 (unimplemented)", /* 192 = unimplemented */
- "#193 (unimplemented)", /* 193 = unimplemented */
- "#194 (unimplemented)", /* 194 = unimplemented */
- "#195 (unimplemented)", /* 195 = unimplemented */
- "#196 (unimplemented)", /* 196 = unimplemented */
- "#197 (unimplemented)", /* 197 = unimplemented */
- "#198 (unimplemented)", /* 198 = unimplemented */
- "#199 (unimplemented swapon)", /* 199 = unimplemented swapon */
- "#200 (unimplemented msgctl)", /* 200 = unimplemented msgctl */
- "#201 (unimplemented msgget)", /* 201 = unimplemented msgget */
- "#202 (unimplemented msgrcv)", /* 202 = unimplemented msgrcv */
- "#203 (unimplemented msgsnd)", /* 203 = unimplemented msgsnd */
- "#204 (unimplemented semctl)", /* 204 = unimplemented semctl */
- "#205 (unimplemented semget)", /* 205 = unimplemented semget */
- "#206 (unimplemented semop)", /* 206 = unimplemented semop */
- "uname", /* 207 = uname */
- "lchown", /* 208 = lchown */
- "shmat", /* 209 = shmat */
- "shmctl", /* 210 = shmctl */
- "shmdt", /* 211 = shmdt */
- "shmget", /* 212 = shmget */
- "#213 (unimplemented mvalid)", /* 213 = unimplemented mvalid */
- "#214 (unimplemented getaddressconf)", /* 214 = unimplemented getaddressconf */
- "#215 (unimplemented msleep)", /* 215 = unimplemented msleep */
- "#216 (unimplemented mwakeup)", /* 216 = unimplemented mwakeup */
- "#217 (unimplemented msync)", /* 217 = unimplemented msync */
- "#218 (unimplemented signal)", /* 218 = unimplemented signal */
- "#219 (unimplemented utc gettime)", /* 219 = unimplemented utc gettime */
- "#220 (unimplemented utc adjtime)", /* 220 = unimplemented utc adjtime */
- "#221 (unimplemented)", /* 221 = unimplemented */
- "#222 (unimplemented security)", /* 222 = unimplemented security */
- "#223 (unimplemented kloadcall)", /* 223 = unimplemented kloadcall */
- "#224 (unimplemented)", /* 224 = unimplemented */
- "#225 (unimplemented)", /* 225 = unimplemented */
- "#226 (unimplemented)", /* 226 = unimplemented */
- "#227 (unimplemented)", /* 227 = unimplemented */
- "#228 (unimplemented)", /* 228 = unimplemented */
- "#229 (unimplemented)", /* 229 = unimplemented */
- "#230 (unimplemented)", /* 230 = unimplemented */
- "#231 (unimplemented)", /* 231 = unimplemented */
- "#232 (unimplemented)", /* 232 = unimplemented */
- "#233 (unimplemented getpgid)", /* 233 = unimplemented getpgid */
- "getsid", /* 234 = getsid */
- "sigaltstack", /* 235 = sigaltstack */
- "#236 (unimplemented waitid)", /* 236 = unimplemented waitid */
- "#237 (unimplemented priocntlset)", /* 237 = unimplemented priocntlset */
- "#238 (unimplemented sigsendset)", /* 238 = unimplemented sigsendset */
- "#239 (unimplemented set_speculative)", /* 239 = unimplemented set_speculative */
- "#240 (unimplemented msfs_syscall)", /* 240 = unimplemented msfs_syscall */
- "sysinfo", /* 241 = sysinfo */
- "#242 (unimplemented uadmin)", /* 242 = unimplemented uadmin */
- "#243 (unimplemented fuser)", /* 243 = unimplemented fuser */
- "#244 (unimplemented proplist_syscall)", /* 244 = unimplemented proplist_syscall */
- "#245 (unimplemented ntp_adjtime)", /* 245 = unimplemented ntp_adjtime */
- "#246 (unimplemented ntp_gettime)", /* 246 = unimplemented ntp_gettime */
- "pathconf", /* 247 = pathconf */
- "fpathconf", /* 248 = fpathconf */
- "#249 (unimplemented)", /* 249 = unimplemented */
- "#250 (unimplemented uswitch)", /* 250 = unimplemented uswitch */
- "usleep_thread", /* 251 = usleep_thread */
- "#252 (unimplemented audcntl)", /* 252 = unimplemented audcntl */
- "#253 (unimplemented audgen)", /* 253 = unimplemented audgen */
- "#254 (unimplemented sysfs)", /* 254 = unimplemented sysfs */
- "#255 (unimplemented subsys_info)", /* 255 = unimplemented subsys_info */
- "#256 (unimplemented getsysinfo)", /* 256 = unimplemented getsysinfo */
- "setsysinfo", /* 257 = setsysinfo */
- "#258 (unimplemented afs_syscall)", /* 258 = unimplemented afs_syscall */
- "#259 (unimplemented swapctl)", /* 259 = unimplemented swapctl */
- "#260 (unimplemented memcntl)", /* 260 = unimplemented memcntl */
- "#261 (unimplemented fdatasync)", /* 261 = unimplemented fdatasync */
-};
diff --git a/sys/compat/osf1/osf1_sysent.c b/sys/compat/osf1/osf1_sysent.c
deleted file mode 100644
index 56efde3978a..00000000000
--- a/sys/compat/osf1/osf1_sysent.c
+++ /dev/null
@@ -1,552 +0,0 @@
-/* $OpenBSD: osf1_sysent.c,v 1.14 2008/01/05 00:38:13 miod Exp $ */
-
-/*
- * System call switch table.
- *
- * DO NOT EDIT-- this file is automatically generated.
- * created from OpenBSD: syscalls.master,v 1.11 2008/01/05 00:36:13 miod Exp
- */
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/signal.h>
-#include <sys/mount.h>
-#include <sys/poll.h>
-#include <sys/syscallargs.h>
-#include <compat/osf1/osf1.h>
-#include <compat/osf1/osf1_syscallargs.h>
-
-#define s(type) sizeof(type)
-
-struct sysent osf1_sysent[] = {
- { 0, 0, 0,
- sys_nosys }, /* 0 = syscall */
- { 1, s(struct sys_exit_args), 0,
- sys_exit }, /* 1 = exit */
- { 0, 0, 0,
- sys_fork }, /* 2 = fork */
- { 3, s(struct sys_read_args), 0,
- sys_read }, /* 3 = read */
- { 3, s(struct sys_write_args), 0,
- sys_write }, /* 4 = write */
- { 0, 0, 0,
- sys_nosys }, /* 5 = unimplemented old open */
- { 1, s(struct sys_close_args), 0,
- sys_close }, /* 6 = close */
- { 4, s(struct osf1_sys_wait4_args), 0,
- osf1_sys_wait4 }, /* 7 = wait4 */
- { 0, 0, 0,
- sys_nosys }, /* 8 = unimplemented old creat */
- { 2, s(struct sys_link_args), 0,
- sys_link }, /* 9 = link */
- { 1, s(struct sys_unlink_args), 0,
- sys_unlink }, /* 10 = unlink */
- { 0, 0, 0,
- sys_nosys }, /* 11 = unimplemented execv */
- { 1, s(struct sys_chdir_args), 0,
- sys_chdir }, /* 12 = chdir */
- { 1, s(struct sys_fchdir_args), 0,
- sys_fchdir }, /* 13 = fchdir */
- { 3, s(struct osf1_sys_mknod_args), 0,
- osf1_sys_mknod }, /* 14 = mknod */
- { 2, s(struct sys_chmod_args), 0,
- sys_chmod }, /* 15 = chmod */
- { 3, s(struct sys_chown_args), 0,
- sys_chown }, /* 16 = chown */
- { 1, s(struct sys_obreak_args), 0,
- sys_obreak }, /* 17 = obreak */
- { 3, s(struct osf1_sys_getfsstat_args), 0,
- osf1_sys_getfsstat }, /* 18 = getfsstat */
- { 3, s(struct osf1_sys_lseek_args), 0,
- osf1_sys_lseek }, /* 19 = lseek */
- { 0, 0, 0,
- sys_getpid }, /* 20 = getpid */
- { 4, s(struct osf1_sys_mount_args), 0,
- osf1_sys_mount }, /* 21 = mount */
- { 2, s(struct osf1_sys_unmount_args), 0,
- osf1_sys_unmount }, /* 22 = unmount */
- { 1, s(struct osf1_sys_setuid_args), 0,
- osf1_sys_setuid }, /* 23 = setuid */
- { 0, 0, 0,
- sys_getuid }, /* 24 = getuid */
- { 0, 0, 0,
- sys_nosys }, /* 25 = unimplemented exec_with_loader */
- { 0, 0, 0,
- sys_nosys }, /* 26 = unimplemented ptrace */
- { 3, s(struct osf1_sys_recvmsg_xopen_args), 0,
- osf1_sys_recvmsg_xopen }, /* 27 = recvmsg_xopen */
- { 3, s(struct osf1_sys_sendmsg_xopen_args), 0,
- osf1_sys_sendmsg_xopen }, /* 28 = sendmsg_xopen */
- { 0, 0, 0,
- sys_nosys }, /* 29 = unimplemented recvfrom */
- { 0, 0, 0,
- sys_nosys }, /* 30 = unimplemented accept */
- { 0, 0, 0,
- sys_nosys }, /* 31 = unimplemented getpeername */
- { 0, 0, 0,
- sys_nosys }, /* 32 = unimplemented getsockname */
- { 2, s(struct osf1_sys_access_args), 0,
- osf1_sys_access }, /* 33 = access */
- { 0, 0, 0,
- sys_nosys }, /* 34 = unimplemented chflags */
- { 0, 0, 0,
- sys_nosys }, /* 35 = unimplemented fchflags */
- { 0, 0, 0,
- sys_sync }, /* 36 = sync */
- { 2, s(struct sys_kill_args), 0,
- sys_kill }, /* 37 = kill */
- { 0, 0, 0,
- sys_nosys }, /* 38 = unimplemented old stat */
- { 2, s(struct sys_setpgid_args), 0,
- sys_setpgid }, /* 39 = setpgid */
- { 0, 0, 0,
- sys_nosys }, /* 40 = unimplemented old lstat */
- { 1, s(struct sys_dup_args), 0,
- sys_dup }, /* 41 = dup */
- { 0, 0, 0,
- sys_pipe }, /* 42 = pipe */
- { 4, s(struct osf1_sys_set_program_attributes_args), 0,
- osf1_sys_set_program_attributes }, /* 43 = set_program_attributes */
- { 0, 0, 0,
- sys_nosys }, /* 44 = unimplemented profil */
- { 3, s(struct osf1_sys_open_args), 0,
- osf1_sys_open }, /* 45 = open */
- { 0, 0, 0,
- sys_nosys }, /* 46 = obsolete sigaction */
- { 0, 0, 0,
- sys_getgid }, /* 47 = getgid */
- { 2, s(struct sys_sigprocmask_args), 0,
- sys_sigprocmask }, /* 48 = sigprocmask */
- { 2, s(struct sys_getlogin_args), 0,
- sys_getlogin }, /* 49 = getlogin */
- { 1, s(struct sys_setlogin_args), 0,
- sys_setlogin }, /* 50 = setlogin */
-#ifdef ACCOUNTING
- { 1, s(struct sys_acct_args), 0,
- sys_acct }, /* 51 = acct */
-#else
- { 0, 0, 0,
- sys_nosys }, /* 51 = unimplemented acct */
-#endif
- { 0, 0, 0,
- sys_nosys }, /* 52 = unimplemented sigpending */
- { 4, s(struct osf1_sys_classcntl_args), 0,
- osf1_sys_classcntl }, /* 53 = classcntl */
- { 3, s(struct osf1_sys_ioctl_args), 0,
- osf1_sys_ioctl }, /* 54 = ioctl */
- { 1, s(struct osf1_sys_reboot_args), 0,
- osf1_sys_reboot }, /* 55 = reboot */
- { 1, s(struct sys_revoke_args), 0,
- sys_revoke }, /* 56 = revoke */
- { 2, s(struct sys_symlink_args), 0,
- sys_symlink }, /* 57 = symlink */
- { 3, s(struct sys_readlink_args), 0,
- sys_readlink }, /* 58 = readlink */
- { 3, s(struct osf1_sys_execve_args), 0,
- osf1_sys_execve }, /* 59 = execve */
- { 1, s(struct sys_umask_args), 0,
- sys_umask }, /* 60 = umask */
- { 1, s(struct sys_chroot_args), 0,
- sys_chroot }, /* 61 = chroot */
- { 0, 0, 0,
- sys_nosys }, /* 62 = unimplemented old fstat */
- { 0, 0, 0,
- sys_getpgrp }, /* 63 = getpgrp */
- { 0, 0, 0,
- compat_43_sys_getpagesize }, /* 64 = getpagesize */
- { 0, 0, 0,
- sys_nosys }, /* 65 = unimplemented mremap */
- { 0, 0, 0,
- sys_vfork }, /* 66 = vfork */
- { 2, s(struct osf1_sys_stat_args), 0,
- osf1_sys_stat }, /* 67 = stat */
- { 2, s(struct osf1_sys_lstat_args), 0,
- osf1_sys_lstat }, /* 68 = lstat */
- { 0, 0, 0,
- sys_nosys }, /* 69 = unimplemented sbrk */
- { 0, 0, 0,
- sys_nosys }, /* 70 = unimplemented sstk */
- { 6, s(struct osf1_sys_mmap_args), 0,
- osf1_sys_mmap }, /* 71 = mmap */
- { 0, 0, 0,
- sys_nosys }, /* 72 = obsolete vadvise */
- { 2, s(struct sys_munmap_args), 0,
- sys_munmap }, /* 73 = munmap */
- { 3, s(struct osf1_sys_mprotect_args), 0,
- osf1_sys_mprotect }, /* 74 = mprotect */
- { 3, s(struct osf1_sys_madvise_args), 0,
- osf1_sys_madvise }, /* 75 = madvise */
- { 0, 0, 0,
- sys_nosys }, /* 76 = unimplemented old vhangup */
- { 0, 0, 0,
- sys_nosys }, /* 77 = unimplemented kmodcall */
- { 0, 0, 0,
- sys_nosys }, /* 78 = unimplemented mincore */
- { 2, s(struct sys_getgroups_args), 0,
- sys_getgroups }, /* 79 = getgroups */
- { 2, s(struct sys_setgroups_args), 0,
- sys_setgroups }, /* 80 = setgroups */
- { 0, 0, 0,
- sys_nosys }, /* 81 = unimplemented old getpgrp */
- { 2, s(struct sys_setpgid_args), 0,
- sys_setpgid }, /* 82 = setpgrp */
- { 3, s(struct osf1_sys_setitimer_args), 0,
- osf1_sys_setitimer }, /* 83 = setitimer */
- { 0, 0, 0,
- sys_nosys }, /* 84 = unimplemented old wait */
- { 0, 0, 0,
- sys_nosys }, /* 85 = unimplemented table */
- { 0, 0, 0,
- sys_nosys }, /* 86 = unimplemented getitimer */
- { 2, s(struct compat_43_sys_gethostname_args), 0,
- compat_43_sys_gethostname }, /* 87 = gethostname */
- { 2, s(struct compat_43_sys_sethostname_args), 0,
- compat_43_sys_sethostname }, /* 88 = sethostname */
- { 0, 0, 0,
- compat_43_sys_getdtablesize }, /* 89 = getdtablesize */
- { 2, s(struct sys_dup2_args), 0,
- sys_dup2 }, /* 90 = dup2 */
- { 2, s(struct osf1_sys_fstat_args), 0,
- osf1_sys_fstat }, /* 91 = fstat */
- { 3, s(struct osf1_sys_fcntl_args), 0,
- osf1_sys_fcntl }, /* 92 = fcntl */
- { 5, s(struct osf1_sys_select_args), 0,
- osf1_sys_select }, /* 93 = select */
- { 3, s(struct sys_poll_args), 0,
- sys_poll }, /* 94 = poll */
- { 1, s(struct sys_fsync_args), 0,
- sys_fsync }, /* 95 = fsync */
- { 3, s(struct sys_setpriority_args), 0,
- sys_setpriority }, /* 96 = setpriority */
- { 3, s(struct osf1_sys_socket_args), 0,
- osf1_sys_socket }, /* 97 = socket */
- { 3, s(struct sys_connect_args), 0,
- sys_connect }, /* 98 = connect */
- { 3, s(struct compat_43_sys_accept_args), 0,
- compat_43_sys_accept }, /* 99 = accept */
- { 2, s(struct sys_getpriority_args), 0,
- sys_getpriority }, /* 100 = getpriority */
- { 4, s(struct compat_43_sys_send_args), 0,
- compat_43_sys_send }, /* 101 = send */
- { 4, s(struct compat_43_sys_recv_args), 0,
- compat_43_sys_recv }, /* 102 = recv */
- { 1, s(struct sys_sigreturn_args), 0,
- sys_sigreturn }, /* 103 = sigreturn */
- { 3, s(struct sys_bind_args), 0,
- sys_bind }, /* 104 = bind */
- { 5, s(struct sys_setsockopt_args), 0,
- sys_setsockopt }, /* 105 = setsockopt */
- { 2, s(struct sys_listen_args), 0,
- sys_listen }, /* 106 = listen */
- { 0, 0, 0,
- sys_nosys }, /* 107 = unimplemented plock */
- { 0, 0, 0,
- sys_nosys }, /* 108 = unimplemented old sigvec */
- { 0, 0, 0,
- sys_nosys }, /* 109 = unimplemented old sigblock */
- { 0, 0, 0,
- sys_nosys }, /* 110 = unimplemented old sigsetmask */
- { 1, s(struct sys_sigsuspend_args), 0,
- sys_sigsuspend }, /* 111 = sigsuspend */
- { 2, s(struct compat_43_sys_sigstack_args), 0,
- compat_43_sys_sigstack }, /* 112 = sigstack */
- { 0, 0, 0,
- sys_nosys }, /* 113 = unimplemented old recvmsg */
- { 0, 0, 0,
- sys_nosys }, /* 114 = unimplemented old sendmsg */
- { 0, 0, 0,
- sys_nosys }, /* 115 = obsolete vtrace */
- { 2, s(struct osf1_sys_gettimeofday_args), 0,
- osf1_sys_gettimeofday }, /* 116 = gettimeofday */
- { 2, s(struct osf1_sys_getrusage_args), 0,
- osf1_sys_getrusage }, /* 117 = getrusage */
- { 5, s(struct sys_getsockopt_args), 0,
- sys_getsockopt }, /* 118 = getsockopt */
- { 0, 0, 0,
- sys_nosys }, /* 119 = unimplemented */
- { 3, s(struct osf1_sys_readv_args), 0,
- osf1_sys_readv }, /* 120 = readv */
- { 3, s(struct osf1_sys_writev_args), 0,
- osf1_sys_writev }, /* 121 = writev */
- { 2, s(struct osf1_sys_settimeofday_args), 0,
- osf1_sys_settimeofday }, /* 122 = settimeofday */
- { 3, s(struct sys_fchown_args), 0,
- sys_fchown }, /* 123 = fchown */
- { 2, s(struct sys_fchmod_args), 0,
- sys_fchmod }, /* 124 = fchmod */
- { 6, s(struct compat_43_sys_recvfrom_args), 0,
- compat_43_sys_recvfrom }, /* 125 = recvfrom */
- { 2, s(struct sys_setreuid_args), 0,
- sys_setreuid }, /* 126 = setreuid */
- { 2, s(struct sys_setregid_args), 0,
- sys_setregid }, /* 127 = setregid */
- { 2, s(struct sys_rename_args), 0,
- sys_rename }, /* 128 = rename */
- { 2, s(struct osf1_sys_truncate_args), 0,
- osf1_sys_truncate }, /* 129 = truncate */
- { 2, s(struct osf1_sys_ftruncate_args), 0,
- osf1_sys_ftruncate }, /* 130 = ftruncate */
- { 0, 0, 0,
- sys_nosys }, /* 131 = unimplemented flock */
- { 1, s(struct osf1_sys_setgid_args), 0,
- osf1_sys_setgid }, /* 132 = setgid */
- { 6, s(struct osf1_sys_sendto_args), 0,
- osf1_sys_sendto }, /* 133 = sendto */
- { 2, s(struct sys_shutdown_args), 0,
- sys_shutdown }, /* 134 = shutdown */
- { 4, s(struct osf1_sys_socketpair_args), 0,
- osf1_sys_socketpair }, /* 135 = socketpair */
- { 2, s(struct sys_mkdir_args), 0,
- sys_mkdir }, /* 136 = mkdir */
- { 1, s(struct sys_rmdir_args), 0,
- sys_rmdir }, /* 137 = rmdir */
- { 2, s(struct osf1_sys_utimes_args), 0,
- osf1_sys_utimes }, /* 138 = utimes */
- { 0, 0, 0,
- sys_nosys }, /* 139 = obsolete 4.2 sigreturn */
- { 0, 0, 0,
- sys_nosys }, /* 140 = unimplemented adjtime */
- { 3, s(struct compat_43_sys_getpeername_args), 0,
- compat_43_sys_getpeername }, /* 141 = getpeername */
- { 0, 0, 0,
- compat_43_sys_gethostid }, /* 142 = gethostid */
- { 1, s(struct compat_43_sys_sethostid_args), 0,
- compat_43_sys_sethostid }, /* 143 = sethostid */
- { 2, s(struct osf1_sys_getrlimit_args), 0,
- osf1_sys_getrlimit }, /* 144 = getrlimit */
- { 2, s(struct osf1_sys_setrlimit_args), 0,
- osf1_sys_setrlimit }, /* 145 = setrlimit */
- { 0, 0, 0,
- sys_nosys }, /* 146 = unimplemented old killpg */
- { 0, 0, 0,
- sys_setsid }, /* 147 = setsid */
- { 0, 0, 0,
- sys_nosys }, /* 148 = unimplemented quotactl */
- { 0, 0, 0,
- compat_43_sys_quota }, /* 149 = quota */
- { 3, s(struct compat_43_sys_getsockname_args), 0,
- compat_43_sys_getsockname }, /* 150 = getsockname */
- { 0, 0, 0,
- sys_nosys }, /* 151 = unimplemented pread */
- { 0, 0, 0,
- sys_nosys }, /* 152 = unimplemented pwrite */
- { 0, 0, 0,
- sys_nosys }, /* 153 = unimplemented pid_block */
- { 0, 0, 0,
- sys_nosys }, /* 154 = unimplemented pid_unblock */
- { 0, 0, 0,
- sys_nosys }, /* 155 = unimplemented signal_urti */
- { 3, s(struct osf1_sys_sigaction_args), 0,
- osf1_sys_sigaction }, /* 156 = sigaction */
- { 0, 0, 0,
- sys_nosys }, /* 157 = unimplemented sigwaitprim */
- { 0, 0, 0,
- sys_nosys }, /* 158 = unimplemented nfssvc */
- { 4, s(struct compat_43_sys_getdirentries_args), 0,
- compat_43_sys_getdirentries }, /* 159 = getdirentries */
- { 3, s(struct osf1_sys_statfs_args), 0,
- osf1_sys_statfs }, /* 160 = statfs */
- { 3, s(struct osf1_sys_fstatfs_args), 0,
- osf1_sys_fstatfs }, /* 161 = fstatfs */
- { 0, 0, 0,
- sys_nosys }, /* 162 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 163 = unimplemented async_daemon */
- { 0, 0, 0,
- sys_nosys }, /* 164 = unimplemented getfh */
- { 2, s(struct compat_09_sys_getdomainname_args), 0,
- compat_09_sys_getdomainname }, /* 165 = getdomainname */
- { 2, s(struct compat_09_sys_setdomainname_args), 0,
- compat_09_sys_setdomainname }, /* 166 = setdomainname */
- { 0, 0, 0,
- sys_nosys }, /* 167 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 168 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 169 = unimplemented exportfs */
- { 0, 0, 0,
- sys_nosys }, /* 170 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 171 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 172 = unimplemented alt msgctl */
- { 0, 0, 0,
- sys_nosys }, /* 173 = unimplemented alt msgget */
- { 0, 0, 0,
- sys_nosys }, /* 174 = unimplemented alt msgrcv */
- { 0, 0, 0,
- sys_nosys }, /* 175 = unimplemented alt msgsnd */
- { 0, 0, 0,
- sys_nosys }, /* 176 = unimplemented alt semctl */
- { 0, 0, 0,
- sys_nosys }, /* 177 = unimplemented alt semget */
- { 0, 0, 0,
- sys_nosys }, /* 178 = unimplemented alt semop */
- { 0, 0, 0,
- sys_nosys }, /* 179 = unimplemented alt uname */
- { 0, 0, 0,
- sys_nosys }, /* 180 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 181 = unimplemented alt plock */
- { 0, 0, 0,
- sys_nosys }, /* 182 = unimplemented lockf */
- { 0, 0, 0,
- sys_nosys }, /* 183 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 184 = unimplemented getmnt */
- { 0, 0, 0,
- sys_nosys }, /* 185 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 186 = unimplemented unmount */
- { 0, 0, 0,
- sys_nosys }, /* 187 = unimplemented alt sigpending */
- { 0, 0, 0,
- sys_nosys }, /* 188 = unimplemented alt setsid */
- { 0, 0, 0,
- sys_nosys }, /* 189 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 190 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 191 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 192 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 193 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 194 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 195 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 196 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 197 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 198 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 199 = unimplemented swapon */
- { 0, 0, 0,
- sys_nosys }, /* 200 = unimplemented msgctl */
- { 0, 0, 0,
- sys_nosys }, /* 201 = unimplemented msgget */
- { 0, 0, 0,
- sys_nosys }, /* 202 = unimplemented msgrcv */
- { 0, 0, 0,
- sys_nosys }, /* 203 = unimplemented msgsnd */
- { 0, 0, 0,
- sys_nosys }, /* 204 = unimplemented semctl */
- { 0, 0, 0,
- sys_nosys }, /* 205 = unimplemented semget */
- { 0, 0, 0,
- sys_nosys }, /* 206 = unimplemented semop */
- { 1, s(struct osf1_sys_uname_args), 0,
- osf1_sys_uname }, /* 207 = uname */
- { 3, s(struct sys_lchown_args), 0,
- sys_lchown }, /* 208 = lchown */
- { 3, s(struct osf1_sys_shmat_args), 0,
- osf1_sys_shmat }, /* 209 = shmat */
- { 3, s(struct osf1_sys_shmctl_args), 0,
- osf1_sys_shmctl }, /* 210 = shmctl */
- { 1, s(struct osf1_sys_shmdt_args), 0,
- osf1_sys_shmdt }, /* 211 = shmdt */
- { 3, s(struct osf1_sys_shmget_args), 0,
- osf1_sys_shmget }, /* 212 = shmget */
- { 0, 0, 0,
- sys_nosys }, /* 213 = unimplemented mvalid */
- { 0, 0, 0,
- sys_nosys }, /* 214 = unimplemented getaddressconf */
- { 0, 0, 0,
- sys_nosys }, /* 215 = unimplemented msleep */
- { 0, 0, 0,
- sys_nosys }, /* 216 = unimplemented mwakeup */
- { 0, 0, 0,
- sys_nosys }, /* 217 = unimplemented msync */
- { 0, 0, 0,
- sys_nosys }, /* 218 = unimplemented signal */
- { 0, 0, 0,
- sys_nosys }, /* 219 = unimplemented utc gettime */
- { 0, 0, 0,
- sys_nosys }, /* 220 = unimplemented utc adjtime */
- { 0, 0, 0,
- sys_nosys }, /* 221 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 222 = unimplemented security */
- { 0, 0, 0,
- sys_nosys }, /* 223 = unimplemented kloadcall */
- { 0, 0, 0,
- sys_nosys }, /* 224 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 225 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 226 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 227 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 228 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 229 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 230 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 231 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 232 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 233 = unimplemented getpgid */
- { 1, s(struct sys_getsid_args), 0,
- sys_getsid }, /* 234 = getsid */
- { 2, s(struct osf1_sys_sigaltstack_args), 0,
- osf1_sys_sigaltstack }, /* 235 = sigaltstack */
- { 0, 0, 0,
- sys_nosys }, /* 236 = unimplemented waitid */
- { 0, 0, 0,
- sys_nosys }, /* 237 = unimplemented priocntlset */
- { 0, 0, 0,
- sys_nosys }, /* 238 = unimplemented sigsendset */
- { 0, 0, 0,
- sys_nosys }, /* 239 = unimplemented set_speculative */
- { 0, 0, 0,
- sys_nosys }, /* 240 = unimplemented msfs_syscall */
- { 3, s(struct osf1_sys_sysinfo_args), 0,
- osf1_sys_sysinfo }, /* 241 = sysinfo */
- { 0, 0, 0,
- sys_nosys }, /* 242 = unimplemented uadmin */
- { 0, 0, 0,
- sys_nosys }, /* 243 = unimplemented fuser */
- { 0, 0, 0,
- sys_nosys }, /* 244 = unimplemented proplist_syscall */
- { 0, 0, 0,
- sys_nosys }, /* 245 = unimplemented ntp_adjtime */
- { 0, 0, 0,
- sys_nosys }, /* 246 = unimplemented ntp_gettime */
- { 2, s(struct osf1_sys_pathconf_args), 0,
- osf1_sys_pathconf }, /* 247 = pathconf */
- { 2, s(struct osf1_sys_fpathconf_args), 0,
- osf1_sys_fpathconf }, /* 248 = fpathconf */
- { 0, 0, 0,
- sys_nosys }, /* 249 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 250 = unimplemented uswitch */
- { 2, s(struct osf1_sys_usleep_thread_args), 0,
- osf1_sys_usleep_thread }, /* 251 = usleep_thread */
- { 0, 0, 0,
- sys_nosys }, /* 252 = unimplemented audcntl */
- { 0, 0, 0,
- sys_nosys }, /* 253 = unimplemented audgen */
- { 0, 0, 0,
- sys_nosys }, /* 254 = unimplemented sysfs */
- { 0, 0, 0,
- sys_nosys }, /* 255 = unimplemented subsys_info */
- { 0, 0, 0,
- sys_nosys }, /* 256 = unimplemented getsysinfo */
- { 5, s(struct osf1_sys_setsysinfo_args), 0,
- osf1_sys_setsysinfo }, /* 257 = setsysinfo */
- { 0, 0, 0,
- sys_nosys }, /* 258 = unimplemented afs_syscall */
- { 0, 0, 0,
- sys_nosys }, /* 259 = unimplemented swapctl */
- { 0, 0, 0,
- sys_nosys }, /* 260 = unimplemented memcntl */
- { 0, 0, 0,
- sys_nosys }, /* 261 = unimplemented fdatasync */
-};
-
diff --git a/sys/compat/osf1/osf1_sysv_ipc.c b/sys/compat/osf1/osf1_sysv_ipc.c
deleted file mode 100644
index ae9debabb48..00000000000
--- a/sys/compat/osf1/osf1_sysv_ipc.c
+++ /dev/null
@@ -1,88 +0,0 @@
-/* $OpenBSD: osf1_sysv_ipc.c,v 1.1 2000/08/04 15:47:55 ericj Exp $ */
-/* $NetBSD: osf1_sysv_ipc.c,v 1.1 1999/05/04 04:59:21 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.
- */
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/namei.h>
-#include <sys/proc.h>
-#include <sys/file.h>
-#include <sys/mount.h>
-#include <sys/syscallargs.h>
-
-#include <compat/osf1/osf1.h>
-#include <compat/osf1/osf1_syscallargs.h>
-#include <compat/osf1/osf1_cvt.h>
-
-int
-osf1_sys_shmat(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
-
- /* XXX */
- return (ENOSYS);
-}
-
-int
-osf1_sys_shmctl(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
-
- /* XXX */
- return (ENOSYS);
-}
-
-int
-osf1_sys_shmdt(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
-
- /* XXX */
- return (ENOSYS);
-}
-
-int
-osf1_sys_shmget(p, v, retval)
- struct proc *p;
- void *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 73fb98b5925..00000000000
--- a/sys/compat/osf1/osf1_time.c
+++ /dev/null
@@ -1,239 +0,0 @@
-/* $OpenBSD: osf1_time.c,v 1.3 2008/09/23 04:31:41 miod Exp $ */
-/* $NetBSD: osf1_time.c,v 1.1 1999/05/01 05:25:37 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.
- */
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/namei.h>
-#include <sys/proc.h>
-#include <sys/file.h>
-#include <sys/mount.h>
-#include <sys/syscallargs.h>
-
-#include <compat/osf1/osf1.h>
-#include <compat/osf1/osf1_syscallargs.h>
-#include <compat/osf1/osf1_cvt.h>
-
-int
-osf1_sys_gettimeofday(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct osf1_sys_gettimeofday_args *uap = v;
- struct sys_gettimeofday_args a;
- struct osf1_timeval otv;
- struct osf1_timezone otz;
- struct timeval tv;
- struct timezone tz;
- int error;
- caddr_t sg;
-
- sg = stackgap_init(p->p_emul);
- if (SCARG(uap, tp) == NULL)
- SCARG(&a, tp) = NULL;
- else
- SCARG(&a, tp) = stackgap_alloc(&sg, sizeof tv);
- if (SCARG(uap, tzp) == NULL)
- SCARG(&a, tzp) = NULL;
- else
- SCARG(&a, tzp) = stackgap_alloc(&sg, sizeof tz);
-
- error = sys_gettimeofday(p, &a, retval);
-
- if (error == 0 && SCARG(uap, tp) != NULL) {
- error = copyin((caddr_t)SCARG(&a, tp),
- (caddr_t)&tv, sizeof tv);
- if (error == 0) {
- memset(&otv, 0, sizeof otv);
- otv.tv_sec = tv.tv_sec;
- otv.tv_usec = tv.tv_usec;
-
- error = copyout((caddr_t)&otv,
- (caddr_t)SCARG(uap, tp), sizeof otv);
- }
- }
- if (error == 0 && SCARG(uap, tzp) != NULL) {
- error = copyin((caddr_t)SCARG(&a, tzp),
- (caddr_t)&tz, sizeof tz);
- if (error == 0) {
- memset(&otz, 0, sizeof otz);
- otz.tz_minuteswest = tz.tz_minuteswest;
- otz.tz_dsttime = tz.tz_dsttime;
-
- error = copyout((caddr_t)&otz,
- (caddr_t)SCARG(uap, tzp), sizeof otz);
- }
- }
- return (error);
-}
-
-int
-osf1_sys_setitimer(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct osf1_sys_setitimer_args *uap = v;
- struct sys_setitimer_args a;
- struct osf1_itimerval o_itv, o_oitv;
- struct itimerval b_itv, b_oitv;
- caddr_t sg;
- int error;
-
- switch (SCARG(uap, which)) {
- case OSF1_ITIMER_REAL:
- SCARG(&a, which) = ITIMER_REAL;
- break;
-
- case OSF1_ITIMER_VIRTUAL:
- SCARG(&a, which) = ITIMER_VIRTUAL;
- break;
-
- case OSF1_ITIMER_PROF:
- SCARG(&a, which) = ITIMER_PROF;
- break;
-
- default:
- return (EINVAL);
- }
-
- sg = stackgap_init(p->p_emul);
-
- SCARG(&a, itv) = stackgap_alloc(&sg, sizeof b_itv);
-
- /* get the OSF/1 itimerval argument */
- error = copyin((caddr_t)SCARG(uap, itv), (caddr_t)&o_itv,
- sizeof o_itv);
- if (error == 0) {
-
- /* fill in and copy out the OpenBSD 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;
-
- error = copyout((caddr_t)&b_itv,
- (caddr_t)SCARG(&a, itv), sizeof b_itv);
- }
-
- if (SCARG(uap, oitv) == NULL)
- SCARG(&a, oitv) = NULL;
- else
- SCARG(&a, oitv) = stackgap_alloc(&sg, sizeof b_oitv);
-
- if (error == 0)
- error = sys_setitimer(p, &a, retval);
-
- if (error == 0 && SCARG(uap, oitv) != NULL) {
- /* get the OpenBSD itimerval return value */
- error = copyin((caddr_t)SCARG(&a, oitv), (caddr_t)&b_oitv,
- sizeof b_oitv);
- if (error == 0) {
-
- /* fill in and copy out the OpenBSD 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;
-
- error = copyout((caddr_t)&o_oitv,
- (caddr_t)SCARG(uap, oitv), sizeof o_oitv);
- }
- }
-
- return (error);
-}
-
-int
-osf1_sys_settimeofday(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct osf1_sys_settimeofday_args *uap = v;
- struct sys_settimeofday_args a;
- struct osf1_timeval otv;
- struct osf1_timezone otz;
- struct timeval tv;
- struct timezone tz;
- int error = 0;
- caddr_t sg;
-
- sg = stackgap_init(p->p_emul);
- if (SCARG(uap, tv) == NULL)
- SCARG(&a, tv) = NULL;
- else {
- SCARG(&a, tv) = stackgap_alloc(&sg, sizeof tv);
-
- /* get the OSF/1 timeval argument */
- error = copyin((caddr_t)SCARG(uap, tv),
- (caddr_t)&otv, sizeof otv);
- if (error == 0) {
-
- /* fill in and copy out the OpenBSD timeval */
- memset(&tv, 0, sizeof tv);
- tv.tv_sec = otv.tv_sec;
- tv.tv_usec = otv.tv_usec;
-
- error = copyout((caddr_t)&tv,
- (caddr_t)SCARG(&a, tv), sizeof tv);
- }
- }
-
- if (SCARG(uap, tzp) == NULL)
- SCARG(&a, tzp) = NULL;
- else {
- SCARG(&a, tzp) = stackgap_alloc(&sg, sizeof tz);
-
- /* get the OSF/1 timeval argument */
- error = copyin((caddr_t)SCARG(uap, tzp),
- (caddr_t)&otz, sizeof otz);
- if (error == 0) {
-
- /* fill in and copy out the OpenBSD timezone */
- memset(&tz, 0, sizeof tz);
- tz.tz_minuteswest = otz.tz_minuteswest;
- tz.tz_dsttime = otz.tz_dsttime;
-
- error = copyout((caddr_t)&tz,
- (caddr_t)SCARG(&a, tzp), sizeof tz);
- }
- }
-
- if (error == 0)
- error = sys_settimeofday(p, &a, retval);
-
- return (error);
-}
diff --git a/sys/compat/osf1/osf1_util.h b/sys/compat/osf1/osf1_util.h
deleted file mode 100644
index 1470b8b7a25..00000000000
--- a/sys/compat/osf1/osf1_util.h
+++ /dev/null
@@ -1,17 +0,0 @@
-/* $OpenBSD: osf1_util.h,v 1.3 2000/08/04 15:47:55 ericj Exp $ */
-/* $NetBSD: osf1_util.h,v 1.4 1999/04/23 05:55:13 cgd Exp $ */
-
-#ifndef _COMPAT_OSF1_OSF1_UTIL_H_
-#define _COMPAT_OSF1_OSF1_UTIL_H_
-
-#include <compat/common/compat_util.h>
-
-extern const char osf1_emul_path[];
-
-#define OSF1_CHECK_ALT_EXIST(p, sgp, path) \
- CHECK_ALT_EXIST(p, sgp, osf1_emul_path, path)
-
-#define OSF1_CHECK_ALT_CREAT(p, sgp, path) \
- CHECK_ALT_CREAT(p, sgp, osf1_emul_path, path)
-
-#endif /* _COMPAT_OSF1_OSF1_UTIL_H_ */
diff --git a/sys/compat/osf1/syscalls.conf b/sys/compat/osf1/syscalls.conf
deleted file mode 100644
index 51dfa388f60..00000000000
--- a/sys/compat/osf1/syscalls.conf
+++ /dev/null
@@ -1,13 +0,0 @@
-# $OpenBSD: syscalls.conf,v 1.3 2000/08/04 15:47:55 ericj Exp $
-# $NetBSD: syscalls.conf,v 1.1 1994/08/21 19:27:06 cgd 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_"
diff --git a/sys/compat/osf1/syscalls.master b/sys/compat/osf1/syscalls.master
deleted file mode 100644
index 7d9720f630e..00000000000
--- a/sys/compat/osf1/syscalls.master
+++ /dev/null
@@ -1,382 +0,0 @@
- $OpenBSD: syscalls.master,v 1.11 2008/01/05 00:36:13 miod Exp $
-; $NetBSD: syscalls.master,v 1.29 1999/05/10 03:33:04 cgd 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.
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/signal.h>
-#include <sys/mount.h>
-#include <sys/poll.h>
-#include <sys/syscallargs.h>
-
-#include <compat/osf1/osf1.h>
-#include <compat/osf1/osf1_syscallargs.h>
-
-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(char *path, int mode, \
- int dev); }
-15 NOARGS { int sys_chmod(const char *path, int mode); }
-16 NOARGS { int sys_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(void); }
-21 STD { int osf1_sys_mount(int type, const char *path, \
- int flags, caddr_t 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(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(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(u_int fd); }
-42 NOARGS { int sys_pipe(void); }
-43 STD { int osf1_sys_set_program_attributes( \
- caddr_t taddr, unsigned long tsize, \
- caddr_t daddr, unsigned long dsize); }
-44 UNIMPL profil
-45 STD { int osf1_sys_open(char *path, int flags, \
- int mode); }
-46 OBSOL sigaction
-47 NOARGS { gid_t sys_getgid(void); }
-; XXX
-48 NOARGS { int sys_sigprocmask(int how, sigset_t mask); }
-49 NOARGS { int sys_getlogin(char *namebuf, u_int namelen); }
-50 NOARGS { int sys_setlogin(const char *namebuf); }
-#ifdef ACCOUNTING
-51 NOARGS { int sys_acct(const char *path); }
-#else
-51 UNIMPL acct
-#endif
-52 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, caddr_t 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(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(char *path, \
- struct osf1_stat *ub); }
-68 STD { int osf1_sys_lstat(char *path, \
- struct osf1_stat *ub); }
-69 UNIMPL sbrk
-70 UNIMPL sstk
-71 STD { caddr_t osf1_sys_mmap(caddr_t addr, size_t len, \
- int prot, int flags, int fd, off_t pos); }
-72 OBSOL vadvise
-73 NOARGS { int sys_munmap(caddr_t 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 UNIMPL getitimer
-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(u_int from, u_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, caddr_t name, int namelen); }
-99 NOARGS { int compat_43_sys_accept(int s, caddr_t name, \
- int *anamelen); }
-100 NOARGS { int sys_getpriority(int which, int who); }
-101 NOARGS { int compat_43_sys_send(int s, caddr_t buf, int len, \
- int flags); }
-102 NOARGS { int compat_43_sys_recv(int s, caddr_t buf, int len, \
- int flags); }
-103 NOARGS { int sys_sigreturn(struct sigcontext *sigcntxp); }
-104 NOARGS { int sys_bind(int s, caddr_t name, int namelen); }
-105 NOARGS { int sys_setsockopt(int s, int level, int name, \
- caddr_t val, int valsize); }
-106 NOARGS { int sys_listen(int s, int backlog); }
-107 UNIMPL plock
-108 UNIMPL old sigvec
-109 UNIMPL old sigblock
-110 UNIMPL old sigsetmask
-111 NOARGS { int 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, \
- caddr_t 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_fchown(int fd, int uid, int gid); }
-124 NOARGS { int sys_fchmod(int fd, int mode); }
-125 NOARGS { int compat_43_sys_recvfrom(int s, caddr_t buf, \
- size_t len, int flags, caddr_t from, \
- int *fromlenaddr); }
-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_rename(const char *from, \
- const char *to); }
-129 STD { int osf1_sys_truncate(char *path, \
- off_t length); }
-130 STD { int osf1_sys_ftruncate(int fd, off_t length); }
-131 UNIMPL flock
-132 STD { int osf1_sys_setgid(gid_t gid); }
-133 STD { int osf1_sys_sendto(int s, caddr_t 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(char *path, \
- const struct osf1_timeval *tptr); }
-139 OBSOL 4.2 sigreturn
-140 UNIMPL adjtime
-141 NOARGS { int compat_43_sys_getpeername(int fdes, \
- caddr_t 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, \
- caddr_t 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 NOARGS { int compat_43_sys_getdirentries(int fd, char *buf, \
- u_int count, 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_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 UNIMPL
-225 UNIMPL
-226 UNIMPL
-227 UNIMPL
-228 UNIMPL
-229 UNIMPL
-230 UNIMPL
-231 UNIMPL
-232 UNIMPL
-233 UNIMPL getpgid
-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(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 UNIMPL getsysinfo
-257 STD { int osf1_sys_setsysinfo(u_long op, caddr_t buffer, \
- u_long nbytes, caddr_t arg, u_long flag); }
-258 UNIMPL afs_syscall
-259 UNIMPL swapctl
-260 UNIMPL memcntl
-261 UNIMPL fdatasync