summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Unangst <tedu@cvs.openbsd.org>2010-06-29 18:47:49 +0000
committerTed Unangst <tedu@cvs.openbsd.org>2010-06-29 18:47:49 +0000
commit6204d281f7ec7f2f2d69b359c6dbb6beb5215aac (patch)
treed53d3d5bf76e989669f3fb4dba4c7acf8b41a112
parent3a987c18732485ffb64f30fb7e92daae417968b6 (diff)
and the ultrix files go into the attic. ok deraadt miod
-rw-r--r--sys/compat/ultrix/Makefile7
-rw-r--r--sys/compat/ultrix/files.ultrix15
-rw-r--r--sys/compat/ultrix/syscalls.conf12
-rw-r--r--sys/compat/ultrix/syscalls.master364
-rw-r--r--sys/compat/ultrix/ultrix_fs.c445
-rw-r--r--sys/compat/ultrix/ultrix_ioctl.c783
-rw-r--r--sys/compat/ultrix/ultrix_misc.c600
-rw-r--r--sys/compat/ultrix/ultrix_pathname.c309
-rw-r--r--sys/compat/ultrix/ultrix_syscall.h420
-rw-r--r--sys/compat/ultrix/ultrix_syscallargs.h334
-rw-r--r--sys/compat/ultrix/ultrix_syscalls.c282
-rw-r--r--sys/compat/ultrix/ultrix_sysent.c554
-rw-r--r--sys/compat/ultrix/ultrix_tty.h50
-rw-r--r--sys/compat/ultrix/ultrix_util.h42
14 files changed, 0 insertions, 4217 deletions
diff --git a/sys/compat/ultrix/Makefile b/sys/compat/ultrix/Makefile
deleted file mode 100644
index 45e9e14a9d7..00000000000
--- a/sys/compat/ultrix/Makefile
+++ /dev/null
@@ -1,7 +0,0 @@
-# $OpenBSD: Makefile,v 1.2 2001/08/26 03:23:44 deraadt Exp $
-
-DEP= syscalls.conf syscalls.master ../../kern/makesyscalls.sh
-OBJS= ultrix_sysent.c ultrix_syscalls.c ultrix_syscall.h ultrix_syscallargs.h
-
-${OBJS}: ${DEP}
- sh ../../kern/makesyscalls.sh syscalls.conf syscalls.master
diff --git a/sys/compat/ultrix/files.ultrix b/sys/compat/ultrix/files.ultrix
deleted file mode 100644
index bf12eb5ee05..00000000000
--- a/sys/compat/ultrix/files.ultrix
+++ /dev/null
@@ -1,15 +0,0 @@
-# $OpenBSD: files.ultrix,v 1.5 1999/11/10 15:55:24 mickey Exp $
-# $NetBSD: files.ultrix,v 1.3 1996/01/07 13:38:49 jonathan Exp $
-#
-# Config file description for machine-independent Ultrix compat code.
-# Included by ports that need it.
-
-# ports should define any machine-specific files they need in their
-# own file lists.
-
-file compat/ultrix/ultrix_pathname.c compat_ultrix
-file compat/ultrix/ultrix_ioctl.c compat_ultrix
-file compat/ultrix/ultrix_misc.c compat_ultrix
-file compat/ultrix/ultrix_syscalls.c compat_ultrix & syscall_debug
-file compat/ultrix/ultrix_sysent.c compat_ultrix
-file compat/ultrix/ultrix_fs.c compat_ultrix
diff --git a/sys/compat/ultrix/syscalls.conf b/sys/compat/ultrix/syscalls.conf
deleted file mode 100644
index 9e5d5342863..00000000000
--- a/sys/compat/ultrix/syscalls.conf
+++ /dev/null
@@ -1,12 +0,0 @@
-# $OpenBSD: syscalls.conf,v 1.3 2001/05/16 05:02:20 millert Exp $
-# $NetBSD: syscalls.conf,v 1.1 1994/11/23 17:49:06 dean Exp $
-
-sysnames="ultrix_syscalls.c"
-sysnumhdr="ultrix_syscall.h"
-syssw="ultrix_sysent.c"
-sysarghdr="ultrix_syscallargs.h"
-libcompatopts=""
-
-switchname="ultrix_sysent"
-namesname="ultrix_syscallnames"
-constprefix="ULTRIX_SYS_"
diff --git a/sys/compat/ultrix/syscalls.master b/sys/compat/ultrix/syscalls.master
deleted file mode 100644
index 703cda506c0..00000000000
--- a/sys/compat/ultrix/syscalls.master
+++ /dev/null
@@ -1,364 +0,0 @@
- $OpenBSD: syscalls.master,v 1.12 2008/01/05 00:36:13 miod Exp $
-; $NetBSD: syscalls.master,v 1.15 1996/01/07 13:38:57 jonathan Exp $
-
-; @(#)syscalls.master 8.1 (Berkeley) 7/19/93
-
-; OpenBSD COMPAT_ULTRIX system call name/number "master" file.
-; (See syscalls.conf to see what it is processed into.)
-;
-; Fields: number type [type-dependent ...]
-; number system call number, must be in order
-; type one of STD, OBSOL, UNIMPL, NODEF, NOARGS, or one of
-; the compatibility options defined in syscalls.conf.
-;
-; types:
-; STD always included
-; OBSOL obsolete, not included in system
-; UNIMPL unimplemented, not included in system
-; NODEF included, but don't define the syscall number
-; NOARGS included, but don't define the syscall args structure
-;
-; The compat options are defined in the syscalls.conf file, and the
-; compat option name is prefixed to the syscall name. Other than
-; that, they're like NODEF (for 'compat' options), or STD (for
-; 'libcompat' options).
-;
-; The type-dependent arguments are as follows:
-; For STD, NODEF, NOARGS, and compat syscalls:
-; { pseudo-proto } [alias]
-; For other syscalls:
-; [comment]
-;
-; #ifdef's, etc. may be included, and are copied to the output files.
-; #include's are copied to the syscall switch definition file only.
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/signal.h>
-#include <sys/mount.h>
-#include <sys/syscallargs.h>
-#include <compat/ultrix/ultrix_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, char *buf, u_int nbyte); }
-5 STD { int ultrix_sys_open(char *path, int flags, \
- int mode); }
-6 NOARGS { int sys_close(int fd); }
-7 NOARGS { int compat_43_sys_wait(void); } owait
-8 STD { int ultrix_sys_creat(char *path, int mode); }
-9 NOARGS { int sys_link(char *path, char *link); }
-10 NOARGS { int sys_unlink(char *path); }
-11 STD { int ultrix_sys_execv(char *path, char **argp); }
-12 NOARGS { int sys_chdir(char *path); }
-13 OBSOL time
-14 STD { int ultrix_sys_mknod(char *path, int mode, int dev); }
-15 NOARGS { int sys_chmod(char *path, int mode); }
-16 NOARGS { int sys_lchown(char *path, int uid, int gid); }
-17 NOARGS { int sys_obreak(char *nsize); } break
-18 OBSOL stat
-19 NOARGS { long compat_43_sys_lseek(int fd, long offset, \
- int whence); }
-20 NOARGS { pid_t sys_getpid(void); }
-21 STD { int ultrix_sys_mount(char *special, char *dir, \
- int rdonly, int type, caddr_t data); }
-22 OBSOL sysV_unmount
-23 NOARGS { int sys_setuid(uid_t uid); }
-24 NOARGS { uid_t sys_getuid(void); }
-25 OBSOL v7 stime
-26 OBSOL v7 ptrace
-27 OBSOL v7 alarm
-28 OBSOL v7 fstat
-29 OBSOL v7 pause
-30 OBSOL v7 utime
-31 OBSOL v7 stty
-32 OBSOL v7 gtty
-33 STD { int ultrix_sys_access(char *path, int flags); }
-34 OBSOL v7 nice
-35 OBSOL v7 ftime
-36 NOARGS { int sys_sync(void); }
-37 NOARGS { int sys_kill(int pid, int signum); }
-38 STD { int ultrix_sys_stat(char *path, \
- struct stat43 *ub); } stat43
-39 OBSOL v7 setpgrp
-40 STD { int ultrix_sys_lstat(char *path, \
- struct stat43 *ub); } olstat
-41 NOARGS { int sys_dup(u_int fd); }
-42 NOARGS { int sys_opipe(void); }
-43 OBSOL v7 times
-44 NOARGS { int sys_profil(caddr_t samples, u_int size, \
- u_int offset, u_int scale); }
-45 UNIMPL
-46 OBSOL v7 setgid
-47 NOARGS { gid_t sys_getgid(void); }
-48 UNIMPL ssig
-49 UNIMPL reserved for USG
-50 UNIMPL reserved for USG
-#ifdef ACCOUNTING
-51 NOARGS { int sys_acct(char *path); }
-#else
-51 UNIMPL acct
-#endif
-52 UNIMPL
-53 UNIMPL syslock
-54 STD { int ultrix_sys_ioctl(int fd, u_long com, caddr_t data); }
-55 NOARGS { int sys_reboot(int opt); }
-56 UNIMPL v7 mpxchan
-57 NOARGS { int sys_symlink(char *path, char *link); }
-58 NOARGS { int sys_readlink(char *path, char *buf, int count); }
-59 STD { int ultrix_sys_execve(char *path, char **argp, \
- char **envp); }
-60 NOARGS { int sys_umask(int newmask); }
-61 NOARGS { int sys_chroot(char *path); }
-62 NOARGS { int compat_43_sys_fstat(int fd, struct stat43 *sb); }
-63 UNIMPL
-64 NOARGS { int compat_43_sys_getpagesize(void); }
-65 UNIMPL mremap
-66 NOARGS { int sys_vfork(void); }
-67 OBSOL vread
-68 OBSOL vwrite
-69 NOARGS { int sys_sbrk(int incr); }
-70 NOARGS { int sys_sstk(int incr); }
-71 STD { int ultrix_sys_mmap(caddr_t addr, size_t len, \
- int prot, u_int flags, int fd, long pos); }
-72 OBSOL vadvise
-73 NOARGS { int sys_munmap(caddr_t addr, size_t len); }
-74 NOARGS { int sys_mprotect(caddr_t addr, size_t len, \
- int prot); }
-75 NOARGS { int sys_madvise(caddr_t addr, size_t len, \
- int behav); }
-76 STD { int ultrix_sys_vhangup(void); }
-77 UNIMPL old vlimit
-78 NOARGS { int sys_mincore(caddr_t addr, int len, char *vec); }
-79 NOARGS { int sys_getgroups(u_int gidsetsize, gid_t *gidset); }
-80 NOARGS { int sys_setgroups(u_int gidsetsize, gid_t *gidset); }
-81 NOARGS { int sys_getpgrp(void); }
-82 STD { int ultrix_sys_setpgrp(int pid, int pgid); }
-83 NOARGS { int sys_setitimer(u_int which, \
- struct itimerval *itv, struct itimerval *oitv); }
-84 STD { int ultrix_sys_wait3(int *status, int options, \
- struct rusage *rusage);}
-85 NOARGS { int compat_25_sys_swapon(char *name); }
-86 NOARGS { int sys_getitimer(u_int which, \
- struct itimerval *itv); }
-87 NOARGS { int compat_43_sys_gethostname(char *hostname, \
- u_int len); }
-88 NOARGS { int compat_43_sys_sethostname(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 UNIMPL getdopt
-92 NOARGS { int sys_fcntl(int fd, int cmd, void *arg); }
-93 STD { int ultrix_sys_select(u_int nd, fd_set *in, fd_set *ou, \
- fd_set *ex, struct timeval *tv); }
-94 UNIMPL setdopt
-95 NOARGS { int sys_fsync(int fd); }
-96 NOARGS { int sys_setpriority(int which, int who, int prio); }
-97 NOARGS { int sys_socket(int domain, int type, int protocol); }
-98 NOARGS { int sys_connect(int s, caddr_t name, int namelen); }
-99 NOARGS { int compat_43_sys_accept(int s, caddr_t name, \
- int *anamelen); }
-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 STD { int ultrix_sys_setsockopt(int s, int level, \
- int name, caddr_t val, int valsize); }
-106 NOARGS { int sys_listen(int s, int backlog); }
-107 UNIMPL vtimes
-108 NOARGS { int compat_43_sys_sigvec(int signum, \
- struct sigvec *nsv, struct sigvec *osv); }
-109 NOARGS { int compat_43_sys_sigblock(int mask); }
-110 NOARGS { int compat_43_sys_sigsetmask(int mask); }
-111 NOARGS { int sys_sigsuspend(int mask); }
-112 NOARGS { int compat_43_sys_sigstack(struct sigstack *nss, \
- struct sigstack *oss); }
-113 NOARGS { int compat_43_sys_recvmsg(int s, \
- struct omsghdr *msg, int flags); }
-114 NOARGS { int compat_43_sys_sendmsg(int s, caddr_t msg, \
- int flags); }
-115 OBSOL vtrace
-116 NOARGS { int sys_gettimeofday(struct timeval *tp, \
- struct timezone *tzp); }
-117 NOARGS { int sys_getrusage(int who, struct rusage *rusage); }
-118 NOARGS { int sys_getsockopt(int s, int level, int name, \
- caddr_t val, int *avalsize); }
-119 UNIMPL resuba
-120 NOARGS { int sys_readv(int fd, struct iovec *iovp, \
- u_int iovcnt); }
-121 NOARGS { int sys_writev(int fd, struct iovec *iovp, \
- u_int iovcnt); }
-122 NOARGS { int sys_settimeofday(struct timeval *tv, \
- struct timezone *tzp); }
-123 NOARGS { int sys_fchown(int fd, int uid, int gid); }
-124 NOARGS { int sys_fchmod(int fd, int mode); }
-125 NOARGS { int compat_43_sys_recvfrom(int s, caddr_t buf, \
- size_t len, int flags, caddr_t from, \
- int *fromlenaddr); }
-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(char *from, char *to); }
-129 NOARGS { int compat_43_sys_truncate(char *path, long length); }
-130 NOARGS { int compat_43_sys_ftruncate(int fd, long length); }
-131 NOARGS { int sys_flock(int fd, int how); }
-132 UNIMPL
-133 NOARGS { int sys_sendto(int s, caddr_t buf, size_t len, \
- int flags, caddr_t to, int tolen); }
-134 NOARGS { int sys_shutdown(int s, int how); }
-135 NOARGS { int sys_socketpair(int domain, int type, \
- int protocol, int *rsv); }
-136 NOARGS { int sys_mkdir(char *path, int mode); }
-137 NOARGS { int sys_rmdir(char *path); }
-138 NOARGS { int sys_utimes(char *path, struct timeval *tptr); }
-139 STD { int ultrix_sys_sigcleanup(struct sigcontext *sigcntxp); }
-140 NOARGS { int sys_adjtime(struct timeval *delta, \
- struct timeval *olddelta); }
-141 NOARGS { int compat_43_sys_getpeername(int fdes, caddr_t asa, \
- int *alen); }
-142 NOARGS { int compat_43_sys_gethostid(void); }
-143 UNIMPL old sethostid
-144 NOARGS { int compat_43_sys_getrlimit(u_int which, \
- struct orlimit *rlp); }
-145 NOARGS { int compat_43_sys_setrlimit(u_int which, \
- struct orlimit *rlp); }
-146 NOARGS { int compat_43_sys_killpg(int pgid, int signum); }
-147 UNIMPL
-148 UNIMPL setquota
-149 UNIMPL quota /* needs to be nullop to boot on Ultrix root partition*/
-150 NOARGS { int compat_43_sys_getsockname(int fdes, caddr_t asa, \
- int *alen); }
-151 UNIMPL sysmips /* 4 args */
-152 UNIMPL cacheflush /* 4 args */
-153 UNIMPL cachectl /* 3 args */
-154 UNIMPL
-155 UNIMPL atomic_op
-156 UNIMPL
-157 UNIMPL
-#ifdef NFSSERVER
-158 STD { int ultrix_sys_nfssvc(int fd); }
-#else
-158 UNIMPL
-#endif
-159 NOARGS { int compat_43_sys_getdirentries(int fd, char *buf, \
- u_int count, long *basep); }
-160 STD { int ultrix_sys_statfs(char *path, \
- struct ultrix_statfs *buf); }
-161 STD { int ultrix_sys_fstatfs(int fd, \
- struct ultrix_statfs *buf); }
-162 UNIMPL umount
-#ifdef NFSCLIENT
-163 NOARGS { int async_daemon(void); }
-164 NOARGS { int sys_getfh(char *fname, fhandle_t *fhp); }
-#else
-163 UNIMPL async_daemon
-164 UNIMPL getfh
-#endif
-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 STD { int ultrix_sys_quotactl(int cmd, char *special, \
- int uid, caddr_t addr); }
-169 STD { int ultrix_sys_exportfs(char *path, char *ex); }
-170 UNIMPL { int ultrix_sys_mount(char *special, char *dir, \
- int rdonly, int type, caddr_t data); }
-171 UNIMPL 4 hdwconf
-172 UNIMPL msgctl
-173 UNIMPL msgget
-174 UNIMPL msgrcv
-175 UNIMPL msgsnd
-176 UNIMPL semctl
-177 UNIMPL semget
-178 UNIMPL semop
-179 STD { int ultrix_sys_uname(struct ultrix_utsname *name); }
-180 UNIMPL shmsys
-181 UNIMPL 0 plock
-182 UNIMPL 0 lockf
-183 STD { int ultrix_sys_ustat(int dev, \
- struct ultrix_ustat *buf); }
-184 STD { int ultrix_sys_getmnt(int *start, \
- struct ultrix_fs_data *buf, \
- int bufsize, int mode, char *path); }
-185 UNIMPL notdef
-186 UNIMPL notdef
-187 STD { int ultrix_sys_sigpending(int *mask); }
-188 NOARGS { int sys_setsid(void); }
-189 STD { int ultrix_sys_waitpid(int pid, int *status, \
- int options); }
-190 UNIMPL
-191 UNIMPL
-192 UNIMPL
-193 UNIMPL
-194 UNIMPL
-195 UNIMPL
-196 UNIMPL
-197 UNIMPL
-198 UNIMPL
-199 UNIMPL
-200 UNIMPL
-201 UNIMPL
-202 UNIMPL
-203 UNIMPL
-204 UNIMPL
-205 UNIMPL
-206 UNIMPL
-207 UNIMPL
-208 UNIMPL
-209 UNIMPL
-210 UNIMPL
-211 UNIMPL
-212 UNIMPL
-213 UNIMPL
-214 UNIMPL
-215 UNIMPL
-216 UNIMPL
-217 UNIMPL
-218 UNIMPL
-219 UNIMPL
-220 UNIMPL
-221 UNIMPL
-222 UNIMPL
-223 UNIMPL
-224 UNIMPL
-225 UNIMPL
-226 UNIMPL
-227 UNIMPL
-228 UNIMPL
-229 UNIMPL
-230 UNIMPL
-231 UNIMPL
-232 UNIMPL
-233 UNIMPL 1 utc_gettime
-234 UNIMPL 2 utc_adjtime
-235 UNIMPL
-236 UNIMPL
-237 UNIMPL
-238 UNIMPL
-239 UNIMPL
-240 UNIMPL
-241 UNIMPL
-242 UNIMPL
-243 UNIMPL
-244 UNIMPL
-245 UNIMPL
-246 UNIMPL
-247 UNIMPL
-248 UNIMPL
-249 UNIMPL
-250 UNIMPL
-251 UNIMPL
-252 UNIMPL audctl /*Make no-op for installation on Ultrix rootpartition?*/
-253 UNIMPL audgen /*Make no-op for installation on Ultrix rootpartition?*/
-254 UNIMPL startcpu
-255 UNIMPL stopcpu
-256 STD { int ultrix_sys_getsysinfo(unsigned op, char *buffer, \
- unsigned nbytes, int *start, char *arg); }
-257 STD { int ultrix_sys_setsysinfo(unsigned op, char *buffer, \
- unsigned nbytes, unsigned arg, unsigned flag); }
-
diff --git a/sys/compat/ultrix/ultrix_fs.c b/sys/compat/ultrix/ultrix_fs.c
deleted file mode 100644
index 041306217fe..00000000000
--- a/sys/compat/ultrix/ultrix_fs.c
+++ /dev/null
@@ -1,445 +0,0 @@
-/* $OpenBSD: ultrix_fs.c,v 1.15 2007/10/30 12:09:22 gilles Exp $ */
-/* $NetBSD: ultrix_fs.c,v 1.4 1996/04/07 17:23:06 jonathan Exp $ */
-
-/*
- * Copyright (c) 1995
- * Jonathan Stone (hereinafter referred to as the author)
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/malloc.h>
-#include <sys/exec.h>
-#include <sys/namei.h>
-#include <sys/mount.h>
-#include <net/if.h>
-#include <netinet/in.h>
-
-#include <nfs/rpcv2.h>
-#include <nfs/nfsproto.h>
-#include <nfs/nfs.h>
-
-#include <sys/syscallargs.h>
-#include <compat/ultrix/ultrix_syscallargs.h>
-
-#include <uvm/uvm_extern.h>
-
-#define ULTRIX_MAXPATHLEN 1024
-
-/**
- ** Ultrix filesystem operations: mount(), getmnt().
- ** These are included purely so one can place an (ECOFF or ELF)
- ** NetBSD/pmax kernel in an Ultrix root filesystem, boot it,
- ** and over-write the Ultrix root parition with NetBSD binaries.
- **/
-
-/*
- * Ultrix file system data structure, as modified by
- * Ultrix getmntent(). This structure is padded to 2560 bytes, for
- * compatibility with the size the Ultrix kernel and user apps expect.
- */
-struct ultrix_fs_data {
- u_int32_t ufsd_flags; /* how mounted */
- u_int32_t ufsd_mtsize; /* max transfer size in bytes */
- u_int32_t ufsd_otsize; /* optimal transfer size in bytes */
- u_int32_t ufsd_bsize; /* fs block size (bytes) for vm code */
- u_int32_t ufsd_fstype; /* see ../h/fs_types.h */
- u_int32_t ufsd_gtot; /* total number of gnodes */
- u_int32_t ufsd_gfree; /* # of free gnodes */
- u_int32_t ufsd_btot; /* total number of 1K blocks */
- u_int32_t ufsd_bfree; /* # of free 1K blocks */
- u_int32_t ufsd_bfreen; /* user consumable 1K blocks */
- u_int32_t ufsd_pgthresh; /* min size in bytes before paging*/
- int32_t ufsd_uid; /* uid that mounted me */
- int16_t ufsd_dev; /* major/minor of fs */
- int16_t ufsd_exroot; /* root mapping from exports */
- char ufsd_devname[ULTRIX_MAXPATHLEN + 4]; /* name of dev */
- char ufsd_path[ULTRIX_MAXPATHLEN + 4]; /* name of mnt point */
- u_int32_t ufsd_nupdate; /* number of writes */
- u_int32_t ufsd_pad[112]; /* pad to 2560 bytes. */
-};
-
-/*
- * Get statistics on mounted filesystems.
- */
-#if 0
-struct ultrix_getmnt_args {
- int32_t *start;
- struct ultrix_fs_data *buf;
- int32_t bufsize;
- int32_t mode;
- char *path;
-};
-
-#endif
-/*
- * Ultrix getmnt() flags.
- * The operation getmnt() should perform is incoded in the flag
- * argument. There are two independent attributes.
- *
- * ULTRIX_NOSTAT_xxx will never hang, but it may not return
- * up-to-date statistics. (For NFS clients, it returns whatever is
- * in the cache.) ULTRIX_STAT_xxx returns up-to-date info but may
- * hang (e.g., on dead NFS servers).
- *
- * ULTRIX_xxSTAT_ONE returns statistics on just one filesystem, determined
- * by the parth argument. ULTRIX_xxSTAT_MANY ignores the path argument and
- * returns info on as many filesystems fit in the structure.
- * the start argument, which should be zero on the first call,
- * can be used to iterate over all filesystems.
- *
- */
-#define ULTRIX_NOSTAT_MANY 1
-#define ULTRIX_STAT_MANY 2
-#define ULTRIX_STAT_ONE 3
-#define ULTRIX_NOSTAT_ONE 4
-
-/*
- * Ultrix gnode-layer filesystem codes.
- */
-#define ULTRIX_FSTYPE_UNKNOWN 0x0
-#define ULTRIX_FSTYPE_ULTRIX 0x1 /* Ultrix UFS: basically 4.2bsd FFS */
-#define ULTRIX_FSTYPE_NFS 0x5 /* NFS v2 */
-
-/*
- * Ultrix mount(2) options
- */
-#define ULTRIX_NM_RONLY 0x0001 /* mount read-only */
-#define ULTRIX_NM_SOFT 0x0002 /* soft mount (hard is default) */
-#define ULTRIX_NM_WSIZE 0x0004 /* set write size */
-#define ULTRIX_NM_RSIZE 0x0008 /* set read size */
-#define ULTRIX_NM_TIMEO 0x0010 /* set initial timeout */
-#define ULTRIX_NM_RETRANS 0x0020 /* set number of request retries */
-#define ULTRIX_NM_HOSTNAME 0x0040 /* set hostname for error printf */
-#define ULTRIX_NM_PGTHRESH 0x0080 /* set page threshold for exec */
-#define ULTRIX_NM_INT 0x0100 /* allow hard mount keyboard interrupts */
-#define ULTRIX_NM_NOAC 0x0200 /* don't cache attributes */
-
-
-/*
- * Construct an Ultrix getmnt() ultrix_fs_data from the native NetBSD
- * struct statfs.
- */
-static void
-make_ultrix_mntent(sp, tem)
- register struct statfs *sp;
- register struct ultrix_fs_data *tem;
-{
-
- bzero(tem, sizeof (*tem));
-
- tem->ufsd_flags = sp->f_flags; /* XXX translate */
- tem->ufsd_mtsize = sp->f_bsize; /* XXX max transfer size */
- tem->ufsd_otsize = sp->f_iosize;
- tem->ufsd_bsize = sp->f_bsize;
- /*
- * Translate file system type. NetBSD/1.1 has f_type zero,
- * and uses an fstype string instead.
- * For now, map types not in Ultrix (kernfs, null, procfs...)
- * to UFS, since Ultrix mout will try and call mount_unknown
- * for ULTRIX_FSTYPE_UNKNOWN, but lacks a mount_unknown binary.
- */
- tem->ufsd_fstype = ULTRIX_FSTYPE_NFS;
- if (strcmp(sp->f_fstypename, "ffs") == 0)
- tem->ufsd_fstype = ULTRIX_FSTYPE_ULTRIX;
-
- tem->ufsd_gtot = sp->f_files; /* total "gnodes" */
- tem->ufsd_gfree = sp->f_ffree; /* free "gnodes" */
- tem->ufsd_btot = sp->f_blocks; /* total 1k blocks */
-#ifdef needsmorethought /* XXX */
- /* tem->ufsd_bfree = sp->f_bfree; */ /* free 1k blocks */
- /* tem->ufsd_bfree = sp->f_bavail; */ /* free 1k blocks */
-#endif
-
- tem->ufsd_bfreen = sp->f_bavail; /* blocks available to users */
- tem->ufsd_pgthresh = 0; /* not relevant */
- tem->ufsd_uid = 0; /* XXX kept where ?*/
- tem->ufsd_dev = 0; /* ?? */
- tem->ufsd_exroot = 0; /* ?? */
- strlcpy(tem->ufsd_path, sp->f_mntonname, sizeof(tem->ufsd_path));
- strlcpy(tem->ufsd_devname, sp->f_mntfromname,
- sizeof(tem->ufsd_devname));
-#if 0
- /* In NetBSD-1.1, filesystem type is unused and always 0 */
- printf("mntent: %s type %d\n", tem->ufsd_devname, tem->ufsd_fstype);
- printf("mntent: %s tot %d free %d user%d\n",
- tem->ufsd_devname, sp->f_blocks, sp->f_bfree, sp->f_bavail);
-#endif
-}
-
-int
-ultrix_sys_getmnt(p, v, retval)
- struct proc *p;
- void *v;
- int *retval;
-{
- struct ultrix_sys_getmnt_args *uap = v;
- struct mount *mp, *nmp;
- struct statfs *sp;
- struct ultrix_fs_data *sfsp;
- char *path;
- int mntflags;
- int skip;
- int start;
- long count, maxcount;
- int error = 0;
-
- path = NULL;
- error = 0;
- maxcount = SCARG(uap, bufsize) / sizeof(struct ultrix_fs_data);
- sfsp = SCARG(uap, buf);
-
- if (SCARG(uap, mode) == ULTRIX_STAT_ONE ||
- SCARG(uap, mode) == ULTRIX_STAT_MANY)
- mntflags = MNT_WAIT;
- else
- mntflags = MNT_NOWAIT;
-
- if (SCARG(uap, mode) == ULTRIX_STAT_ONE || SCARG(uap, mode) == ULTRIX_NOSTAT_ONE) {
- /*
- * Only get info on mountpoints that matches the path
- * provided.
- */
- path = malloc(MAXPATHLEN, M_TEMP, M_WAITOK);
- if ((error = copyinstr(SCARG(uap, path), path,
- MAXPATHLEN, NULL)) != 0)
- goto bad;
- maxcount = 1;
- } else {
- /*
- * Get info on any mountpoints, somewhat like readdir().
- * Find out how many mount list entries to skip, and skip
- * them.
- */
- if ((error = copyin((caddr_t)SCARG(uap, start), &start,
- sizeof(*SCARG(uap, start)))) != 0)
- goto bad;
- for (skip = start, mp = CIRCLEQ_FIRST(&mountlist);
- mp != CIRCLEQ_END(&mountlist) && skip-- > 0; mp = nmp)
- nmp = CIRCLEQ_NEXT(mp, mnt_list);
- }
-
- for (count = 0, mp = CIRCLEQ_FIRST(&mountlist);
- mp != CIRCLEQ_END(&mountlist) && count < maxcount; mp = nmp) {
- nmp = CIRCLEQ_NEXT(mp, mnt_list);
- if (sfsp != NULL) {
- struct ultrix_fs_data tem;
- sp = &mp->mnt_stat;
-
- /*
- * If requested, refresh the fsstat cache.
- */
- if ((mntflags & MNT_WAIT) != 0 &&
- (error = VFS_STATFS(mp, sp, p)) != 0)
- continue;
-
- /*
- * XXX what does this do? -- cgd
- */
- sp->f_flags = mp->mnt_flag & MNT_VISFLAGMASK;
- if (path == NULL ||
- strcmp(path, sp->f_mntonname) == 0) {
- make_ultrix_mntent(sp, &tem);
- if ((error = copyout((caddr_t)&tem, sfsp,
- sizeof(tem))) != 0)
- goto bad;
- sfsp++;
- count++;
- }
- }
- }
-
- if (sfsp != NULL && count > maxcount)
- *retval = maxcount;
- else
- *retval = count;
-
-bad:
- if (path)
- free(path, M_TEMP);
- return (error);
-}
-
-
-
-/* Old-style inet sockaddr (no len field) as passed to Ultrix mount(2) */
-struct osockaddr_in {
- short sin_family;
- u_short sin_port;
- struct in_addr sin_addr;
- char sin_zero[8];
-};
-
-
-/*
- * fstype-dependent structure passed to Ultrix mount(2) when
- * mounting NFS filesystems
- */
-struct ultrix_nfs_args {
- struct osockaddr_in *addr; /* file server address */
- void *fh; /* file handle to be mounted */
- int flags; /* flags */
- int wsize; /* write size in bytes */
- int rsize; /* read size in bytes */
- int timeo; /* initial timeout in .1 secs */
- int retrans; /* times to retry send */
- char *hostname; /* server's hostname */
- char *optstr; /* string of nfs mount options*/
- int gfs_flags; /* gnode flags (ugh) */
- int pg_thresh; /* paging threshold ? */
-};
-
-
-/*
- * fstype-dependent structure passed to Ultrix mount(2) when
- * mounting local (4.2bsd FFS) filesystems
- */
-struct ultrix_ufs_args {
- u_long ufs_flags; /* mount flags?*/
- u_long ufs_pgthresh; /* minimum file size to page */
-};
-
-int
-ultrix_sys_mount(p, v, retval)
- struct proc *p;
- void *v;
- int *retval;
-{
- struct ultrix_sys_mount_args *uap = v;
-
- int error;
- int otype = SCARG(uap, type);
- char fsname[MFSNAMELEN];
- char * fstype;
- struct sys_mount_args nuap;
- caddr_t sg = stackgap_init(p->p_emul);
- caddr_t usp = stackgap_alloc(&sg, 1024 /* XXX */);
-
- bzero(&nuap, sizeof(nuap));
- SCARG(&nuap, flags) = 0;
-
- /*
- * Translate Ultrix integer mount codes for UFS and NFS to
- * NetBSD fstype strings. Other Ultrix filesystem types
- * (msdos, DEC ods-2) are not supported.
- */
- if (otype == ULTRIX_FSTYPE_ULTRIX)
- fstype = "ufs";
- else if (otype == ULTRIX_FSTYPE_NFS)
- fstype = "nfs";
- else
- return (EINVAL);
-
- /* Translate the Ultrix mount-readonly option parameter */
- if (SCARG(uap, rdonly))
- SCARG(&nuap, flags) |= MNT_RDONLY;
-
- /* Copy string-ified version of mount type back out to user space */
- SCARG(&nuap, type) = (char *)usp;
- if ((error = copyout(fstype, (void *)SCARG(&nuap, type),
- strlen(fstype)+1)) != 0) {
- return (error);
- }
- usp += strlen(fstype)+1;
-
-#ifdef later
- parse ultrix mount option string and set NetBSD flags
-#endif
- SCARG(&nuap, path) = SCARG(uap, dir);
-
- if (otype == ULTRIX_FSTYPE_ULTRIX) {
- /* attempt to mount a native, rather than 4.2bsd, ffs */
- struct ufs_args ua;
-
- ua.fspec = SCARG(uap, special);
- bzero(&ua.export_info, sizeof(ua.export_info));
- SCARG(&nuap, data) = usp;
-
- if ((error = copyout(&ua, SCARG(&nuap, data),
- sizeof ua)) !=0) {
- return(error);
- }
- /*
- * Ultrix mount has no MNT_UPDATE flag.
- * Attempt to see if this is the root we're mounting,
- * and if so, set MNT_UPDATE so we can mount / read-write.
- */
- fsname[0] = 0;
- if ((error = copyinstr((caddr_t)SCARG(&nuap, path), fsname,
- sizeof fsname, (u_int *)0)) != 0)
- return(error);
- if (strcmp(fsname, "/") == 0) {
- SCARG(&nuap, flags) |= MNT_UPDATE;
- printf("COMPAT_ULTRIX: mount with MNT_UPDATE on %s\n",
- fsname);
- }
- } else if (otype == ULTRIX_FSTYPE_NFS) {
- struct ultrix_nfs_args una;
- struct nfs_args na;
- struct osockaddr_in osa;
- struct sockaddr_in *sap = (struct sockaddr_in *)& osa;
-
- bzero(&osa, sizeof(osa));
- bzero(&una, sizeof(una));
- if ((error = copyin(SCARG(uap, data), &una, sizeof una)) !=0) {
- return (error);
- }
- /*
- * This is the only syscall boundary the
- * address of the server passes, so do backwards
- * compatibility on 4.3style sockaddrs here.
- */
- if ((error = copyin(una.addr, &osa, sizeof osa)) != 0) {
- printf("ultrix_mount: nfs copyin osa\n");
- return (error);
- }
- sap->sin_family = (u_char)osa.sin_family;
- sap->sin_len = sizeof(*sap);
- /* allocate space above caller's stack for nfs_args */
- SCARG(&nuap, data) = usp;
- usp += sizeof (na);
- /* allocate space above caller's stack for server sockaddr */
- na.version = NFS_ARGSVERSION;
- na.addr = (struct sockaddr *)usp;
- usp += sizeof(*sap);
- na.addrlen = sap->sin_len;
- na.sotype = SOCK_DGRAM;
- na.proto = IPPROTO_UDP;
- na.fh = una.fh;
- na.fhsize = NFSX_V2FH;
- na.flags = /*una.flags;*/ NFSMNT_NOCONN;
- na.wsize = una.wsize;
- na.rsize = una.rsize;
- na.timeo = una.timeo;
- na.retrans = una.retrans;
- na.hostname = una.hostname;
- if ((error = copyout(sap, na.addr, sizeof (*sap) )) != 0)
- return (error);
- if ((error = copyout(&na, SCARG(&nuap, data), sizeof na)) != 0)
- return (error);
- }
- return (sys_mount(p, &nuap, retval));
-}
diff --git a/sys/compat/ultrix/ultrix_ioctl.c b/sys/compat/ultrix/ultrix_ioctl.c
deleted file mode 100644
index cd719ea24e5..00000000000
--- a/sys/compat/ultrix/ultrix_ioctl.c
+++ /dev/null
@@ -1,783 +0,0 @@
-/* $OpenBSD: ultrix_ioctl.c,v 1.11 2004/09/19 21:34:43 mickey Exp $ */
-/* $NetBSD: ultrix_ioctl.c,v 1.3.4.1 1996/06/13 18:22:37 jonathan Exp $ */
-/* from : NetBSD: sunos_ioctl.c,v 1.21 1995/10/07 06:27:31 mycroft Exp */
-
-/*
- * Copyright (c) 1993 Markus Wild.
- * 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. 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.
- *
- * loosely from: Header: sunos_ioctl.c,v 1.7 93/05/28 04:40:43 torek Exp
- */
-
-#include <sys/param.h>
-#include <sys/proc.h>
-#include <sys/systm.h>
-#include <sys/file.h>
-#include <sys/filedesc.h>
-#include <sys/ioctl.h>
-#include <sys/termios.h>
-#include <sys/tty.h>
-#include <sys/socket.h>
-#include <sys/audioio.h>
-#include <net/if.h>
-
-#include <sys/mount.h>
-
-#include <compat/ultrix/ultrix_syscallargs.h>
-#include <sys/syscallargs.h>
-
-#include <compat/sunos/sunos.h>
-
-#include "ultrix_tty.h"
-
-#define emul_termio ultrix_termio
-#define emul_termios ultrix_termios
-
-/*
- * SunOS ioctl calls.
- * This file is something of a hodge-podge.
- * Support gets added as things turn up....
- */
-
-static const struct speedtab sptab[] = {
- { 0, 0 },
- { 50, 1 },
- { 75, 2 },
- { 110, 3 },
- { 134, 4 },
- { 135, 4 },
- { 150, 5 },
- { 200, 6 },
- { 300, 7 },
- { 600, 8 },
- { 1200, 9 },
- { 1800, 10 },
- { 2400, 11 },
- { 4800, 12 },
- { 9600, 13 },
- { 19200, 14 },
- { 38400, 15 },
- { -1, -1 }
-};
-
-static const u_long s2btab[] = {
- 0,
- 50,
- 75,
- 110,
- 134,
- 150,
- 200,
- 300,
- 600,
- 1200,
- 1800,
- 2400,
- 4800,
- 9600,
- 19200,
- 38400,
-};
-
-
-/*
- * Translate a single tty control char from the emulation value
- * to native termios, and vice-versa. Special-case
- * the value of POSIX_VDISABLE, mapping it to and from 0.
- */
-#define NATIVE_TO_EMUL_CC(bsd_cc) \
- (((bsd_cc) != _POSIX_VDISABLE) ? (bsd_cc) : 0)
-
-#define EMUL_TO_NATIVE_CC(emul_cc) \
- (emul_cc) ? (emul_cc) : _POSIX_VDISABLE;
-
-
-
-/*
- * these two conversion functions have mostly been done
- * with some perl cut&paste, then handedited to comment
- * out what doesn't exist under NetBSD.
- * A note from Markus's code:
- * (l & BITMASK1) / BITMASK1 * BITMASK2 is translated
- * optimally by gcc m68k, much better than any ?: stuff.
- * Code may vary with different architectures of course.
- *
- * I don't know what optimizer you used, but seeing divu's and
- * bfextu's in the m68k assembly output did not encourage me...
- * as well, gcc on the sparc definately generates much better
- * code with ?:.
- */
-
-
-static void
-stios2btios(st, bt)
- struct emul_termios *st;
- struct termios *bt;
-{
- register u_long l, r;
-
- l = st->c_iflag;
- r = ((l & 0x00000001) ? IGNBRK : 0);
- r |= ((l & 0x00000002) ? BRKINT : 0);
- r |= ((l & 0x00000004) ? IGNPAR : 0);
- r |= ((l & 0x00000008) ? PARMRK : 0);
- r |= ((l & 0x00000010) ? INPCK : 0);
- r |= ((l & 0x00000020) ? ISTRIP : 0);
- r |= ((l & 0x00000040) ? INLCR : 0);
- r |= ((l & 0x00000080) ? IGNCR : 0);
- r |= ((l & 0x00000100) ? ICRNL : 0);
- /* ((l & 0x00000200) ? IUCLC : 0) */
- r |= ((l & 0x00000400) ? IXON : 0);
- r |= ((l & 0x00000800) ? IXANY : 0);
- r |= ((l & 0x00001000) ? IXOFF : 0);
- r |= ((l & 0x00002000) ? IMAXBEL : 0);
- bt->c_iflag = r;
-
- l = st->c_oflag;
- r = ((l & 0x00000001) ? OPOST : 0);
- /* ((l & 0x00000002) ? OLCUC : 0) */
- r |= ((l & 0x00000004) ? ONLCR : 0);
- /* ((l & 0x00000008) ? OCRNL : 0) */
- /* ((l & 0x00000010) ? ONOCR : 0) */
- /* ((l & 0x00000020) ? ONLRET : 0) */
- /* ((l & 0x00000040) ? OFILL : 0) */
- /* ((l & 0x00000080) ? OFDEL : 0) */
- /* ((l & 0x00000100) ? NLDLY : 0) */
- /* ((l & 0x00000100) ? NL1 : 0) */
- /* ((l & 0x00000600) ? CRDLY : 0) */
- /* ((l & 0x00000200) ? CR1 : 0) */
- /* ((l & 0x00000400) ? CR2 : 0) */
- /* ((l & 0x00000600) ? CR3 : 0) */
- /* ((l & 0x00001800) ? TABDLY : 0) */
- /* ((l & 0x00000800) ? TAB1 : 0) */
- /* ((l & 0x00001000) ? TAB2 : 0) */
- r |= ((l & 0x00001800) ? OXTABS : 0);
- /* ((l & 0x00002000) ? BSDLY : 0) */
- /* ((l & 0x00002000) ? BS1 : 0) */
- /* ((l & 0x00004000) ? VTDLY : 0) */
- /* ((l & 0x00004000) ? VT1 : 0) */
- /* ((l & 0x00008000) ? FFDLY : 0) */
- /* ((l & 0x00008000) ? FF1 : 0) */
- /* ((l & 0x00010000) ? PAGEOUT : 0) */
- /* ((l & 0x00020000) ? WRAP : 0) */
- bt->c_oflag = r;
-
- l = st->c_cflag;
- switch (l & 0x00000030) {
- case 0:
- r = CS5;
- break;
- case 0x00000010:
- r = CS6;
- break;
- case 0x00000020:
- r = CS7;
- break;
- case 0x00000030:
- r = CS8;
- break;
- }
- r |= ((l & 0x00000040) ? CSTOPB : 0);
- r |= ((l & 0x00000080) ? CREAD : 0);
- r |= ((l & 0x00000100) ? PARENB : 0);
- r |= ((l & 0x00000200) ? PARODD : 0);
- r |= ((l & 0x00000400) ? HUPCL : 0);
- r |= ((l & 0x00000800) ? CLOCAL : 0);
- /* ((l & 0x00001000) ? LOBLK : 0) */
- r |= ((l & 0x80000000) ? (CRTS_IFLOW|CCTS_OFLOW) : 0);
- bt->c_cflag = r;
-
- bt->c_ispeed = bt->c_ospeed = s2btab[l & 0x0000000f];
-
- l = st->c_lflag;
- r = ((l & 0x00000001) ? ISIG : 0);
- r |= ((l & 0x00000002) ? ICANON : 0);
- /* ((l & 0x00000004) ? XCASE : 0) */
- r |= ((l & 0x00000008) ? ECHO : 0);
- r |= ((l & 0x00000010) ? ECHOE : 0);
- r |= ((l & 0x00000020) ? ECHOK : 0);
- r |= ((l & 0x00000040) ? ECHONL : 0);
- r |= ((l & 0x00000080) ? NOFLSH : 0);
- r |= ((l & 0x00000100) ? TOSTOP : 0);
- r |= ((l & 0x00000200) ? ECHOCTL : 0);
- r |= ((l & 0x00000400) ? ECHOPRT : 0);
- r |= ((l & 0x00000800) ? ECHOKE : 0);
- /* ((l & 0x00001000) ? DEFECHO : 0) */
- r |= ((l & 0x00002000) ? FLUSHO : 0);
- r |= ((l & 0x00004000) ? PENDIN : 0);
- bt->c_lflag = r;
-
- bt->c_cc[VINTR] = EMUL_TO_NATIVE_CC(st->c_cc[0]);
- bt->c_cc[VQUIT] = EMUL_TO_NATIVE_CC(st->c_cc[1]);
- bt->c_cc[VERASE] = EMUL_TO_NATIVE_CC(st->c_cc[2]);
- bt->c_cc[VKILL] = EMUL_TO_NATIVE_CC(st->c_cc[3]);
- bt->c_cc[VEOF] = EMUL_TO_NATIVE_CC(st->c_cc[4]);
- bt->c_cc[VEOL] = EMUL_TO_NATIVE_CC(st->c_cc[5]);
- bt->c_cc[VEOL2] = EMUL_TO_NATIVE_CC(st->c_cc[6]);
- /* not present on NetBSD */
- /* bt->c_cc[VSWTCH] = EMUL_TO_NATIVE_CC(st->c_cc[7]); */
- bt->c_cc[VSTART] = EMUL_TO_NATIVE_CC(st->c_cc[10]);
- bt->c_cc[VSTOP] = EMUL_TO_NATIVE_CC(st->c_cc[11]);
- bt->c_cc[VSUSP] = EMUL_TO_NATIVE_CC(st->c_cc[12]);
- bt->c_cc[VDSUSP] = EMUL_TO_NATIVE_CC(st->c_cc[13]);
- bt->c_cc[VREPRINT] = EMUL_TO_NATIVE_CC(st->c_cc[14]);
- bt->c_cc[VDISCARD] = EMUL_TO_NATIVE_CC(st->c_cc[15]);
- bt->c_cc[VWERASE] = EMUL_TO_NATIVE_CC(st->c_cc[16]);
- bt->c_cc[VLNEXT] = EMUL_TO_NATIVE_CC(st->c_cc[17]);
- bt->c_cc[VSTATUS] = EMUL_TO_NATIVE_CC(st->c_cc[18]);
-
-#ifdef COMPAT_ULTRIX
- /* Ultrix termio/termios has real vmin/vtime */
- bt->c_cc[VMIN] = EMUL_TO_NATIVE_CC(st->c_cc[8]);
- bt->c_cc[VTIME] = EMUL_TO_NATIVE_CC(st->c_cc[9]);
-#else
- /* if `raw mode', create native VMIN/VTIME from SunOS VEOF/VEOL */
- bt->c_cc[VMIN] = (bt->c_lflag & ICANON) ? 1 : bt->c_cc[VEOF];
- bt->c_cc[VTIME] = (bt->c_lflag & ICANON) ? 1 : bt->c_cc[VEOL];
-#endif
-
-}
-
-/*
- * Convert bsd termios to "sunos" emulated termios
- */
-static void
-btios2stios(bt, st)
- struct termios *bt;
- struct emul_termios *st;
-{
- register u_long l, r;
-
- l = bt->c_iflag;
- r = ((l & IGNBRK) ? 0x00000001 : 0);
- r |= ((l & BRKINT) ? 0x00000002 : 0);
- r |= ((l & IGNPAR) ? 0x00000004 : 0);
- r |= ((l & PARMRK) ? 0x00000008 : 0);
- r |= ((l & INPCK) ? 0x00000010 : 0);
- r |= ((l & ISTRIP) ? 0x00000020 : 0);
- r |= ((l & INLCR) ? 0x00000040 : 0);
- r |= ((l & IGNCR) ? 0x00000080 : 0);
- r |= ((l & ICRNL) ? 0x00000100 : 0);
- /* ((l & IUCLC) ? 0x00000200 : 0) */
- r |= ((l & IXON) ? 0x00000400 : 0);
- r |= ((l & IXANY) ? 0x00000800 : 0);
- r |= ((l & IXOFF) ? 0x00001000 : 0);
- r |= ((l & IMAXBEL) ? 0x00002000 : 0);
- st->c_iflag = r;
-
- l = bt->c_oflag;
- r = ((l & OPOST) ? 0x00000001 : 0);
- /* ((l & OLCUC) ? 0x00000002 : 0) */
- r |= ((l & ONLCR) ? 0x00000004 : 0);
- /* ((l & OCRNL) ? 0x00000008 : 0) */
- /* ((l & ONOCR) ? 0x00000010 : 0) */
- /* ((l & ONLRET) ? 0x00000020 : 0) */
- /* ((l & OFILL) ? 0x00000040 : 0) */
- /* ((l & OFDEL) ? 0x00000080 : 0) */
- /* ((l & NLDLY) ? 0x00000100 : 0) */
- /* ((l & NL1) ? 0x00000100 : 0) */
- /* ((l & CRDLY) ? 0x00000600 : 0) */
- /* ((l & CR1) ? 0x00000200 : 0) */
- /* ((l & CR2) ? 0x00000400 : 0) */
- /* ((l & CR3) ? 0x00000600 : 0) */
- /* ((l & TABDLY) ? 0x00001800 : 0) */
- /* ((l & TAB1) ? 0x00000800 : 0) */
- /* ((l & TAB2) ? 0x00001000 : 0) */
- r |= ((l & OXTABS) ? 0x00001800 : 0);
- /* ((l & BSDLY) ? 0x00002000 : 0) */
- /* ((l & BS1) ? 0x00002000 : 0) */
- /* ((l & VTDLY) ? 0x00004000 : 0) */
- /* ((l & VT1) ? 0x00004000 : 0) */
- /* ((l & FFDLY) ? 0x00008000 : 0) */
- /* ((l & FF1) ? 0x00008000 : 0) */
- /* ((l & PAGEOUT) ? 0x00010000 : 0) */
- /* ((l & WRAP) ? 0x00020000 : 0) */
- st->c_oflag = r;
-
- l = bt->c_cflag;
- switch (l & CSIZE) {
- case CS5:
- r = 0;
- break;
- case CS6:
- r = 0x00000010;
- break;
- case CS7:
- r = 0x00000020;
- break;
- case CS8:
- r = 0x00000030;
- break;
- }
- r |= ((l & CSTOPB) ? 0x00000040 : 0);
- r |= ((l & CREAD) ? 0x00000080 : 0);
- r |= ((l & PARENB) ? 0x00000100 : 0);
- r |= ((l & PARODD) ? 0x00000200 : 0);
- r |= ((l & HUPCL) ? 0x00000400 : 0);
- r |= ((l & CLOCAL) ? 0x00000800 : 0);
- /* ((l & LOBLK) ? 0x00001000 : 0) */
- r |= ((l & (CRTS_IFLOW|CCTS_OFLOW)) ? 0x80000000 : 0);
- st->c_cflag = r;
-
- l = bt->c_lflag;
- r = ((l & ISIG) ? 0x00000001 : 0);
- r |= ((l & ICANON) ? 0x00000002 : 0);
- /* ((l & XCASE) ? 0x00000004 : 0) */
- r |= ((l & ECHO) ? 0x00000008 : 0);
- r |= ((l & ECHOE) ? 0x00000010 : 0);
- r |= ((l & ECHOK) ? 0x00000020 : 0);
- r |= ((l & ECHONL) ? 0x00000040 : 0);
- r |= ((l & NOFLSH) ? 0x00000080 : 0);
- r |= ((l & TOSTOP) ? 0x00000100 : 0);
- r |= ((l & ECHOCTL) ? 0x00000200 : 0);
- r |= ((l & ECHOPRT) ? 0x00000400 : 0);
- r |= ((l & ECHOKE) ? 0x00000800 : 0);
- /* ((l & DEFECHO) ? 0x00001000 : 0) */
- r |= ((l & FLUSHO) ? 0x00002000 : 0);
- r |= ((l & PENDIN) ? 0x00004000 : 0);
- st->c_lflag = r;
-
- l = ttspeedtab(bt->c_ospeed, sptab);
- if (l >= 0)
- st->c_cflag |= l;
-
- st->c_cc[0] = NATIVE_TO_EMUL_CC(bt->c_cc[VINTR]);
- st->c_cc[1] = NATIVE_TO_EMUL_CC(bt->c_cc[VQUIT]);
- st->c_cc[2] = NATIVE_TO_EMUL_CC(bt->c_cc[VERASE]);
- st->c_cc[3] = NATIVE_TO_EMUL_CC(bt->c_cc[VKILL]);
- st->c_cc[4] = NATIVE_TO_EMUL_CC(bt->c_cc[VEOF]);
- st->c_cc[5] = NATIVE_TO_EMUL_CC(bt->c_cc[VEOL]);
- st->c_cc[6] = NATIVE_TO_EMUL_CC(bt->c_cc[VEOL2]);
-/* XXX - the next line was an ifdef instead of an ifndef - but i still
- have to find out what to do here
-*/
-#ifndef COMPAT_ULTRIX
- st->c_cc[7] = NATIVE_TO_EMUL_CC(bt->c_cc[VSWTCH]);
-#else
- st->c_cc[7] = 0;
-#endif
- st->c_cc[10] = NATIVE_TO_EMUL_CC(bt->c_cc[VSTART]);
- st->c_cc[11] = NATIVE_TO_EMUL_CC(bt->c_cc[VSTOP]);
- st->c_cc[12]= NATIVE_TO_EMUL_CC(bt->c_cc[VSUSP]);
- st->c_cc[13]= NATIVE_TO_EMUL_CC(bt->c_cc[VDSUSP]);
- st->c_cc[14]= NATIVE_TO_EMUL_CC(bt->c_cc[VREPRINT]);
- st->c_cc[15]= NATIVE_TO_EMUL_CC(bt->c_cc[VDISCARD]);
- st->c_cc[16]= NATIVE_TO_EMUL_CC(bt->c_cc[VWERASE]);
- st->c_cc[17]= NATIVE_TO_EMUL_CC(bt->c_cc[VLNEXT]);
- st->c_cc[18]= NATIVE_TO_EMUL_CC(bt->c_cc[VSTATUS]);
-
-#ifdef COMPAT_ULTRIX
- st->c_cc[8]= NATIVE_TO_EMUL_CC(bt->c_cc[VMIN]);
- st->c_cc[9]= NATIVE_TO_EMUL_CC(bt->c_cc[VTIME]);
-#else
- if (!(bt->c_lflag & ICANON)) {
- /* SunOS stores VMIN/VTIME in VEOF/VEOL (if ICANON is off) */
- st->c_cc[4] = bt->c_cc[VMIN];
- st->c_cc[5] = bt->c_cc[VTIME];
- }
-#endif
-
-#ifdef COMPAT_SUNOS
- st->c_line = 0; /* 4.3bsd "old" line discipline */
-#else
- st->c_line = 2; /* 4.3bsd "new" line discipline */
-#endif
-}
-
-#define TERMIO_NCC 10 /* ultrix termio NCC is 10 */
-
-/*
- * Convert emulated struct termios to termio(?)
- */
-static void
-stios2stio(ts, t)
- struct emul_termios *ts;
- struct emul_termio *t;
-{
- t->c_iflag = ts->c_iflag;
- t->c_oflag = ts->c_oflag;
- t->c_cflag = ts->c_cflag;
- t->c_lflag = ts->c_lflag;
- t->c_line = ts->c_line;
- bcopy(ts->c_cc, t->c_cc, TERMIO_NCC);
-}
-
-/*
- * Convert the other way
- */
-static void
-stio2stios(t, ts)
- struct emul_termio *t;
- struct emul_termios *ts;
-{
- ts->c_iflag = t->c_iflag;
- ts->c_oflag = t->c_oflag;
- ts->c_cflag = t->c_cflag;
- ts->c_lflag = t->c_lflag;
- ts->c_line = t->c_line;
- bcopy(t->c_cc, ts->c_cc, TERMIO_NCC); /* don't touch the upper fields! */
-}
-
-int
-ultrix_sys_ioctl(p, v, retval)
- register struct proc *p;
- void *v;
- register_t *retval;
-{
- struct ultrix_sys_ioctl_args *uap = v;
- struct filedesc *fdp = p->p_fd;
- struct file *fp;
- register int (*ctl)();
- int error;
-
- if ((fp = fd_getfile(fdp, SCARG(uap, fd))) == NULL)
- return EBADF;
- FREF(fp);
-
- if ((fp->f_flag & (FREAD|FWRITE)) == 0) {
- error = EBADF;
- goto out;
- }
-
- ctl = fp->f_ops->fo_ioctl;
-
- switch (SCARG(uap, com)) {
- case _IOR('t', 0, int):
- SCARG(uap, com) = TIOCGETD;
- break;
- case _IOW('t', 1, int):
- {
- int disc;
-
- if ((error = copyin(SCARG(uap, data), (caddr_t)&disc,
- sizeof disc)) != 0)
- goto out;
-
- /* map SunOS NTTYDISC into our termios discipline */
- if (disc == 2)
- disc = 0;
- /* all other disciplines are not supported by NetBSD */
- if (disc) {
- error = ENXIO;
- goto out;
- }
-
- error = (*ctl)(fp, TIOCSETD, (caddr_t)&disc, p);
- goto out;
- }
- case _IOW('t', 101, int): /* sun SUNOS_TIOCSSOFTCAR */
- {
- int x; /* unused */
-
- error = copyin((caddr_t)&x, SCARG(uap, data), sizeof x);
- goto out;
- }
- case _IOR('t', 100, int): /* sun SUNOS_TIOCSSOFTCAR */
- {
- int x = 0;
-
- error = copyout((caddr_t)&x, SCARG(uap, data), sizeof x);
- goto out;
- }
- case _IO('t', 36): /* sun TIOCCONS, no parameters */
- {
- int on = 1;
- error = (*ctl)(fp, TIOCCONS, (caddr_t)&on, p);
- goto out;
- }
- case _IOW('t', 37, struct sunos_ttysize):
- {
- struct winsize ws;
- struct sunos_ttysize ss;
-
- if ((error = (*ctl)(fp, TIOCGWINSZ, (caddr_t)&ws, p)) != 0)
- goto out;
-
- if ((error = copyin (SCARG(uap, data), &ss, sizeof (ss))) != 0)
- goto out;
-
- ws.ws_row = ss.ts_row;
- ws.ws_col = ss.ts_col;
-
- error = ((*ctl)(fp, TIOCSWINSZ, (caddr_t)&ws, p));
- goto out;
- }
- case _IOW('t', 38, struct sunos_ttysize):
- {
- struct winsize ws;
- struct sunos_ttysize ss;
-
- if ((error = (*ctl)(fp, TIOCGWINSZ, (caddr_t)&ws, p)) != 0)
- goto out;
-
- ss.ts_row = ws.ws_row;
- ss.ts_col = ws.ws_col;
-
- error = copyout ((caddr_t)&ss, SCARG(uap, data), sizeof (ss));
- goto out;
- }
- case _IOW('t', 130, int):
- SCARG(uap, com) = TIOCSPGRP;
- break;
- case _IOR('t', 131, int):
- SCARG(uap, com) = TIOCGPGRP;
- break;
- case _IO('t', 132):
- SCARG(uap, com) = TIOCSCTTY;
- break;
- /* Emulate termio or termios tcget() */
- case ULTRIX_TCGETA:
- case ULTRIX_TCGETS:
- {
- struct termios bts;
- struct ultrix_termios sts;
- struct ultrix_termio st;
-
- if ((error = (*ctl)(fp, TIOCGETA, (caddr_t)&bts, p)) != 0)
- goto out;
-
- btios2stios (&bts, &sts);
- if (SCARG(uap, com) == ULTRIX_TCGETA) {
- stios2stio (&sts, &st);
- error = copyout((caddr_t)&st, SCARG(uap, data),
- sizeof (st));
- goto out;
- } else {
- error = copyout((caddr_t)&sts, SCARG(uap, data),
- sizeof (sts));
- goto out;
- }
- /*NOTREACHED*/
- }
- /* Emulate termio tcset() */
- case ULTRIX_TCSETA:
- case ULTRIX_TCSETAW:
- case ULTRIX_TCSETAF:
- {
- struct termios bts;
- struct ultrix_termios sts;
- struct ultrix_termio st;
-
- if ((error = copyin(SCARG(uap, data), (caddr_t)&st,
- sizeof (st))) != 0)
- goto out;
-
- /* get full BSD termios so we don't lose information */
- if ((error = (*ctl)(fp, TIOCGETA, (caddr_t)&bts, p)) != 0)
- goto out;
-
- /*
- * convert to sun termios, copy in information from
- * termio, and convert back, then set new values.
- */
- btios2stios(&bts, &sts);
- stio2stios(&st, &sts);
- stios2btios(&sts, &bts);
-
- /*
- * map ioctl code: ultrix tcsets are numbered in reverse order
- */
- error = (*ctl)(fp, ULTRIX_TCSETA - SCARG(uap, com) + TIOCSETA,
- (caddr_t)&bts, p);
- printf("ultrix TCSETA %lx returns %d\n",
- ULTRIX_TCSETA - SCARG(uap, com), error);
- goto out;
- }
- /* Emulate termios tcset() */
- case ULTRIX_TCSETS:
- case ULTRIX_TCSETSW:
- case ULTRIX_TCSETSF:
- {
- struct termios bts;
- struct ultrix_termios sts;
-
- if ((error = copyin (SCARG(uap, data), (caddr_t)&sts,
- sizeof (sts))) != 0)
- goto out;
- stios2btios (&sts, &bts);
- error = (*ctl)(fp, ULTRIX_TCSETS - SCARG(uap, com) + TIOCSETA,
- (caddr_t)&bts, p);
- goto out;
- }
-/*
- * Pseudo-tty ioctl translations.
- */
- case _IOW('t', 32, int): { /* TIOCTCNTL */
- int error, on;
-
- error = copyin (SCARG(uap, data), (caddr_t)&on, sizeof (on));
- if (error != 0)
- goto out;
- error = (*ctl)(fp, TIOCUCNTL, (caddr_t)&on, p);
- goto out;
- }
- case _IOW('t', 33, int): { /* TIOCSIGNAL */
- int error, sig;
-
- error = copyin (SCARG(uap, data), (caddr_t)&sig, sizeof (sig));
- if (error != 0)
- goto out;
- error = (*ctl)(fp, TIOCSIG, (caddr_t)&sig, p);
- goto out;
- }
-
-/*
- * Socket ioctl translations.
- */
-#define IN_TYPE(a, type_t) { \
- type_t localbuf; \
- if ((error = copyin (SCARG(uap, data), \
- (caddr_t)&localbuf, sizeof (type_t))) != 0) \
- goto out; \
- error = (*ctl)(fp, a, (caddr_t)&localbuf, p); \
- goto out; \
-}
-
-#define INOUT_TYPE(a, type_t) { \
- type_t localbuf; \
- if ((error = copyin (SCARG(uap, data), (caddr_t)&localbuf, \
- sizeof (type_t))) != 0) \
- goto out; \
- if ((error = (*ctl)(fp, a, (caddr_t)&localbuf, p)) != 0) \
- goto out; \
- error = copyout ((caddr_t)&localbuf, SCARG(uap, data), sizeof (type_t)); \
- goto out; \
-}
-
-
-#define IFREQ_IN(a) { \
- struct ifreq ifreq; \
- if ((error = copyin (SCARG(uap, data), (caddr_t)&ifreq, sizeof (ifreq))) != 0) \
- goto out; \
- error = (*ctl)(fp, a, (caddr_t)&ifreq, p); \
- goto out; \
-}
-
-#define IFREQ_INOUT(a) { \
- struct ifreq ifreq; \
- if ((error = copyin (SCARG(uap, data), (caddr_t)&ifreq, sizeof (ifreq))) != 0) \
- goto out; \
- if ((error = (*ctl)(fp, a, (caddr_t)&ifreq, p)) != 0) \
- goto out; \
- error = copyout ((caddr_t)&ifreq, SCARG(uap, data), sizeof (ifreq)); \
- goto out; \
-}
-
- case _IOW('i', 12, struct ifreq):
- /* SIOCSIFADDR */
- break;
-
- case _IOWR('i', 13, struct ifreq):
- IFREQ_INOUT(OSIOCGIFADDR);
-
- case _IOW('i', 14, struct ifreq):
- /* SIOCSIFDSTADDR */
- break;
-
- case _IOWR('i', 15, struct ifreq):
- IFREQ_INOUT(OSIOCGIFDSTADDR);
-
- case _IOW('i', 16, struct ifreq):
- /* SIOCSIFFLAGS */
- break;
-
- case _IOWR('i', 17, struct ifreq):
- /* SIOCGIFFLAGS */
- break;
-
- case _IOW('i', 21, struct ifreq):
- IFREQ_IN(SIOCSIFMTU);
-
- case _IOWR('i', 22, struct ifreq):
- IFREQ_INOUT(SIOCGIFMTU);
-
- case _IOWR('i', 23, struct ifreq):
- IFREQ_INOUT(SIOCGIFBRDADDR);
-
- case _IOW('i', 24, struct ifreq):
- IFREQ_IN(SIOCSIFBRDADDR);
-
- case _IOWR('i', 25, struct ifreq):
- IFREQ_INOUT(OSIOCGIFNETMASK);
-
- case _IOW('i', 26, struct ifreq):
- IFREQ_IN(SIOCSIFNETMASK);
-
- case _IOWR('i', 27, struct ifreq):
- IFREQ_INOUT(SIOCGIFMETRIC);
-
- case _IOWR('i', 28, struct ifreq):
- IFREQ_IN(SIOCSIFMETRIC);
-
- case _IOW('i', 30, struct arpreq):
- /* SIOCSARP */
- break;
-
- case _IOWR('i', 31, struct arpreq):
- /* SIOCGARP */
- break;
-
- case _IOW('i', 32, struct arpreq):
- /* SIOCDARP */
- break;
-
- case _IOW('i', 18, struct ifreq): /* SIOCSIFMEM */
- case _IOWR('i', 19, struct ifreq): /* SIOCGIFMEM */
- case _IOW('i', 40, struct ifreq): /* SIOCUPPER */
- case _IOW('i', 41, struct ifreq): /* SIOCLOWER */
- case _IOW('i', 44, struct ifreq): /* SIOCSETSYNC */
- case _IOWR('i', 45, struct ifreq): /* SIOCGETSYNC */
- case _IOWR('i', 46, struct ifreq): /* SIOCSDSTATS */
- case _IOWR('i', 47, struct ifreq): /* SIOCSESTATS */
- case _IOW('i', 48, int): /* SIOCSPROMISC */
- case _IOW('i', 49, struct ifreq): /* SIOCADDMULTI */
- case _IOW('i', 50, struct ifreq): /* SIOCDELMULTI */
- error = EOPNOTSUPP;
- goto out;
-
- case _IOWR('i', 20, struct ifconf): /* SIOCGIFCONF */
- {
- struct ifconf ifconf;
-
- /*
- * XXX: two more problems
- * 1. our sockaddr's are variable length, not always sizeof(sockaddr)
- * 2. this returns a name per protocol, ie. it returns two "lo0"'s
- */
- if ((error = copyin (SCARG(uap, data), (caddr_t)&ifconf,
- sizeof (ifconf))) != 0)
- goto out;
- if ((error = (*ctl)(fp, OSIOCGIFCONF,
- * (caddr_t)&ifconf, p)) !=0 )
- goto out;
- error = copyout ((caddr_t)&ifconf, SCARG(uap, data),
- sizeof (ifconf));
- goto out;
- }
-
- }
- error = (sys_ioctl(p, uap, retval));
-
-out:
- FRELE(fp);
- return (error);
-}
diff --git a/sys/compat/ultrix/ultrix_misc.c b/sys/compat/ultrix/ultrix_misc.c
deleted file mode 100644
index ae56326ac42..00000000000
--- a/sys/compat/ultrix/ultrix_misc.c
+++ /dev/null
@@ -1,600 +0,0 @@
-/* $OpenBSD: ultrix_misc.c,v 1.31 2009/03/05 19:52:24 kettenis Exp $ */
-/* $NetBSD: ultrix_misc.c,v 1.23 1996/04/07 17:23:04 jonathan Exp $ */
-
-/*
- * Copyright (c) 1995
- * Jonathan Stone (hereinafter referred to as the author)
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-/*
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This software was developed by the Computer Systems Engineering group
- * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and
- * contributed to Berkeley.
- *
- * All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Lawrence Berkeley Laboratory.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- *
- * @(#)sun_misc.c 8.1 (Berkeley) 6/18/93
- *
- * from: Header: sun_misc.c,v 1.16 93/04/07 02:46:27 torek Exp
- */
-
-/*
- * SunOS compatibility module.
- *
- * SunOS system calls that are implemented differently in BSD are
- * handled here.
- */
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/namei.h>
-#include <sys/dirent.h>
-#include <sys/proc.h>
-#include <sys/file.h>
-#include <sys/filedesc.h>
-/*#include <sys/stat.h>*/
-/*#include <sys/ioctl.h>*/
-#include <sys/kernel.h>
-#include <sys/core.h>
-#include <sys/exec.h>
-#include <sys/malloc.h>
-#include <sys/mbuf.h>
-#include <sys/mman.h>
-#include <sys/mount.h>
-#include <sys/resource.h>
-#include <sys/resourcevar.h>
-#include <sys/signal.h>
-#include <sys/signalvar.h>
-#include <sys/socket.h>
-#include <sys/vnode.h>
-#include <sys/uio.h>
-#include <sys/wait.h>
-#include <sys/utsname.h>
-#include <sys/unistd.h>
-
-#include <sys/syscallargs.h>
-
-#include <compat/ultrix/ultrix_syscall.h>
-#include <compat/ultrix/ultrix_syscallargs.h>
-#include <compat/ultrix/ultrix_util.h>
-
-#include <netinet/in.h>
-
-#include <miscfs/specfs/specdev.h>
-
-#include <nfs/rpcv2.h>
-#include <nfs/nfsproto.h>
-#include <nfs/nfs.h>
-
-#include <uvm/uvm_extern.h>
-
-#include <sys/conf.h> /* iszerodev() */
-#include <sys/socketvar.h> /* sosetopt() */
-
-extern struct sysent ultrix_sysent[];
-#ifdef SYSCALL_DEBUG
-extern char *ultrix_syscallnames[];
-#endif
-
-/*
- * Select the appropriate setregs callback for the target architecture.
- */
-#ifdef __mips__
-#define ULTRIX_EXEC_SETREGS cpu_exec_ecoff_setregs
-#endif /* __mips__ */
-
-#ifdef __vax__
-#define ULTRIX_EXEC_SETREGS setregs
-#endif /* __vax__ */
-
-
-extern void ULTRIX_EXEC_SETREGS(struct proc *, struct exec_package *,
- u_long, register_t *);
-extern char sigcode[], esigcode[];
-
-struct emul emul_ultrix = {
- "ultrix",
- NULL,
- sendsig,
- ULTRIX_SYS_syscall,
- ULTRIX_SYS_MAXSYSCALL,
- ultrix_sysent,
-#ifdef SYSCALL_DEBUG
- ultrix_syscallnames,
-#else
- NULL,
-#endif
- 0,
- copyargs,
- ULTRIX_EXEC_SETREGS,
- NULL,
- coredump_trad,
- sigcode,
- esigcode,
-};
-
-#define GSI_PROG_ENV 1
-
-int
-ultrix_sys_getsysinfo(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct ultrix_sys_getsysinfo_args *uap = v;
- static short progenv = 0;
-
- switch (SCARG(uap, op)) {
- /* operations implemented: */
- case GSI_PROG_ENV:
- if (SCARG(uap, nbytes) < sizeof(short))
- return EINVAL;
- *retval = 1;
- return (copyout(&progenv, SCARG(uap, buffer), sizeof(short)));
- default:
- *retval = 0; /* info unavail */
- return 0;
- }
-}
-
-int
-ultrix_sys_setsysinfo(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
-
-#ifdef notyet
- struct ultrix_sys_setsysinfo_args *uap = v;
-#endif
-
- *retval = 0;
- return 0;
-}
-
-int
-ultrix_sys_waitpid(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct ultrix_sys_waitpid_args *uap = v;
- struct sys_wait4_args ua;
-
- SCARG(&ua, pid) = SCARG(uap, pid);
- SCARG(&ua, status) = SCARG(uap, status);
- SCARG(&ua, options) = SCARG(uap, options);
- SCARG(&ua, rusage) = 0;
-
- return (sys_wait4(p, &ua, retval));
-}
-
-int
-ultrix_sys_wait3(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct ultrix_sys_wait3_args *uap = v;
- struct sys_wait4_args ua;
-
- SCARG(&ua, pid) = -1;
- SCARG(&ua, status) = SCARG(uap, status);
- SCARG(&ua, options) = SCARG(uap, options);
- SCARG(&ua, rusage) = SCARG(uap, rusage);
-
- return (sys_wait4(p, &ua, retval));
-}
-
-/*
- * Ultrix binaries pass in FD_MAX as the first arg to select().
- * On Ultrix, FD_MAX is 4096, which is more than the NetBSD sys_select()
- * can handle.
- * Since we can't have more than the (native) FD_MAX descriptors open,
- * limit nfds to at most FD_MAX.
- */
-int
-ultrix_sys_select(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct sys_select_args *uap = v;
- struct timeval atv;
- int error;
-
- /* Limit number of FDs selected on to the native maximum */
-
- if (SCARG(uap, nd) > FD_SETSIZE)
- SCARG(uap, nd) = FD_SETSIZE;
-
- /* Check for negative timeval */
- if (SCARG(uap, tv)) {
- error = copyin((caddr_t)SCARG(uap, tv), (caddr_t)&atv,
- sizeof(atv));
- if (error)
- goto done;
-#ifdef DEBUG
- /* Ultrix clients sometimes give negative timeouts? */
- if (atv.tv_sec < 0 || atv.tv_usec < 0)
- printf("ultrix select( %ld, %ld): negative timeout\n",
- atv.tv_sec, atv.tv_usec);
- /*tvp = (timeval *)STACKGAPBASE;*/
-#endif
-
- }
- error = sys_select(p, (void *) uap, retval);
- if (error == EINVAL)
- printf("ultrix select: bad args?\n");
-
-done:
- return error;
-}
-
-#if defined(NFSCLIENT)
-int
-async_daemon(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct sys_nfssvc_args ouap;
-
- SCARG(&ouap, flag) = NFSSVC_BIOD;
- SCARG(&ouap, argp) = NULL;
-
- return (sys_nfssvc(p, &ouap, retval));
-}
-#endif /* NFSCLIENT */
-
-
-#define SUN__MAP_NEW 0x80000000 /* if not, old mmap & cannot handle */
-
-int
-ultrix_sys_mmap(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct ultrix_sys_mmap_args *uap = v;
- struct sys_mmap_args ouap;
-
- /*
- * Verify the arguments.
- */
- if (SCARG(uap, prot) & ~(PROT_READ|PROT_WRITE|PROT_EXEC))
- return (EINVAL); /* XXX still needed? */
-
- if ((SCARG(uap, flags) & SUN__MAP_NEW) == 0)
- return (EINVAL);
-
- SCARG(&ouap, flags) = SCARG(uap, flags) & ~SUN__MAP_NEW;
- SCARG(&ouap, addr) = SCARG(uap, addr);
-
- if ((SCARG(&ouap, flags) & MAP_FIXED) == 0 &&
- SCARG(&ouap, addr) != 0 &&
- SCARG(&ouap, addr) < (void *)round_page((vaddr_t)p->p_vmspace->vm_daddr+MAXDSIZ))
- SCARG(&ouap, addr) = (void *)round_page((vaddr_t)p->p_vmspace->vm_daddr+MAXDSIZ);
-
- SCARG(&ouap, len) = SCARG(uap, len);
- SCARG(&ouap, prot) = SCARG(uap, prot);
- SCARG(&ouap, fd) = SCARG(uap, fd);
- SCARG(&ouap, pos) = SCARG(uap, pos);
-
- return (sys_mmap(p, &ouap, retval));
-}
-
-int
-ultrix_sys_setsockopt(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- register struct ultrix_sys_setsockopt_args *uap = v;
- struct file *fp;
- struct mbuf *m = NULL;
- int error;
-
- if ((error = getsock(p->p_fd, SCARG(uap, s), &fp)) != 0)
- return (error);
-#define SO_DONTLINGER (~SO_LINGER)
- if (SCARG(uap, name) == SO_DONTLINGER) {
- m = m_get(M_WAIT, MT_SOOPTS);
- mtod(m, struct linger *)->l_onoff = 0;
- m->m_len = sizeof(struct linger);
- error = (sosetopt((struct socket *)fp->f_data, SCARG(uap, level),
- SO_LINGER, m));
- goto bad;
- }
- if (SCARG(uap, valsize) > MLEN) {
- error = EINVAL;
- goto bad;
- }
- if (SCARG(uap, val)) {
- m = m_get(M_WAIT, MT_SOOPTS);
- if ((error = copyin(SCARG(uap, val), mtod(m, caddr_t),
- (u_int)SCARG(uap, valsize))) != 0) {
- (void) m_free(m);
- goto bad;
- }
- m->m_len = SCARG(uap, valsize);
- }
- error = (sosetopt((struct socket *)fp->f_data, SCARG(uap, level),
- SCARG(uap, name), m));
-bad:
- FRELE(fp);
- return (error);
-}
-
-struct ultrix_utsname {
- char sysname[9];
- char nodename[9];
- char nodeext[65-9];
- char release[9];
- char version[9];
- char machine[9];
-};
-
-int
-ultrix_sys_uname(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct ultrix_sys_uname_args *uap = v;
- struct ultrix_utsname sut;
- extern char machine[];
-
- bzero(&sut, sizeof(sut));
-
- bcopy(ostype, sut.sysname, sizeof(sut.sysname) - 1);
- bcopy(hostname, sut.nodename, sizeof(sut.nodename));
- sut.nodename[sizeof(sut.nodename)-1] = '\0';
- bcopy(osrelease, sut.release, sizeof(sut.release) - 1);
- bcopy("1", sut.version, sizeof(sut.version) - 1);
- bcopy(machine, sut.machine, sizeof(sut.machine) - 1);
-
- return copyout((caddr_t)&sut, (caddr_t)SCARG(uap, name),
- sizeof(struct ultrix_utsname));
-}
-
-int
-ultrix_sys_setpgrp(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct ultrix_sys_setpgrp_args *uap = v;
-
- /*
- * difference to our setpgid call is to include backwards
- * compatibility to pre-setsid() binaries. Do setsid()
- * instead of setpgid() in those cases where the process
- * tries to create a new session the old way.
- */
- if (!SCARG(uap, pgid) &&
- (!SCARG(uap, pid) || SCARG(uap, pid) == p->p_pid))
- return sys_setsid(p, uap, retval);
- else
- return sys_setpgid(p, uap, retval);
-}
-
-#if defined (NFSSERVER)
-int
-ultrix_sys_nfssvc(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
-
-#if 0 /* XXX */
- struct ultrix_sys_nfssvc_args *uap = v;
- struct emul *e = p->p_emul;
- struct sys_nfssvc_args outuap;
- struct sockaddr sa;
- int error;
-
- bzero(&outuap, sizeof outuap);
- SCARG(&outuap, fd) = SCARG(uap, fd);
- SCARG(&outuap, mskval) = STACKGAPBASE;
- SCARG(&outuap, msklen) = sizeof sa;
- SCARG(&outuap, mtchval) = outuap.mskval + sizeof sa;
- SCARG(&outuap, mtchlen) = sizeof sa;
-
- bzero(&sa, sizeof sa);
- if (error = copyout(&sa, SCARG(&outuap, mskval), SCARG(&outuap, msklen)))
- return (error);
- if (error = copyout(&sa, SCARG(&outuap, mtchval), SCARG(&outuap, mtchlen)))
- return (error);
-
- return nfssvc(p, &outuap, retval);
-#else
- return (ENOSYS);
-#endif
-}
-#endif /* NFSSERVER */
-
-struct ultrix_ustat {
- int32_t f_tfree; /* total free */
- ino_t f_tinode; /* total inodes free */
- char f_fname[6]; /* filsys name */
- char f_fpack[6]; /* filsys pack name */
-};
-
-int
-ultrix_sys_ustat(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct ultrix_sys_ustat_args *uap = v;
- struct ultrix_ustat us;
- int error;
-
- bzero(&us, sizeof us);
-
- /*
- * XXX: should set f_tfree and f_tinode at least
- * How do we translate dev -> fstat? (and then to ultrix_ustat)
- */
-
- if ((error = copyout(&us, SCARG(uap, buf), sizeof us)) != 0)
- return (error);
- return 0;
-}
-
-int
-ultrix_sys_quotactl(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
-
-#ifdef notyet
- struct ultrix_sys_quotactl_args *uap = v;
-#endif
-
- return EINVAL;
-}
-
-int
-ultrix_sys_vhangup(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
-
- return 0;
-}
-
-int
-ultrix_sys_exportfs(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
-#ifdef notyet
- struct ultrix_sys_exportfs_args *uap = v;
-#endif
-
- /*
- * XXX: should perhaps translate into a mount(2)
- * with MOUNT_EXPORT?
- */
- return 0;
-}
-
-int
-ultrix_sys_sigpending(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct ultrix_sys_sigpending_args *uap = v;
- int mask = p->p_siglist & p->p_sigmask;
-
- return (copyout((caddr_t)&mask, (caddr_t)SCARG(uap, mask), sizeof(int)));
-}
-
-int
-ultrix_sys_sigcleanup(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct ultrix_sys_sigcleanup_args *uap = v;
-
- return sys_sigreturn(p, (struct sys_sigreturn_args *)uap, retval);
-}
-
-int
-ultrix_sys_sigreturn(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct ultrix_sys_sigcleanup_args *uap = v;
-
-#ifdef DEBUG
- printf("ultrix sigreturn\n");
-#endif
- return sys_sigreturn(p, (struct sys_sigreturn_args *)uap, retval);
-}
-
-int
-ultrix_sys_execve(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct ultrix_sys_execve_args /* {
- syscallarg(char *) path;
- syscallarg(char **) argv;
- syscallarg(char **) envp;
- } */ *uap = v;
- struct sys_execve_args ap;
- caddr_t sg;
-
- sg = stackgap_init(p->p_emul);
- ULTRIX_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));
-}
diff --git a/sys/compat/ultrix/ultrix_pathname.c b/sys/compat/ultrix/ultrix_pathname.c
deleted file mode 100644
index 6ccc140f129..00000000000
--- a/sys/compat/ultrix/ultrix_pathname.c
+++ /dev/null
@@ -1,309 +0,0 @@
-/* $OpenBSD: ultrix_pathname.c,v 1.9 2003/06/02 23:28:01 millert Exp $ */
-/* $NetBSD: ultrix_pathname.c,v 1.2 1996/04/07 17:23:07 jonathan Exp $ */
-
-/*
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This software was developed by the Computer Systems Engineering group
- * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and
- * contributed to Berkeley.
- *
- * All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Lawrence Berkeley Laboratory.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- *
- * @(#)sun_misc.c 8.1 (Berkeley) 6/18/93
- *
- * from: Header: sun_misc.c,v 1.16 93/04/07 02:46:27 torek Exp
- */
-
-
-/*
- * Ultrix emulation filesystem-namespace compatibility module.
- *
- * Ultrix system calls that examine the filesysten namespace
- * are implemented here. Each system call has a wrapper that
- * first checks if the given file exists at a special `emulation'
- * pathname: the given path, prefixex with '/emul/ultrix', and
- * if that pathname exists, it is used instead of the providd pathname.
- *
- * Used to locate OS-specific files (shared libraries, config files,
- * etc) used by emul processes at their `normal' pathnames, without
- * polluting, or conflicting with, the native filesysten namespace.
- */
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/namei.h>
-#include <sys/file.h>
-#include <sys/filedesc.h>
-#include <sys/ioctl.h>
-#include <sys/mount.h>
-#include <sys/stat.h>
-#include <sys/vnode.h>
-#include <sys/syscallargs.h>
-
-#include <compat/ultrix/ultrix_syscallargs.h>
-#include <compat/ultrix/ultrix_util.h>
-
-const char ultrix_emul_path[] = "/emul/ultrix";
-
-int
-ultrix_sys_creat(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct ultrix_sys_creat_args *uap = v;
- struct sys_open_args ouap;
-
- caddr_t sg = stackgap_init(p->p_emul);
- ULTRIX_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
-
- SCARG(&ouap, path) = SCARG(uap, path);
- SCARG(&ouap, flags) = O_WRONLY | O_CREAT | O_TRUNC;
- SCARG(&ouap, mode) = SCARG(uap, mode);
-
- return (sys_open(p, &ouap, retval));
-}
-
-
-int
-ultrix_sys_access(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct ultrix_sys_access_args *uap = v;
- caddr_t sg = stackgap_init(p->p_emul);
- ULTRIX_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
-
- return (sys_access(p, uap, retval));
-}
-
-int
-ultrix_sys_stat(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct ultrix_sys_stat_args *uap = v;
- caddr_t sg = stackgap_init(p->p_emul);
- ULTRIX_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
-
- return (compat_43_sys_stat(p, uap, retval));
-}
-
-int
-ultrix_sys_lstat(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct ultrix_sys_lstat_args *uap = v;
- caddr_t sg = stackgap_init(p->p_emul);
- ULTRIX_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
-
- return (compat_43_sys_lstat(p, uap, retval));
-}
-
-int
-ultrix_sys_execv(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct ultrix_sys_execv_args *uap = v;
- struct sys_execve_args ouap;
-
- caddr_t sg = stackgap_init(p->p_emul);
- ULTRIX_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
-
- SCARG(&ouap, path) = SCARG(uap, path);
- SCARG(&ouap, argp) = SCARG(uap, argp);
- SCARG(&ouap, envp) = NULL;
-
- return (sys_execve(p, &ouap, retval));
-}
-
-int
-ultrix_sys_open(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct ultrix_sys_open_args *uap = v;
- int l, r;
- int noctty;
- int ret;
-
- caddr_t sg = stackgap_init(p->p_emul);
- ULTRIX_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
-
- /* convert open flags into NetBSD flags */
- l = SCARG(uap, flags);
- noctty = l & 0x8000;
- r = (l & (0x0001 | 0x0002 | 0x0008 | 0x0040 | 0x0200 | 0x0400 | 0x0800));
- r |= ((l & (0x0004 | 0x1000 | 0x4000)) ? O_NONBLOCK : 0);
- r |= ((l & 0x0080) ? O_SHLOCK : 0);
- r |= ((l & 0x0100) ? O_EXLOCK : 0);
- r |= ((l & 0x2000) ? O_SYNC : 0);
-
- SCARG(uap, flags) = r;
- ret = sys_open(p, (struct sys_open_args *)uap, retval);
-
- if (!ret && !noctty && SESS_LEADER(p) && !(p->p_flag & P_CONTROLT)) {
- struct filedesc *fdp = p->p_fd;
- struct file *fp;
-
- if ((fd = fd_getfile(fdp, *retval)) == NULL)
- return (EBADF);
- FREF(fp);
- /* ignore any error, just give it a try */
- if (fp->f_type == DTYPE_VNODE)
- (fp->f_ops->fo_ioctl)(fp, TIOCSCTTY, (caddr_t)0, p);
- FRELE(fp);
- }
- return ret;
-}
-
-
-struct ultrix_statfs {
- long f_type; /* type of info, zero for now */
- long f_bsize; /* fundamental file system block size */
- long f_blocks; /* total blocks in file system */
- long f_bfree; /* free blocks */
- long f_bavail; /* free blocks available to non-super-user */
- long f_files; /* total file nodes in file system */
- long f_ffree; /* free file nodes in fs */
- fsid_t f_fsid; /* file system id */
- long f_spare[7]; /* spare for later */
-};
-
-/*
- * Custruct ultrix statfs result from native.
- * XXX should this be the same as returned by Ultrix getmnt(2)?
- * XXX Ultrix predates DEV_BSIZE. Is conversion of disk space from 1k
- * block units to DEV_BSIZE necessary?
- */
-static int
-ultrixstatfs(sp, buf)
- struct statfs *sp;
- caddr_t buf;
-{
- struct ultrix_statfs ssfs;
-
- bzero(&ssfs, sizeof ssfs);
- ssfs.f_type = 0;
- ssfs.f_bsize = sp->f_bsize;
- ssfs.f_blocks = sp->f_blocks;
- ssfs.f_bfree = sp->f_bfree;
- ssfs.f_bavail = sp->f_bavail;
- ssfs.f_files = sp->f_files;
- ssfs.f_ffree = sp->f_ffree;
- ssfs.f_fsid = sp->f_fsid;
- return copyout((caddr_t)&ssfs, buf, sizeof ssfs);
-}
-
-
-int
-ultrix_sys_statfs(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct ultrix_sys_statfs_args *uap = v;
- register struct mount *mp;
- register struct statfs *sp;
- int error;
- struct nameidata nd;
-
- caddr_t sg = stackgap_init(p->p_emul);
- ULTRIX_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
-
- NDINIT(&nd, LOOKUP, FOLLOW, UIO_USERSPACE, SCARG(uap, path), p);
- if ((error = namei(&nd)) != 0)
- return (error);
-
- mp = nd.ni_vp->v_mount;
- sp = &mp->mnt_stat;
- vrele(nd.ni_vp);
- if ((error = VFS_STATFS(mp, sp, p)) != 0)
- return (error);
- sp->f_flags = mp->mnt_flag & MNT_VISFLAGMASK;
- return ultrixstatfs(sp, (caddr_t)SCARG(uap, buf));
-}
-
-/*
- * sys_fstatfs() takes an fd, not a path, and so needs no emul
- * pathname processing; but it's similar enough to sys_statfs() that
- * it goes here anyway.
- */
-int
-ultrix_sys_fstatfs(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct ultrix_sys_fstatfs_args *uap = v;
- struct file *fp;
- struct mount *mp;
- register struct statfs *sp;
- int error;
-
- if ((error = getvnode(p->p_fd, SCARG(uap, fd), &fp)) != 0)
- return (error);
-
- mp = ((struct vnode *)fp->f_data)->v_mount;
- sp = &mp->mnt_stat;
- error = VFS_STATFS(mp, sp, p);
- FRELE(fp);
- if (error)
- return (error);
- sp->f_flags = mp->mnt_flag & MNT_VISFLAGMASK;
- return ultrixstatfs(sp, (caddr_t)SCARG(uap, buf));
-}
-
-int
-ultrix_sys_mknod(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct ultrix_sys_mknod_args *uap = v;
-
- caddr_t sg = stackgap_init(p->p_emul);
- ULTRIX_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
-
- if (S_ISFIFO(SCARG(uap, mode)))
- return sys_mkfifo(p, uap, retval);
-
- return sys_mknod(p, (struct sys_mknod_args *)uap, retval);
-}
diff --git a/sys/compat/ultrix/ultrix_syscall.h b/sys/compat/ultrix/ultrix_syscall.h
deleted file mode 100644
index 5018c815a57..00000000000
--- a/sys/compat/ultrix/ultrix_syscall.h
+++ /dev/null
@@ -1,420 +0,0 @@
-/* $OpenBSD: ultrix_syscall.h,v 1.16 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.12 2008/01/05 00:36:13 miod Exp
- */
-
-/* syscall: "syscall" ret: "int" args: */
-#define ULTRIX_SYS_syscall 0
-
-/* syscall: "exit" ret: "int" args: "int" */
-#define ULTRIX_SYS_exit 1
-
-/* syscall: "fork" ret: "int" args: */
-#define ULTRIX_SYS_fork 2
-
-/* syscall: "read" ret: "int" args: "int" "char *" "u_int" */
-#define ULTRIX_SYS_read 3
-
-/* syscall: "write" ret: "int" args: "int" "char *" "u_int" */
-#define ULTRIX_SYS_write 4
-
-/* syscall: "open" ret: "int" args: "char *" "int" "int" */
-#define ULTRIX_SYS_open 5
-
-/* syscall: "close" ret: "int" args: "int" */
-#define ULTRIX_SYS_close 6
-
-/* syscall: "owait" ret: "int" args: */
-#define ULTRIX_SYS_owait 7
-
-/* syscall: "creat" ret: "int" args: "char *" "int" */
-#define ULTRIX_SYS_creat 8
-
-/* syscall: "link" ret: "int" args: "char *" "char *" */
-#define ULTRIX_SYS_link 9
-
-/* syscall: "unlink" ret: "int" args: "char *" */
-#define ULTRIX_SYS_unlink 10
-
-/* syscall: "execv" ret: "int" args: "char *" "char **" */
-#define ULTRIX_SYS_execv 11
-
-/* syscall: "chdir" ret: "int" args: "char *" */
-#define ULTRIX_SYS_chdir 12
-
- /* 13 is obsolete time */
-/* syscall: "mknod" ret: "int" args: "char *" "int" "int" */
-#define ULTRIX_SYS_mknod 14
-
-/* syscall: "chmod" ret: "int" args: "char *" "int" */
-#define ULTRIX_SYS_chmod 15
-
-/* syscall: "lchown" ret: "int" args: "char *" "int" "int" */
-#define ULTRIX_SYS_lchown 16
-
-/* syscall: "break" ret: "int" args: "char *" */
-#define ULTRIX_SYS_break 17
-
- /* 18 is obsolete stat */
-/* syscall: "lseek" ret: "long" args: "int" "long" "int" */
-#define ULTRIX_SYS_lseek 19
-
-/* syscall: "getpid" ret: "pid_t" args: */
-#define ULTRIX_SYS_getpid 20
-
-/* syscall: "mount" ret: "int" args: "char *" "char *" "int" "int" "caddr_t" */
-#define ULTRIX_SYS_mount 21
-
- /* 22 is obsolete sysV_unmount */
-/* syscall: "setuid" ret: "int" args: "uid_t" */
-#define ULTRIX_SYS_setuid 23
-
-/* syscall: "getuid" ret: "uid_t" args: */
-#define ULTRIX_SYS_getuid 24
-
- /* 25 is obsolete v7 stime */
- /* 26 is obsolete v7 ptrace */
- /* 27 is obsolete v7 alarm */
- /* 28 is obsolete v7 fstat */
- /* 29 is obsolete v7 pause */
- /* 30 is obsolete v7 utime */
- /* 31 is obsolete v7 stty */
- /* 32 is obsolete v7 gtty */
-/* syscall: "access" ret: "int" args: "char *" "int" */
-#define ULTRIX_SYS_access 33
-
- /* 34 is obsolete v7 nice */
- /* 35 is obsolete v7 ftime */
-/* syscall: "sync" ret: "int" args: */
-#define ULTRIX_SYS_sync 36
-
-/* syscall: "kill" ret: "int" args: "int" "int" */
-#define ULTRIX_SYS_kill 37
-
-/* syscall: "stat43" ret: "int" args: "char *" "struct stat43 *" */
-#define ULTRIX_SYS_stat43 38
-
- /* 39 is obsolete v7 setpgrp */
-/* syscall: "olstat" ret: "int" args: "char *" "struct stat43 *" */
-#define ULTRIX_SYS_olstat 40
-
-/* syscall: "dup" ret: "int" args: "u_int" */
-#define ULTRIX_SYS_dup 41
-
-/* syscall: "opipe" ret: "int" args: */
-#define ULTRIX_SYS_opipe 42
-
- /* 43 is obsolete v7 times */
-/* syscall: "profil" ret: "int" args: "caddr_t" "u_int" "u_int" "u_int" */
-#define ULTRIX_SYS_profil 44
-
- /* 46 is obsolete v7 setgid */
-/* syscall: "getgid" ret: "gid_t" args: */
-#define ULTRIX_SYS_getgid 47
-
-/* syscall: "acct" ret: "int" args: "char *" */
-#define ULTRIX_SYS_acct 51
-
-/* syscall: "ioctl" ret: "int" args: "int" "u_long" "caddr_t" */
-#define ULTRIX_SYS_ioctl 54
-
-/* syscall: "reboot" ret: "int" args: "int" */
-#define ULTRIX_SYS_reboot 55
-
-/* syscall: "symlink" ret: "int" args: "char *" "char *" */
-#define ULTRIX_SYS_symlink 57
-
-/* syscall: "readlink" ret: "int" args: "char *" "char *" "int" */
-#define ULTRIX_SYS_readlink 58
-
-/* syscall: "execve" ret: "int" args: "char *" "char **" "char **" */
-#define ULTRIX_SYS_execve 59
-
-/* syscall: "umask" ret: "int" args: "int" */
-#define ULTRIX_SYS_umask 60
-
-/* syscall: "chroot" ret: "int" args: "char *" */
-#define ULTRIX_SYS_chroot 61
-
-/* syscall: "fstat" ret: "int" args: "int" "struct stat43 *" */
-#define ULTRIX_SYS_fstat 62
-
-/* syscall: "getpagesize" ret: "int" args: */
-#define ULTRIX_SYS_getpagesize 64
-
-/* syscall: "vfork" ret: "int" args: */
-#define ULTRIX_SYS_vfork 66
-
- /* 67 is obsolete vread */
- /* 68 is obsolete vwrite */
-/* syscall: "sbrk" ret: "int" args: "int" */
-#define ULTRIX_SYS_sbrk 69
-
-/* syscall: "sstk" ret: "int" args: "int" */
-#define ULTRIX_SYS_sstk 70
-
-/* syscall: "mmap" ret: "int" args: "caddr_t" "size_t" "int" "u_int" "int" "long" */
-#define ULTRIX_SYS_mmap 71
-
- /* 72 is obsolete vadvise */
-/* syscall: "munmap" ret: "int" args: "caddr_t" "size_t" */
-#define ULTRIX_SYS_munmap 73
-
-/* syscall: "mprotect" ret: "int" args: "caddr_t" "size_t" "int" */
-#define ULTRIX_SYS_mprotect 74
-
-/* syscall: "madvise" ret: "int" args: "caddr_t" "size_t" "int" */
-#define ULTRIX_SYS_madvise 75
-
-/* syscall: "vhangup" ret: "int" args: */
-#define ULTRIX_SYS_vhangup 76
-
-/* syscall: "mincore" ret: "int" args: "caddr_t" "int" "char *" */
-#define ULTRIX_SYS_mincore 78
-
-/* syscall: "getgroups" ret: "int" args: "u_int" "gid_t *" */
-#define ULTRIX_SYS_getgroups 79
-
-/* syscall: "setgroups" ret: "int" args: "u_int" "gid_t *" */
-#define ULTRIX_SYS_setgroups 80
-
-/* syscall: "getpgrp" ret: "int" args: */
-#define ULTRIX_SYS_getpgrp 81
-
-/* syscall: "setpgrp" ret: "int" args: "int" "int" */
-#define ULTRIX_SYS_setpgrp 82
-
-/* syscall: "setitimer" ret: "int" args: "u_int" "struct itimerval *" "struct itimerval *" */
-#define ULTRIX_SYS_setitimer 83
-
-/* syscall: "wait3" ret: "int" args: "int *" "int" "struct rusage *" */
-#define ULTRIX_SYS_wait3 84
-
-/* syscall: "swapon" ret: "int" args: "char *" */
-#define ULTRIX_SYS_swapon 85
-
-/* syscall: "getitimer" ret: "int" args: "u_int" "struct itimerval *" */
-#define ULTRIX_SYS_getitimer 86
-
-/* syscall: "gethostname" ret: "int" args: "char *" "u_int" */
-#define ULTRIX_SYS_gethostname 87
-
-/* syscall: "sethostname" ret: "int" args: "char *" "u_int" */
-#define ULTRIX_SYS_sethostname 88
-
-/* syscall: "getdtablesize" ret: "int" args: */
-#define ULTRIX_SYS_getdtablesize 89
-
-/* syscall: "dup2" ret: "int" args: "u_int" "u_int" */
-#define ULTRIX_SYS_dup2 90
-
-/* syscall: "fcntl" ret: "int" args: "int" "int" "void *" */
-#define ULTRIX_SYS_fcntl 92
-
-/* syscall: "select" ret: "int" args: "u_int" "fd_set *" "fd_set *" "fd_set *" "struct timeval *" */
-#define ULTRIX_SYS_select 93
-
-/* syscall: "fsync" ret: "int" args: "int" */
-#define ULTRIX_SYS_fsync 95
-
-/* syscall: "setpriority" ret: "int" args: "int" "int" "int" */
-#define ULTRIX_SYS_setpriority 96
-
-/* syscall: "socket" ret: "int" args: "int" "int" "int" */
-#define ULTRIX_SYS_socket 97
-
-/* syscall: "connect" ret: "int" args: "int" "caddr_t" "int" */
-#define ULTRIX_SYS_connect 98
-
-/* syscall: "accept" ret: "int" args: "int" "caddr_t" "int *" */
-#define ULTRIX_SYS_accept 99
-
-/* syscall: "getpriority" ret: "int" args: "int" "int" */
-#define ULTRIX_SYS_getpriority 100
-
-/* syscall: "send" ret: "int" args: "int" "caddr_t" "int" "int" */
-#define ULTRIX_SYS_send 101
-
-/* syscall: "recv" ret: "int" args: "int" "caddr_t" "int" "int" */
-#define ULTRIX_SYS_recv 102
-
-/* syscall: "sigreturn" ret: "int" args: "struct sigcontext *" */
-#define ULTRIX_SYS_sigreturn 103
-
-/* syscall: "bind" ret: "int" args: "int" "caddr_t" "int" */
-#define ULTRIX_SYS_bind 104
-
-/* syscall: "setsockopt" ret: "int" args: "int" "int" "int" "caddr_t" "int" */
-#define ULTRIX_SYS_setsockopt 105
-
-/* syscall: "listen" ret: "int" args: "int" "int" */
-#define ULTRIX_SYS_listen 106
-
-/* syscall: "sigvec" ret: "int" args: "int" "struct sigvec *" "struct sigvec *" */
-#define ULTRIX_SYS_sigvec 108
-
-/* syscall: "sigblock" ret: "int" args: "int" */
-#define ULTRIX_SYS_sigblock 109
-
-/* syscall: "sigsetmask" ret: "int" args: "int" */
-#define ULTRIX_SYS_sigsetmask 110
-
-/* syscall: "sigsuspend" ret: "int" args: "int" */
-#define ULTRIX_SYS_sigsuspend 111
-
-/* syscall: "sigstack" ret: "int" args: "struct sigstack *" "struct sigstack *" */
-#define ULTRIX_SYS_sigstack 112
-
-/* syscall: "recvmsg" ret: "int" args: "int" "struct omsghdr *" "int" */
-#define ULTRIX_SYS_recvmsg 113
-
-/* syscall: "sendmsg" ret: "int" args: "int" "caddr_t" "int" */
-#define ULTRIX_SYS_sendmsg 114
-
- /* 115 is obsolete vtrace */
-/* syscall: "gettimeofday" ret: "int" args: "struct timeval *" "struct timezone *" */
-#define ULTRIX_SYS_gettimeofday 116
-
-/* syscall: "getrusage" ret: "int" args: "int" "struct rusage *" */
-#define ULTRIX_SYS_getrusage 117
-
-/* syscall: "getsockopt" ret: "int" args: "int" "int" "int" "caddr_t" "int *" */
-#define ULTRIX_SYS_getsockopt 118
-
-/* syscall: "readv" ret: "int" args: "int" "struct iovec *" "u_int" */
-#define ULTRIX_SYS_readv 120
-
-/* syscall: "writev" ret: "int" args: "int" "struct iovec *" "u_int" */
-#define ULTRIX_SYS_writev 121
-
-/* syscall: "settimeofday" ret: "int" args: "struct timeval *" "struct timezone *" */
-#define ULTRIX_SYS_settimeofday 122
-
-/* syscall: "fchown" ret: "int" args: "int" "int" "int" */
-#define ULTRIX_SYS_fchown 123
-
-/* syscall: "fchmod" ret: "int" args: "int" "int" */
-#define ULTRIX_SYS_fchmod 124
-
-/* syscall: "recvfrom" ret: "int" args: "int" "caddr_t" "size_t" "int" "caddr_t" "int *" */
-#define ULTRIX_SYS_recvfrom 125
-
-/* syscall: "setreuid" ret: "int" args: "uid_t" "uid_t" */
-#define ULTRIX_SYS_setreuid 126
-
-/* syscall: "setregid" ret: "int" args: "gid_t" "gid_t" */
-#define ULTRIX_SYS_setregid 127
-
-/* syscall: "rename" ret: "int" args: "char *" "char *" */
-#define ULTRIX_SYS_rename 128
-
-/* syscall: "truncate" ret: "int" args: "char *" "long" */
-#define ULTRIX_SYS_truncate 129
-
-/* syscall: "ftruncate" ret: "int" args: "int" "long" */
-#define ULTRIX_SYS_ftruncate 130
-
-/* syscall: "flock" ret: "int" args: "int" "int" */
-#define ULTRIX_SYS_flock 131
-
-/* syscall: "sendto" ret: "int" args: "int" "caddr_t" "size_t" "int" "caddr_t" "int" */
-#define ULTRIX_SYS_sendto 133
-
-/* syscall: "shutdown" ret: "int" args: "int" "int" */
-#define ULTRIX_SYS_shutdown 134
-
-/* syscall: "socketpair" ret: "int" args: "int" "int" "int" "int *" */
-#define ULTRIX_SYS_socketpair 135
-
-/* syscall: "mkdir" ret: "int" args: "char *" "int" */
-#define ULTRIX_SYS_mkdir 136
-
-/* syscall: "rmdir" ret: "int" args: "char *" */
-#define ULTRIX_SYS_rmdir 137
-
-/* syscall: "utimes" ret: "int" args: "char *" "struct timeval *" */
-#define ULTRIX_SYS_utimes 138
-
-/* syscall: "sigcleanup" ret: "int" args: "struct sigcontext *" */
-#define ULTRIX_SYS_sigcleanup 139
-
-/* syscall: "adjtime" ret: "int" args: "struct timeval *" "struct timeval *" */
-#define ULTRIX_SYS_adjtime 140
-
-/* syscall: "getpeername" ret: "int" args: "int" "caddr_t" "int *" */
-#define ULTRIX_SYS_getpeername 141
-
-/* syscall: "gethostid" ret: "int" args: */
-#define ULTRIX_SYS_gethostid 142
-
-/* syscall: "getrlimit" ret: "int" args: "u_int" "struct orlimit *" */
-#define ULTRIX_SYS_getrlimit 144
-
-/* syscall: "setrlimit" ret: "int" args: "u_int" "struct orlimit *" */
-#define ULTRIX_SYS_setrlimit 145
-
-/* syscall: "killpg" ret: "int" args: "int" "int" */
-#define ULTRIX_SYS_killpg 146
-
-/* syscall: "getsockname" ret: "int" args: "int" "caddr_t" "int *" */
-#define ULTRIX_SYS_getsockname 150
-
-/* syscall: "nfssvc" ret: "int" args: "int" */
-#define ULTRIX_SYS_nfssvc 158
-
-/* syscall: "getdirentries" ret: "int" args: "int" "char *" "u_int" "long *" */
-#define ULTRIX_SYS_getdirentries 159
-
-/* syscall: "statfs" ret: "int" args: "char *" "struct ultrix_statfs *" */
-#define ULTRIX_SYS_statfs 160
-
-/* syscall: "fstatfs" ret: "int" args: "int" "struct ultrix_statfs *" */
-#define ULTRIX_SYS_fstatfs 161
-
-/* syscall: "async_daemon" ret: "int" args: */
-#define ULTRIX_SYS_async_daemon 163
-
-/* syscall: "getfh" ret: "int" args: "char *" "fhandle_t *" */
-#define ULTRIX_SYS_getfh 164
-
-/* syscall: "getdomainname" ret: "int" args: "char *" "int" */
-#define ULTRIX_SYS_getdomainname 165
-
-/* syscall: "setdomainname" ret: "int" args: "char *" "int" */
-#define ULTRIX_SYS_setdomainname 166
-
-/* syscall: "quotactl" ret: "int" args: "int" "char *" "int" "caddr_t" */
-#define ULTRIX_SYS_quotactl 168
-
-/* syscall: "exportfs" ret: "int" args: "char *" "char *" */
-#define ULTRIX_SYS_exportfs 169
-
-/* syscall: "uname" ret: "int" args: "struct ultrix_utsname *" */
-#define ULTRIX_SYS_uname 179
-
-/* syscall: "ustat" ret: "int" args: "int" "struct ultrix_ustat *" */
-#define ULTRIX_SYS_ustat 183
-
-/* syscall: "getmnt" ret: "int" args: "int *" "struct ultrix_fs_data *" "int" "int" "char *" */
-#define ULTRIX_SYS_getmnt 184
-
-/* syscall: "sigpending" ret: "int" args: "int *" */
-#define ULTRIX_SYS_sigpending 187
-
-/* syscall: "setsid" ret: "int" args: */
-#define ULTRIX_SYS_setsid 188
-
-/* syscall: "waitpid" ret: "int" args: "int" "int *" "int" */
-#define ULTRIX_SYS_waitpid 189
-
-/* syscall: "getsysinfo" ret: "int" args: "unsigned" "char *" "unsigned" "int *" "char *" */
-#define ULTRIX_SYS_getsysinfo 256
-
-/* syscall: "setsysinfo" ret: "int" args: "unsigned" "char *" "unsigned" "unsigned" "unsigned" */
-#define ULTRIX_SYS_setsysinfo 257
-
-#define ULTRIX_SYS_MAXSYSCALL 258
diff --git a/sys/compat/ultrix/ultrix_syscallargs.h b/sys/compat/ultrix/ultrix_syscallargs.h
deleted file mode 100644
index 899e4fadc2d..00000000000
--- a/sys/compat/ultrix/ultrix_syscallargs.h
+++ /dev/null
@@ -1,334 +0,0 @@
-/* $OpenBSD: ultrix_syscallargs.h,v 1.17 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.12 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 ultrix_sys_open_args {
- syscallarg(char *) path;
- syscallarg(int) flags;
- syscallarg(int) mode;
-};
-
-struct ultrix_sys_creat_args {
- syscallarg(char *) path;
- syscallarg(int) mode;
-};
-
-struct ultrix_sys_execv_args {
- syscallarg(char *) path;
- syscallarg(char **) argp;
-};
-
-struct ultrix_sys_mknod_args {
- syscallarg(char *) path;
- syscallarg(int) mode;
- syscallarg(int) dev;
-};
-
-struct ultrix_sys_mount_args {
- syscallarg(char *) special;
- syscallarg(char *) dir;
- syscallarg(int) rdonly;
- syscallarg(int) type;
- syscallarg(caddr_t) data;
-};
-
-struct ultrix_sys_access_args {
- syscallarg(char *) path;
- syscallarg(int) flags;
-};
-
-struct ultrix_sys_stat_args {
- syscallarg(char *) path;
- syscallarg(struct stat43 *) ub;
-};
-
-struct ultrix_sys_lstat_args {
- syscallarg(char *) path;
- syscallarg(struct stat43 *) ub;
-};
-
-struct ultrix_sys_ioctl_args {
- syscallarg(int) fd;
- syscallarg(u_long) com;
- syscallarg(caddr_t) data;
-};
-
-struct ultrix_sys_execve_args {
- syscallarg(char *) path;
- syscallarg(char **) argp;
- syscallarg(char **) envp;
-};
-
-struct ultrix_sys_mmap_args {
- syscallarg(caddr_t) addr;
- syscallarg(size_t) len;
- syscallarg(int) prot;
- syscallarg(u_int) flags;
- syscallarg(int) fd;
- syscallarg(long) pos;
-};
-
-struct ultrix_sys_setpgrp_args {
- syscallarg(int) pid;
- syscallarg(int) pgid;
-};
-
-struct ultrix_sys_wait3_args {
- syscallarg(int *) status;
- syscallarg(int) options;
- syscallarg(struct rusage *) rusage;
-};
-
-struct ultrix_sys_select_args {
- syscallarg(u_int) nd;
- syscallarg(fd_set *) in;
- syscallarg(fd_set *) ou;
- syscallarg(fd_set *) ex;
- syscallarg(struct timeval *) tv;
-};
-
-struct ultrix_sys_setsockopt_args {
- syscallarg(int) s;
- syscallarg(int) level;
- syscallarg(int) name;
- syscallarg(caddr_t) val;
- syscallarg(int) valsize;
-};
-
-struct ultrix_sys_sigcleanup_args {
- syscallarg(struct sigcontext *) sigcntxp;
-};
-
-struct ultrix_sys_nfssvc_args {
- syscallarg(int) fd;
-};
-
-struct ultrix_sys_statfs_args {
- syscallarg(char *) path;
- syscallarg(struct ultrix_statfs *) buf;
-};
-
-struct ultrix_sys_fstatfs_args {
- syscallarg(int) fd;
- syscallarg(struct ultrix_statfs *) buf;
-};
-
-struct ultrix_sys_quotactl_args {
- syscallarg(int) cmd;
- syscallarg(char *) special;
- syscallarg(int) uid;
- syscallarg(caddr_t) addr;
-};
-
-struct ultrix_sys_exportfs_args {
- syscallarg(char *) path;
- syscallarg(char *) ex;
-};
-
-struct ultrix_sys_uname_args {
- syscallarg(struct ultrix_utsname *) name;
-};
-
-struct ultrix_sys_ustat_args {
- syscallarg(int) dev;
- syscallarg(struct ultrix_ustat *) buf;
-};
-
-struct ultrix_sys_getmnt_args {
- syscallarg(int *) start;
- syscallarg(struct ultrix_fs_data *) buf;
- syscallarg(int) bufsize;
- syscallarg(int) mode;
- syscallarg(char *) path;
-};
-
-struct ultrix_sys_sigpending_args {
- syscallarg(int *) mask;
-};
-
-struct ultrix_sys_waitpid_args {
- syscallarg(int) pid;
- syscallarg(int *) status;
- syscallarg(int) options;
-};
-
-struct ultrix_sys_getsysinfo_args {
- syscallarg(unsigned) op;
- syscallarg(char *) buffer;
- syscallarg(unsigned) nbytes;
- syscallarg(int *) start;
- syscallarg(char *) arg;
-};
-
-struct ultrix_sys_setsysinfo_args {
- syscallarg(unsigned) op;
- syscallarg(char *) buffer;
- syscallarg(unsigned) nbytes;
- syscallarg(unsigned) arg;
- syscallarg(unsigned) 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 ultrix_sys_open(struct proc *, void *, register_t *);
-int sys_close(struct proc *, void *, register_t *);
-int compat_43_sys_wait(struct proc *, void *, register_t *);
-int ultrix_sys_creat(struct proc *, void *, register_t *);
-int sys_link(struct proc *, void *, register_t *);
-int sys_unlink(struct proc *, void *, register_t *);
-int ultrix_sys_execv(struct proc *, void *, register_t *);
-int sys_chdir(struct proc *, void *, register_t *);
-int ultrix_sys_mknod(struct proc *, void *, register_t *);
-int sys_chmod(struct proc *, void *, register_t *);
-int sys_lchown(struct proc *, void *, register_t *);
-int sys_obreak(struct proc *, void *, register_t *);
-int compat_43_sys_lseek(struct proc *, void *, register_t *);
-int sys_getpid(struct proc *, void *, register_t *);
-int ultrix_sys_mount(struct proc *, void *, register_t *);
-int sys_setuid(struct proc *, void *, register_t *);
-int sys_getuid(struct proc *, void *, register_t *);
-int ultrix_sys_access(struct proc *, void *, register_t *);
-int sys_sync(struct proc *, void *, register_t *);
-int sys_kill(struct proc *, void *, register_t *);
-int ultrix_sys_stat(struct proc *, void *, register_t *);
-int ultrix_sys_lstat(struct proc *, void *, register_t *);
-int sys_dup(struct proc *, void *, register_t *);
-int sys_opipe(struct proc *, void *, register_t *);
-int sys_profil(struct proc *, void *, register_t *);
-int sys_getgid(struct proc *, void *, register_t *);
-#ifdef ACCOUNTING
-int sys_acct(struct proc *, void *, register_t *);
-#else
-#endif
-int ultrix_sys_ioctl(struct proc *, void *, register_t *);
-int sys_reboot(struct proc *, void *, register_t *);
-int sys_symlink(struct proc *, void *, register_t *);
-int sys_readlink(struct proc *, void *, register_t *);
-int ultrix_sys_execve(struct proc *, void *, register_t *);
-int sys_umask(struct proc *, void *, register_t *);
-int sys_chroot(struct proc *, void *, register_t *);
-int compat_43_sys_fstat(struct proc *, void *, register_t *);
-int compat_43_sys_getpagesize(struct proc *, void *, register_t *);
-int sys_vfork(struct proc *, void *, register_t *);
-int sys_sbrk(struct proc *, void *, register_t *);
-int sys_sstk(struct proc *, void *, register_t *);
-int ultrix_sys_mmap(struct proc *, void *, register_t *);
-int sys_munmap(struct proc *, void *, register_t *);
-int sys_mprotect(struct proc *, void *, register_t *);
-int sys_madvise(struct proc *, void *, register_t *);
-int ultrix_sys_vhangup(struct proc *, void *, register_t *);
-int sys_mincore(struct proc *, void *, register_t *);
-int sys_getgroups(struct proc *, void *, register_t *);
-int sys_setgroups(struct proc *, void *, register_t *);
-int sys_getpgrp(struct proc *, void *, register_t *);
-int ultrix_sys_setpgrp(struct proc *, void *, register_t *);
-int sys_setitimer(struct proc *, void *, register_t *);
-int ultrix_sys_wait3(struct proc *, void *, register_t *);
-int compat_25_sys_swapon(struct proc *, void *, register_t *);
-int sys_getitimer(struct proc *, void *, register_t *);
-int compat_43_sys_gethostname(struct proc *, void *, register_t *);
-int compat_43_sys_sethostname(struct proc *, void *, register_t *);
-int compat_43_sys_getdtablesize(struct proc *, void *, register_t *);
-int sys_dup2(struct proc *, void *, register_t *);
-int sys_fcntl(struct proc *, void *, register_t *);
-int ultrix_sys_select(struct proc *, void *, register_t *);
-int sys_fsync(struct proc *, void *, register_t *);
-int sys_setpriority(struct proc *, void *, register_t *);
-int sys_socket(struct proc *, void *, register_t *);
-int sys_connect(struct proc *, void *, register_t *);
-int compat_43_sys_accept(struct proc *, void *, register_t *);
-int sys_getpriority(struct proc *, void *, register_t *);
-int compat_43_sys_send(struct proc *, void *, register_t *);
-int compat_43_sys_recv(struct proc *, void *, register_t *);
-int sys_sigreturn(struct proc *, void *, register_t *);
-int sys_bind(struct proc *, void *, register_t *);
-int ultrix_sys_setsockopt(struct proc *, void *, register_t *);
-int sys_listen(struct proc *, void *, register_t *);
-int compat_43_sys_sigvec(struct proc *, void *, register_t *);
-int compat_43_sys_sigblock(struct proc *, void *, register_t *);
-int compat_43_sys_sigsetmask(struct proc *, void *, register_t *);
-int sys_sigsuspend(struct proc *, void *, register_t *);
-int compat_43_sys_sigstack(struct proc *, void *, register_t *);
-int compat_43_sys_recvmsg(struct proc *, void *, register_t *);
-int compat_43_sys_sendmsg(struct proc *, void *, register_t *);
-int sys_gettimeofday(struct proc *, void *, register_t *);
-int sys_getrusage(struct proc *, void *, register_t *);
-int sys_getsockopt(struct proc *, void *, register_t *);
-int sys_readv(struct proc *, void *, register_t *);
-int sys_writev(struct proc *, void *, register_t *);
-int sys_settimeofday(struct proc *, void *, register_t *);
-int sys_fchown(struct proc *, void *, register_t *);
-int sys_fchmod(struct proc *, void *, register_t *);
-int compat_43_sys_recvfrom(struct proc *, void *, register_t *);
-int sys_setreuid(struct proc *, void *, register_t *);
-int sys_setregid(struct proc *, void *, register_t *);
-int sys_rename(struct proc *, void *, register_t *);
-int compat_43_sys_truncate(struct proc *, void *, register_t *);
-int compat_43_sys_ftruncate(struct proc *, void *, register_t *);
-int sys_flock(struct proc *, void *, register_t *);
-int sys_sendto(struct proc *, void *, register_t *);
-int sys_shutdown(struct proc *, void *, register_t *);
-int sys_socketpair(struct proc *, void *, register_t *);
-int sys_mkdir(struct proc *, void *, register_t *);
-int sys_rmdir(struct proc *, void *, register_t *);
-int sys_utimes(struct proc *, void *, register_t *);
-int ultrix_sys_sigcleanup(struct proc *, void *, register_t *);
-int sys_adjtime(struct proc *, void *, register_t *);
-int compat_43_sys_getpeername(struct proc *, void *, register_t *);
-int compat_43_sys_gethostid(struct proc *, void *, register_t *);
-int compat_43_sys_getrlimit(struct proc *, void *, register_t *);
-int compat_43_sys_setrlimit(struct proc *, void *, register_t *);
-int compat_43_sys_killpg(struct proc *, void *, register_t *);
-int compat_43_sys_getsockname(struct proc *, void *, register_t *);
-#ifdef NFSSERVER
-int ultrix_sys_nfssvc(struct proc *, void *, register_t *);
-#else
-#endif
-int compat_43_sys_getdirentries(struct proc *, void *, register_t *);
-int ultrix_sys_statfs(struct proc *, void *, register_t *);
-int ultrix_sys_fstatfs(struct proc *, void *, register_t *);
-#ifdef NFSCLIENT
-int async_daemon(struct proc *, void *, register_t *);
-int sys_getfh(struct proc *, void *, register_t *);
-#else
-#endif
-int compat_09_sys_getdomainname(struct proc *, void *, register_t *);
-int compat_09_sys_setdomainname(struct proc *, void *, register_t *);
-int ultrix_sys_quotactl(struct proc *, void *, register_t *);
-int ultrix_sys_exportfs(struct proc *, void *, register_t *);
-int ultrix_sys_uname(struct proc *, void *, register_t *);
-int ultrix_sys_ustat(struct proc *, void *, register_t *);
-int ultrix_sys_getmnt(struct proc *, void *, register_t *);
-int ultrix_sys_sigpending(struct proc *, void *, register_t *);
-int sys_setsid(struct proc *, void *, register_t *);
-int ultrix_sys_waitpid(struct proc *, void *, register_t *);
-int ultrix_sys_getsysinfo(struct proc *, void *, register_t *);
-int ultrix_sys_setsysinfo(struct proc *, void *, register_t *);
diff --git a/sys/compat/ultrix/ultrix_syscalls.c b/sys/compat/ultrix/ultrix_syscalls.c
deleted file mode 100644
index 8ef4496014e..00000000000
--- a/sys/compat/ultrix/ultrix_syscalls.c
+++ /dev/null
@@ -1,282 +0,0 @@
-/* $OpenBSD: ultrix_syscalls.c,v 1.16 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.12 2008/01/05 00:36:13 miod Exp
- */
-
-char *ultrix_syscallnames[] = {
- "syscall", /* 0 = syscall */
- "exit", /* 1 = exit */
- "fork", /* 2 = fork */
- "read", /* 3 = read */
- "write", /* 4 = write */
- "open", /* 5 = open */
- "close", /* 6 = close */
- "owait", /* 7 = owait */
- "creat", /* 8 = creat */
- "link", /* 9 = link */
- "unlink", /* 10 = unlink */
- "execv", /* 11 = execv */
- "chdir", /* 12 = chdir */
- "#13 (obsolete time)", /* 13 = obsolete time */
- "mknod", /* 14 = mknod */
- "chmod", /* 15 = chmod */
- "lchown", /* 16 = lchown */
- "break", /* 17 = break */
- "#18 (obsolete stat)", /* 18 = obsolete stat */
- "lseek", /* 19 = lseek */
- "getpid", /* 20 = getpid */
- "mount", /* 21 = mount */
- "#22 (obsolete sysV_unmount)", /* 22 = obsolete sysV_unmount */
- "setuid", /* 23 = setuid */
- "getuid", /* 24 = getuid */
- "#25 (obsolete v7 stime)", /* 25 = obsolete v7 stime */
- "#26 (obsolete v7 ptrace)", /* 26 = obsolete v7 ptrace */
- "#27 (obsolete v7 alarm)", /* 27 = obsolete v7 alarm */
- "#28 (obsolete v7 fstat)", /* 28 = obsolete v7 fstat */
- "#29 (obsolete v7 pause)", /* 29 = obsolete v7 pause */
- "#30 (obsolete v7 utime)", /* 30 = obsolete v7 utime */
- "#31 (obsolete v7 stty)", /* 31 = obsolete v7 stty */
- "#32 (obsolete v7 gtty)", /* 32 = obsolete v7 gtty */
- "access", /* 33 = access */
- "#34 (obsolete v7 nice)", /* 34 = obsolete v7 nice */
- "#35 (obsolete v7 ftime)", /* 35 = obsolete v7 ftime */
- "sync", /* 36 = sync */
- "kill", /* 37 = kill */
- "stat43", /* 38 = stat43 */
- "#39 (obsolete v7 setpgrp)", /* 39 = obsolete v7 setpgrp */
- "olstat", /* 40 = olstat */
- "dup", /* 41 = dup */
- "opipe", /* 42 = opipe */
- "#43 (obsolete v7 times)", /* 43 = obsolete v7 times */
- "profil", /* 44 = profil */
- "#45 (unimplemented)", /* 45 = unimplemented */
- "#46 (obsolete v7 setgid)", /* 46 = obsolete v7 setgid */
- "getgid", /* 47 = getgid */
- "#48 (unimplemented ssig)", /* 48 = unimplemented ssig */
- "#49 (unimplemented reserved for USG)", /* 49 = unimplemented reserved for USG */
- "#50 (unimplemented reserved for USG)", /* 50 = unimplemented reserved for USG */
-#ifdef ACCOUNTING
- "acct", /* 51 = acct */
-#else
- "#51 (unimplemented acct)", /* 51 = unimplemented acct */
-#endif
- "#52 (unimplemented)", /* 52 = unimplemented */
- "#53 (unimplemented syslock)", /* 53 = unimplemented syslock */
- "ioctl", /* 54 = ioctl */
- "reboot", /* 55 = reboot */
- "#56 (unimplemented v7 mpxchan)", /* 56 = unimplemented v7 mpxchan */
- "symlink", /* 57 = symlink */
- "readlink", /* 58 = readlink */
- "execve", /* 59 = execve */
- "umask", /* 60 = umask */
- "chroot", /* 61 = chroot */
- "fstat", /* 62 = fstat */
- "#63 (unimplemented)", /* 63 = unimplemented */
- "getpagesize", /* 64 = getpagesize */
- "#65 (unimplemented mremap)", /* 65 = unimplemented mremap */
- "vfork", /* 66 = vfork */
- "#67 (obsolete vread)", /* 67 = obsolete vread */
- "#68 (obsolete vwrite)", /* 68 = obsolete vwrite */
- "sbrk", /* 69 = sbrk */
- "sstk", /* 70 = sstk */
- "mmap", /* 71 = mmap */
- "#72 (obsolete vadvise)", /* 72 = obsolete vadvise */
- "munmap", /* 73 = munmap */
- "mprotect", /* 74 = mprotect */
- "madvise", /* 75 = madvise */
- "vhangup", /* 76 = vhangup */
- "#77 (unimplemented old vlimit)", /* 77 = unimplemented old vlimit */
- "mincore", /* 78 = mincore */
- "getgroups", /* 79 = getgroups */
- "setgroups", /* 80 = setgroups */
- "getpgrp", /* 81 = getpgrp */
- "setpgrp", /* 82 = setpgrp */
- "setitimer", /* 83 = setitimer */
- "wait3", /* 84 = wait3 */
- "swapon", /* 85 = swapon */
- "getitimer", /* 86 = getitimer */
- "gethostname", /* 87 = gethostname */
- "sethostname", /* 88 = sethostname */
- "getdtablesize", /* 89 = getdtablesize */
- "dup2", /* 90 = dup2 */
- "#91 (unimplemented getdopt)", /* 91 = unimplemented getdopt */
- "fcntl", /* 92 = fcntl */
- "select", /* 93 = select */
- "#94 (unimplemented setdopt)", /* 94 = unimplemented setdopt */
- "fsync", /* 95 = fsync */
- "setpriority", /* 96 = setpriority */
- "socket", /* 97 = socket */
- "connect", /* 98 = connect */
- "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 vtimes)", /* 107 = unimplemented vtimes */
- "sigvec", /* 108 = sigvec */
- "sigblock", /* 109 = sigblock */
- "sigsetmask", /* 110 = sigsetmask */
- "sigsuspend", /* 111 = sigsuspend */
- "sigstack", /* 112 = sigstack */
- "recvmsg", /* 113 = recvmsg */
- "sendmsg", /* 114 = sendmsg */
- "#115 (obsolete vtrace)", /* 115 = obsolete vtrace */
- "gettimeofday", /* 116 = gettimeofday */
- "getrusage", /* 117 = getrusage */
- "getsockopt", /* 118 = getsockopt */
- "#119 (unimplemented resuba)", /* 119 = unimplemented resuba */
- "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 */
- "flock", /* 131 = flock */
- "#132 (unimplemented)", /* 132 = unimplemented */
- "sendto", /* 133 = sendto */
- "shutdown", /* 134 = shutdown */
- "socketpair", /* 135 = socketpair */
- "mkdir", /* 136 = mkdir */
- "rmdir", /* 137 = rmdir */
- "utimes", /* 138 = utimes */
- "sigcleanup", /* 139 = sigcleanup */
- "adjtime", /* 140 = adjtime */
- "getpeername", /* 141 = getpeername */
- "gethostid", /* 142 = gethostid */
- "#143 (unimplemented old sethostid)", /* 143 = unimplemented old sethostid */
- "getrlimit", /* 144 = getrlimit */
- "setrlimit", /* 145 = setrlimit */
- "killpg", /* 146 = killpg */
- "#147 (unimplemented)", /* 147 = unimplemented */
- "#148 (unimplemented setquota)", /* 148 = unimplemented setquota */
- "#149 (unimplemented quota / * needs to be nullop to boot on Ultrix root partition * /)", /* 149 = unimplemented quota / * needs to be nullop to boot on Ultrix root partition * / */
- "getsockname", /* 150 = getsockname */
- "#151 (unimplemented sysmips / * 4 args * /)", /* 151 = unimplemented sysmips / * 4 args * / */
- "#152 (unimplemented cacheflush / * 4 args * /)", /* 152 = unimplemented cacheflush / * 4 args * / */
- "#153 (unimplemented cachectl / * 3 args * /)", /* 153 = unimplemented cachectl / * 3 args * / */
- "#154 (unimplemented)", /* 154 = unimplemented */
- "#155 (unimplemented atomic_op)", /* 155 = unimplemented atomic_op */
- "#156 (unimplemented)", /* 156 = unimplemented */
- "#157 (unimplemented)", /* 157 = unimplemented */
-#ifdef NFSSERVER
- "nfssvc", /* 158 = nfssvc */
-#else
- "#158 (unimplemented)", /* 158 = unimplemented */
-#endif
- "getdirentries", /* 159 = getdirentries */
- "statfs", /* 160 = statfs */
- "fstatfs", /* 161 = fstatfs */
- "#162 (unimplemented umount)", /* 162 = unimplemented umount */
-#ifdef NFSCLIENT
- "async_daemon", /* 163 = async_daemon */
- "getfh", /* 164 = getfh */
-#else
- "#163 (unimplemented async_daemon)", /* 163 = unimplemented async_daemon */
- "#164 (unimplemented getfh)", /* 164 = unimplemented getfh */
-#endif
- "getdomainname", /* 165 = getdomainname */
- "setdomainname", /* 166 = setdomainname */
- "#167 (unimplemented)", /* 167 = unimplemented */
- "quotactl", /* 168 = quotactl */
- "exportfs", /* 169 = exportfs */
- "#170 (unimplemented { int ultrix_sys_mount ( char * special , char * dir , int rdonly , int type , caddr_t data ) ; })", /* 170 = unimplemented { int ultrix_sys_mount ( char * special , char * dir , int rdonly , int type , caddr_t data ) ; } */
- "#171 (unimplemented 4 hdwconf)", /* 171 = unimplemented 4 hdwconf */
- "#172 (unimplemented msgctl)", /* 172 = unimplemented msgctl */
- "#173 (unimplemented msgget)", /* 173 = unimplemented msgget */
- "#174 (unimplemented msgrcv)", /* 174 = unimplemented msgrcv */
- "#175 (unimplemented msgsnd)", /* 175 = unimplemented msgsnd */
- "#176 (unimplemented semctl)", /* 176 = unimplemented semctl */
- "#177 (unimplemented semget)", /* 177 = unimplemented semget */
- "#178 (unimplemented semop)", /* 178 = unimplemented semop */
- "uname", /* 179 = uname */
- "#180 (unimplemented shmsys)", /* 180 = unimplemented shmsys */
- "#181 (unimplemented 0 plock)", /* 181 = unimplemented 0 plock */
- "#182 (unimplemented 0 lockf)", /* 182 = unimplemented 0 lockf */
- "ustat", /* 183 = ustat */
- "getmnt", /* 184 = getmnt */
- "#185 (unimplemented notdef)", /* 185 = unimplemented notdef */
- "#186 (unimplemented notdef)", /* 186 = unimplemented notdef */
- "sigpending", /* 187 = sigpending */
- "setsid", /* 188 = setsid */
- "waitpid", /* 189 = waitpid */
- "#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)", /* 199 = unimplemented */
- "#200 (unimplemented)", /* 200 = unimplemented */
- "#201 (unimplemented)", /* 201 = unimplemented */
- "#202 (unimplemented)", /* 202 = unimplemented */
- "#203 (unimplemented)", /* 203 = unimplemented */
- "#204 (unimplemented)", /* 204 = unimplemented */
- "#205 (unimplemented)", /* 205 = unimplemented */
- "#206 (unimplemented)", /* 206 = unimplemented */
- "#207 (unimplemented)", /* 207 = unimplemented */
- "#208 (unimplemented)", /* 208 = unimplemented */
- "#209 (unimplemented)", /* 209 = unimplemented */
- "#210 (unimplemented)", /* 210 = unimplemented */
- "#211 (unimplemented)", /* 211 = unimplemented */
- "#212 (unimplemented)", /* 212 = unimplemented */
- "#213 (unimplemented)", /* 213 = unimplemented */
- "#214 (unimplemented)", /* 214 = unimplemented */
- "#215 (unimplemented)", /* 215 = unimplemented */
- "#216 (unimplemented)", /* 216 = unimplemented */
- "#217 (unimplemented)", /* 217 = unimplemented */
- "#218 (unimplemented)", /* 218 = unimplemented */
- "#219 (unimplemented)", /* 219 = unimplemented */
- "#220 (unimplemented)", /* 220 = unimplemented */
- "#221 (unimplemented)", /* 221 = unimplemented */
- "#222 (unimplemented)", /* 222 = unimplemented */
- "#223 (unimplemented)", /* 223 = unimplemented */
- "#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 1 utc_gettime)", /* 233 = unimplemented 1 utc_gettime */
- "#234 (unimplemented 2 utc_adjtime)", /* 234 = unimplemented 2 utc_adjtime */
- "#235 (unimplemented)", /* 235 = unimplemented */
- "#236 (unimplemented)", /* 236 = unimplemented */
- "#237 (unimplemented)", /* 237 = unimplemented */
- "#238 (unimplemented)", /* 238 = unimplemented */
- "#239 (unimplemented)", /* 239 = unimplemented */
- "#240 (unimplemented)", /* 240 = unimplemented */
- "#241 (unimplemented)", /* 241 = unimplemented */
- "#242 (unimplemented)", /* 242 = unimplemented */
- "#243 (unimplemented)", /* 243 = unimplemented */
- "#244 (unimplemented)", /* 244 = unimplemented */
- "#245 (unimplemented)", /* 245 = unimplemented */
- "#246 (unimplemented)", /* 246 = unimplemented */
- "#247 (unimplemented)", /* 247 = unimplemented */
- "#248 (unimplemented)", /* 248 = unimplemented */
- "#249 (unimplemented)", /* 249 = unimplemented */
- "#250 (unimplemented)", /* 250 = unimplemented */
- "#251 (unimplemented)", /* 251 = unimplemented */
- "#252 (unimplemented audctl / * Make no-op for installation on Ultrix rootpartition? * /)", /* 252 = unimplemented audctl / * Make no-op for installation on Ultrix rootpartition? * / */
- "#253 (unimplemented audgen / * Make no-op for installation on Ultrix rootpartition? * /)", /* 253 = unimplemented audgen / * Make no-op for installation on Ultrix rootpartition? * / */
- "#254 (unimplemented startcpu)", /* 254 = unimplemented startcpu */
- "#255 (unimplemented stopcpu)", /* 255 = unimplemented stopcpu */
- "getsysinfo", /* 256 = getsysinfo */
- "setsysinfo", /* 257 = setsysinfo */
-};
diff --git a/sys/compat/ultrix/ultrix_sysent.c b/sys/compat/ultrix/ultrix_sysent.c
deleted file mode 100644
index b74d0eb4fb0..00000000000
--- a/sys/compat/ultrix/ultrix_sysent.c
+++ /dev/null
@@ -1,554 +0,0 @@
-/* $OpenBSD: ultrix_sysent.c,v 1.16 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.12 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/syscallargs.h>
-#include <compat/ultrix/ultrix_syscallargs.h>
-
-#define s(type) sizeof(type)
-
-struct sysent ultrix_sysent[] = {
- { 0, 0, 0,
- sys_nosys }, /* 0 = syscall */
- { 1, s(struct sys_exit_args), 0,
- sys_exit }, /* 1 = exit */
- { 0, 0, 0,
- sys_fork }, /* 2 = fork */
- { 3, s(struct sys_read_args), 0,
- sys_read }, /* 3 = read */
- { 3, s(struct sys_write_args), 0,
- sys_write }, /* 4 = write */
- { 3, s(struct ultrix_sys_open_args), 0,
- ultrix_sys_open }, /* 5 = open */
- { 1, s(struct sys_close_args), 0,
- sys_close }, /* 6 = close */
- { 0, 0, 0,
- compat_43_sys_wait }, /* 7 = owait */
- { 2, s(struct ultrix_sys_creat_args), 0,
- ultrix_sys_creat }, /* 8 = creat */
- { 2, s(struct sys_link_args), 0,
- sys_link }, /* 9 = link */
- { 1, s(struct sys_unlink_args), 0,
- sys_unlink }, /* 10 = unlink */
- { 2, s(struct ultrix_sys_execv_args), 0,
- ultrix_sys_execv }, /* 11 = execv */
- { 1, s(struct sys_chdir_args), 0,
- sys_chdir }, /* 12 = chdir */
- { 0, 0, 0,
- sys_nosys }, /* 13 = obsolete time */
- { 3, s(struct ultrix_sys_mknod_args), 0,
- ultrix_sys_mknod }, /* 14 = mknod */
- { 2, s(struct sys_chmod_args), 0,
- sys_chmod }, /* 15 = chmod */
- { 3, s(struct sys_lchown_args), 0,
- sys_lchown }, /* 16 = lchown */
- { 1, s(struct sys_obreak_args), 0,
- sys_obreak }, /* 17 = break */
- { 0, 0, 0,
- sys_nosys }, /* 18 = obsolete stat */
- { 3, s(struct compat_43_sys_lseek_args), 0,
- compat_43_sys_lseek }, /* 19 = lseek */
- { 0, 0, 0,
- sys_getpid }, /* 20 = getpid */
- { 5, s(struct ultrix_sys_mount_args), 0,
- ultrix_sys_mount }, /* 21 = mount */
- { 0, 0, 0,
- sys_nosys }, /* 22 = obsolete sysV_unmount */
- { 1, s(struct sys_setuid_args), 0,
- sys_setuid }, /* 23 = setuid */
- { 0, 0, 0,
- sys_getuid }, /* 24 = getuid */
- { 0, 0, 0,
- sys_nosys }, /* 25 = obsolete v7 stime */
- { 0, 0, 0,
- sys_nosys }, /* 26 = obsolete v7 ptrace */
- { 0, 0, 0,
- sys_nosys }, /* 27 = obsolete v7 alarm */
- { 0, 0, 0,
- sys_nosys }, /* 28 = obsolete v7 fstat */
- { 0, 0, 0,
- sys_nosys }, /* 29 = obsolete v7 pause */
- { 0, 0, 0,
- sys_nosys }, /* 30 = obsolete v7 utime */
- { 0, 0, 0,
- sys_nosys }, /* 31 = obsolete v7 stty */
- { 0, 0, 0,
- sys_nosys }, /* 32 = obsolete v7 gtty */
- { 2, s(struct ultrix_sys_access_args), 0,
- ultrix_sys_access }, /* 33 = access */
- { 0, 0, 0,
- sys_nosys }, /* 34 = obsolete v7 nice */
- { 0, 0, 0,
- sys_nosys }, /* 35 = obsolete v7 ftime */
- { 0, 0, 0,
- sys_sync }, /* 36 = sync */
- { 2, s(struct sys_kill_args), 0,
- sys_kill }, /* 37 = kill */
- { 2, s(struct ultrix_sys_stat_args), 0,
- ultrix_sys_stat }, /* 38 = stat43 */
- { 0, 0, 0,
- sys_nosys }, /* 39 = obsolete v7 setpgrp */
- { 2, s(struct ultrix_sys_lstat_args), 0,
- ultrix_sys_lstat }, /* 40 = olstat */
- { 1, s(struct sys_dup_args), 0,
- sys_dup }, /* 41 = dup */
- { 0, 0, 0,
- sys_opipe }, /* 42 = opipe */
- { 0, 0, 0,
- sys_nosys }, /* 43 = obsolete v7 times */
- { 4, s(struct sys_profil_args), 0,
- sys_profil }, /* 44 = profil */
- { 0, 0, 0,
- sys_nosys }, /* 45 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 46 = obsolete v7 setgid */
- { 0, 0, 0,
- sys_getgid }, /* 47 = getgid */
- { 0, 0, 0,
- sys_nosys }, /* 48 = unimplemented ssig */
- { 0, 0, 0,
- sys_nosys }, /* 49 = unimplemented reserved for USG */
- { 0, 0, 0,
- sys_nosys }, /* 50 = unimplemented reserved for USG */
-#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 */
- { 0, 0, 0,
- sys_nosys }, /* 53 = unimplemented syslock */
- { 3, s(struct ultrix_sys_ioctl_args), 0,
- ultrix_sys_ioctl }, /* 54 = ioctl */
- { 1, s(struct sys_reboot_args), 0,
- sys_reboot }, /* 55 = reboot */
- { 0, 0, 0,
- sys_nosys }, /* 56 = unimplemented v7 mpxchan */
- { 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 ultrix_sys_execve_args), 0,
- ultrix_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 */
- { 2, s(struct compat_43_sys_fstat_args), 0,
- compat_43_sys_fstat }, /* 62 = fstat */
- { 0, 0, 0,
- sys_nosys }, /* 63 = unimplemented */
- { 0, 0, 0,
- compat_43_sys_getpagesize }, /* 64 = getpagesize */
- { 0, 0, 0,
- sys_nosys }, /* 65 = unimplemented mremap */
- { 0, 0, 0,
- sys_vfork }, /* 66 = vfork */
- { 0, 0, 0,
- sys_nosys }, /* 67 = obsolete vread */
- { 0, 0, 0,
- sys_nosys }, /* 68 = obsolete vwrite */
- { 1, s(struct sys_sbrk_args), 0,
- sys_sbrk }, /* 69 = sbrk */
- { 1, s(struct sys_sstk_args), 0,
- sys_sstk }, /* 70 = sstk */
- { 6, s(struct ultrix_sys_mmap_args), 0,
- ultrix_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 sys_mprotect_args), 0,
- sys_mprotect }, /* 74 = mprotect */
- { 3, s(struct sys_madvise_args), 0,
- sys_madvise }, /* 75 = madvise */
- { 0, 0, 0,
- ultrix_sys_vhangup }, /* 76 = vhangup */
- { 0, 0, 0,
- sys_nosys }, /* 77 = unimplemented old vlimit */
- { 3, s(struct sys_mincore_args), 0,
- sys_mincore }, /* 78 = mincore */
- { 2, s(struct sys_getgroups_args), 0,
- sys_getgroups }, /* 79 = getgroups */
- { 2, s(struct sys_setgroups_args), 0,
- sys_setgroups }, /* 80 = setgroups */
- { 0, 0, 0,
- sys_getpgrp }, /* 81 = getpgrp */
- { 2, s(struct ultrix_sys_setpgrp_args), 0,
- ultrix_sys_setpgrp }, /* 82 = setpgrp */
- { 3, s(struct sys_setitimer_args), 0,
- sys_setitimer }, /* 83 = setitimer */
- { 3, s(struct ultrix_sys_wait3_args), 0,
- ultrix_sys_wait3 }, /* 84 = wait3 */
- { 1, s(struct compat_25_sys_swapon_args), 0,
- compat_25_sys_swapon }, /* 85 = swapon */
- { 2, s(struct sys_getitimer_args), 0,
- sys_getitimer }, /* 86 = getitimer */
- { 2, s(struct compat_43_sys_gethostname_args), 0,
- compat_43_sys_gethostname }, /* 87 = 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 */
- { 0, 0, 0,
- sys_nosys }, /* 91 = unimplemented getdopt */
- { 3, s(struct sys_fcntl_args), 0,
- sys_fcntl }, /* 92 = fcntl */
- { 5, s(struct ultrix_sys_select_args), 0,
- ultrix_sys_select }, /* 93 = select */
- { 0, 0, 0,
- sys_nosys }, /* 94 = unimplemented setdopt */
- { 1, s(struct sys_fsync_args), 0,
- sys_fsync }, /* 95 = fsync */
- { 3, s(struct sys_setpriority_args), 0,
- sys_setpriority }, /* 96 = setpriority */
- { 3, s(struct sys_socket_args), 0,
- sys_socket }, /* 97 = socket */
- { 3, s(struct sys_connect_args), 0,
- sys_connect }, /* 98 = connect */
- { 3, s(struct compat_43_sys_accept_args), 0,
- compat_43_sys_accept }, /* 99 = 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 ultrix_sys_setsockopt_args), 0,
- ultrix_sys_setsockopt }, /* 105 = setsockopt */
- { 2, s(struct sys_listen_args), 0,
- sys_listen }, /* 106 = listen */
- { 0, 0, 0,
- sys_nosys }, /* 107 = unimplemented vtimes */
- { 3, s(struct compat_43_sys_sigvec_args), 0,
- compat_43_sys_sigvec }, /* 108 = sigvec */
- { 1, s(struct compat_43_sys_sigblock_args), 0,
- compat_43_sys_sigblock }, /* 109 = sigblock */
- { 1, s(struct compat_43_sys_sigsetmask_args), 0,
- compat_43_sys_sigsetmask }, /* 110 = 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 */
- { 3, s(struct compat_43_sys_recvmsg_args), 0,
- compat_43_sys_recvmsg }, /* 113 = recvmsg */
- { 3, s(struct compat_43_sys_sendmsg_args), 0,
- compat_43_sys_sendmsg }, /* 114 = sendmsg */
- { 0, 0, 0,
- sys_nosys }, /* 115 = obsolete vtrace */
- { 2, s(struct sys_gettimeofday_args), 0,
- sys_gettimeofday }, /* 116 = gettimeofday */
- { 2, s(struct sys_getrusage_args), 0,
- sys_getrusage }, /* 117 = getrusage */
- { 5, s(struct sys_getsockopt_args), 0,
- sys_getsockopt }, /* 118 = getsockopt */
- { 0, 0, 0,
- sys_nosys }, /* 119 = unimplemented resuba */
- { 3, s(struct sys_readv_args), 0,
- sys_readv }, /* 120 = readv */
- { 3, s(struct sys_writev_args), 0,
- sys_writev }, /* 121 = writev */
- { 2, s(struct sys_settimeofday_args), 0,
- sys_settimeofday }, /* 122 = settimeofday */
- { 3, s(struct sys_fchown_args), 0,
- sys_fchown }, /* 123 = fchown */
- { 2, s(struct sys_fchmod_args), 0,
- sys_fchmod }, /* 124 = fchmod */
- { 6, s(struct compat_43_sys_recvfrom_args), 0,
- compat_43_sys_recvfrom }, /* 125 = 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 compat_43_sys_truncate_args), 0,
- compat_43_sys_truncate }, /* 129 = truncate */
- { 2, s(struct compat_43_sys_ftruncate_args), 0,
- compat_43_sys_ftruncate }, /* 130 = ftruncate */
- { 2, s(struct sys_flock_args), 0,
- sys_flock }, /* 131 = flock */
- { 0, 0, 0,
- sys_nosys }, /* 132 = unimplemented */
- { 6, s(struct sys_sendto_args), 0,
- sys_sendto }, /* 133 = sendto */
- { 2, s(struct sys_shutdown_args), 0,
- sys_shutdown }, /* 134 = shutdown */
- { 4, s(struct sys_socketpair_args), 0,
- sys_socketpair }, /* 135 = socketpair */
- { 2, s(struct sys_mkdir_args), 0,
- sys_mkdir }, /* 136 = mkdir */
- { 1, s(struct sys_rmdir_args), 0,
- sys_rmdir }, /* 137 = rmdir */
- { 2, s(struct sys_utimes_args), 0,
- sys_utimes }, /* 138 = utimes */
- { 1, s(struct ultrix_sys_sigcleanup_args), 0,
- ultrix_sys_sigcleanup }, /* 139 = sigcleanup */
- { 2, s(struct sys_adjtime_args), 0,
- sys_adjtime }, /* 140 = adjtime */
- { 3, s(struct compat_43_sys_getpeername_args), 0,
- compat_43_sys_getpeername }, /* 141 = getpeername */
- { 0, 0, 0,
- compat_43_sys_gethostid }, /* 142 = gethostid */
- { 0, 0, 0,
- sys_nosys }, /* 143 = unimplemented old sethostid */
- { 2, s(struct compat_43_sys_getrlimit_args), 0,
- compat_43_sys_getrlimit }, /* 144 = getrlimit */
- { 2, s(struct compat_43_sys_setrlimit_args), 0,
- compat_43_sys_setrlimit }, /* 145 = setrlimit */
- { 2, s(struct compat_43_sys_killpg_args), 0,
- compat_43_sys_killpg }, /* 146 = killpg */
- { 0, 0, 0,
- sys_nosys }, /* 147 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 148 = unimplemented setquota */
- { 0, 0, 0,
- sys_nosys }, /* 149 = unimplemented quota / * needs to be nullop to boot on Ultrix root partition * / */
- { 3, s(struct compat_43_sys_getsockname_args), 0,
- compat_43_sys_getsockname }, /* 150 = getsockname */
- { 0, 0, 0,
- sys_nosys }, /* 151 = unimplemented sysmips / * 4 args * / */
- { 0, 0, 0,
- sys_nosys }, /* 152 = unimplemented cacheflush / * 4 args * / */
- { 0, 0, 0,
- sys_nosys }, /* 153 = unimplemented cachectl / * 3 args * / */
- { 0, 0, 0,
- sys_nosys }, /* 154 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 155 = unimplemented atomic_op */
- { 0, 0, 0,
- sys_nosys }, /* 156 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 157 = unimplemented */
-#ifdef NFSSERVER
- { 1, s(struct ultrix_sys_nfssvc_args), 0,
- ultrix_sys_nfssvc }, /* 158 = nfssvc */
-#else
- { 0, 0, 0,
- sys_nosys }, /* 158 = unimplemented */
-#endif
- { 4, s(struct compat_43_sys_getdirentries_args), 0,
- compat_43_sys_getdirentries }, /* 159 = getdirentries */
- { 2, s(struct ultrix_sys_statfs_args), 0,
- ultrix_sys_statfs }, /* 160 = statfs */
- { 2, s(struct ultrix_sys_fstatfs_args), 0,
- ultrix_sys_fstatfs }, /* 161 = fstatfs */
- { 0, 0, 0,
- sys_nosys }, /* 162 = unimplemented umount */
-#ifdef NFSCLIENT
- { 0, 0, 0,
- async_daemon }, /* 163 = async_daemon */
- { 2, s(struct sys_getfh_args), 0,
- sys_getfh }, /* 164 = getfh */
-#else
- { 0, 0, 0,
- sys_nosys }, /* 163 = unimplemented async_daemon */
- { 0, 0, 0,
- sys_nosys }, /* 164 = unimplemented getfh */
-#endif
- { 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 */
- { 4, s(struct ultrix_sys_quotactl_args), 0,
- ultrix_sys_quotactl }, /* 168 = quotactl */
- { 2, s(struct ultrix_sys_exportfs_args), 0,
- ultrix_sys_exportfs }, /* 169 = exportfs */
- { 0, 0, 0,
- sys_nosys }, /* 170 = unimplemented { int ultrix_sys_mount ( char * special , char * dir , int rdonly , int type , caddr_t data ) ; } */
- { 0, 0, 0,
- sys_nosys }, /* 171 = unimplemented 4 hdwconf */
- { 0, 0, 0,
- sys_nosys }, /* 172 = unimplemented msgctl */
- { 0, 0, 0,
- sys_nosys }, /* 173 = unimplemented msgget */
- { 0, 0, 0,
- sys_nosys }, /* 174 = unimplemented msgrcv */
- { 0, 0, 0,
- sys_nosys }, /* 175 = unimplemented msgsnd */
- { 0, 0, 0,
- sys_nosys }, /* 176 = unimplemented semctl */
- { 0, 0, 0,
- sys_nosys }, /* 177 = unimplemented semget */
- { 0, 0, 0,
- sys_nosys }, /* 178 = unimplemented semop */
- { 1, s(struct ultrix_sys_uname_args), 0,
- ultrix_sys_uname }, /* 179 = uname */
- { 0, 0, 0,
- sys_nosys }, /* 180 = unimplemented shmsys */
- { 0, 0, 0,
- sys_nosys }, /* 181 = unimplemented 0 plock */
- { 0, 0, 0,
- sys_nosys }, /* 182 = unimplemented 0 lockf */
- { 2, s(struct ultrix_sys_ustat_args), 0,
- ultrix_sys_ustat }, /* 183 = ustat */
- { 5, s(struct ultrix_sys_getmnt_args), 0,
- ultrix_sys_getmnt }, /* 184 = getmnt */
- { 0, 0, 0,
- sys_nosys }, /* 185 = unimplemented notdef */
- { 0, 0, 0,
- sys_nosys }, /* 186 = unimplemented notdef */
- { 1, s(struct ultrix_sys_sigpending_args), 0,
- ultrix_sys_sigpending }, /* 187 = sigpending */
- { 0, 0, 0,
- sys_setsid }, /* 188 = setsid */
- { 3, s(struct ultrix_sys_waitpid_args), 0,
- ultrix_sys_waitpid }, /* 189 = waitpid */
- { 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 */
- { 0, 0, 0,
- sys_nosys }, /* 200 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 201 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 202 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 203 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 204 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 205 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 206 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 207 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 208 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 209 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 210 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 211 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 212 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 213 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 214 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 215 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 216 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 217 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 218 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 219 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 220 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 221 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 222 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 223 = unimplemented */
- { 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 1 utc_gettime */
- { 0, 0, 0,
- sys_nosys }, /* 234 = unimplemented 2 utc_adjtime */
- { 0, 0, 0,
- sys_nosys }, /* 235 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 236 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 237 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 238 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 239 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 240 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 241 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 242 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 243 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 244 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 245 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 246 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 247 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 248 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 249 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 250 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 251 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 252 = unimplemented audctl / * Make no-op for installation on Ultrix rootpartition? * / */
- { 0, 0, 0,
- sys_nosys }, /* 253 = unimplemented audgen / * Make no-op for installation on Ultrix rootpartition? * / */
- { 0, 0, 0,
- sys_nosys }, /* 254 = unimplemented startcpu */
- { 0, 0, 0,
- sys_nosys }, /* 255 = unimplemented stopcpu */
- { 5, s(struct ultrix_sys_getsysinfo_args), 0,
- ultrix_sys_getsysinfo }, /* 256 = getsysinfo */
- { 5, s(struct ultrix_sys_setsysinfo_args), 0,
- ultrix_sys_setsysinfo }, /* 257 = setsysinfo */
-};
-
diff --git a/sys/compat/ultrix/ultrix_tty.h b/sys/compat/ultrix/ultrix_tty.h
deleted file mode 100644
index d215732f3ae..00000000000
--- a/sys/compat/ultrix/ultrix_tty.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/* $OpenBSD: ultrix_tty.h,v 1.3 1996/08/02 20:35:54 niklas Exp $ */
-/* $NetBSD: ultrix_tty.h,v 1.2 1996/01/04 19:03:36 jonathan Exp $ */
-
-/* From: NetBSD sunos.h,v 1.4 1995/03/04 09:50:00 pk Exp */
-
-
-struct ultrix_ttysize {
- int ts_row;
- int ts_col;
-};
-
-/*
- * Ultrix includes (BRL-derived?) SysV compatibile termio
- * as well as termios. This is the termio structure.
- */
-
-struct ultrix_termio {
- u_short c_iflag;
- u_short c_oflag;
- u_short c_cflag;
- u_short c_lflag;
- char c_line;
- unsigned char c_cc[10]; /* 8 for SunOS */
-};
-#define ULTRIX_TCGETA _IOR('t', 91, struct ultrix_termio)
-#define ULTRIX_TCSETA _IOW('t', 90, struct ultrix_termio)
-#define ULTRIX_TCSETAW _IOW('t', 89, struct ultrix_termio)
-#define ULTRIX_TCSETAF _IOW('t', 88, struct ultrix_termio)
-
-/*
- * Ultrix POSIX-compatible termios.
- * Very similar to SunOS but with more c_cc entries (gag)
- */
-struct ultrix_termios {
- u_long c_iflag;
- u_long c_oflag;
- u_long c_cflag;
- u_long c_lflag;
- u_char c_cc[19]; /* 17 for Sun */
- u_char c_line;
-};
-
-#define ULTRIX_TCXONC _IO('T', 6)
-#define ULTRIX_TCFLSH _IO('T', 7)
-#define ULTRIX_TCGETS _IOR('t', 85, struct ultrix_termios)
-#define ULTRIX_TCSETS _IOW('t', 84, struct ultrix_termios) /* set termios */
-#define ULTRIX_TCSETSW _IOW('t', 83, struct ultrix_termios) /* Drain&set,*/
-#define ULTRIX_TCSETSF _IOW('t', 82, struct ultrix_termios) /*Drainflush,set*/
-#define ULTRIX_TCSNDBRK _IO('T', 12)
-#define ULTRIX_TCDRAIN _IO('T', 13)
diff --git a/sys/compat/ultrix/ultrix_util.h b/sys/compat/ultrix/ultrix_util.h
deleted file mode 100644
index 4934887068e..00000000000
--- a/sys/compat/ultrix/ultrix_util.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/* $OpenBSD: ultrix_util.h,v 1.2 1996/08/02 20:35:54 niklas Exp $ */
-/* $NetBSD: ultrix_util.h,v 1.1 1996/01/07 13:38:57 jonathan Exp $ */
-
-/*
- * Copyright (c) 1994 Christos Zoulas
- * Copyright (c) 1995 Matthew Green
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef _ULTRIX_UTIL_H_
-#define _ULTRIX_UTIL_H_
-
-#include <compat/common/compat_util.h>
-
-extern const char ultrix_emul_path[];
-
-#define ULTRIX_CHECK_ALT_EXIST(p, sgp, path) \
- CHECK_ALT_EXIST(p, sgp, ultrix_emul_path, path)
-
-#endif /* !_ULTRIX_UTIL_H_ */