summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortedu <tedu@openbsd.org>2011-07-08 19:19:20 +0000
committertedu <tedu@openbsd.org>2011-07-08 19:19:20 +0000
commit230083613b7d86412b321ba32eeeeafaaf4ac71c (patch)
tree326dc12cb9544ce114d9517ce16f85d6fb6f9bcc
parentmark carp advertisements to be queued at priority 6. losing them is bad, (diff)
downloadwireguard-openbsd-230083613b7d86412b321ba32eeeeafaaf4ac71c.tar.xz
wireguard-openbsd-230083613b7d86412b321ba32eeeeafaaf4ac71c.zip
remove all traces of COMPAT_09 and COMPAT_10. ok deraadt
-rw-r--r--sys/compat/common/kern_info_09.c92
-rw-r--r--sys/compat/linux/linux_misc.c15
-rw-r--r--sys/compat/linux/syscalls.master5
-rw-r--r--sys/conf/files3
-rw-r--r--sys/kern/syscalls.master29
5 files changed, 23 insertions, 121 deletions
diff --git a/sys/compat/common/kern_info_09.c b/sys/compat/common/kern_info_09.c
deleted file mode 100644
index bde24a60594..00000000000
--- a/sys/compat/common/kern_info_09.c
+++ /dev/null
@@ -1,92 +0,0 @@
-/* $OpenBSD: kern_info_09.c,v 1.13 2007/11/28 14:04:44 deraadt Exp $ */
-/* $NetBSD: kern_info_09.c,v 1.5 1996/02/21 00:10:59 cgd Exp $ */
-
-/*
- * Copyright (c) 1982, 1986, 1991, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)subr_xxx.c 8.1 (Berkeley) 6/10/93
- */
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/filedesc.h>
-#include <sys/kernel.h>
-#include <sys/proc.h>
-#include <sys/syslog.h>
-#include <sys/unistd.h>
-#include <uvm/uvm_extern.h>
-#include <sys/sysctl.h>
-
-#include <sys/mount.h>
-#include <sys/syscallargs.h>
-
-/*
- * Note that while we no longer have a COMPAT_09 kernel option,
- * there are other COMPAT_* options that need these old functions.
- */
-
-/* ARGSUSED */
-int
-compat_09_sys_getdomainname(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct compat_09_sys_getdomainname_args /* {
- syscallarg(char *) domainname;
- syscallarg(int) len;
- } */ *uap = v;
- int name;
- size_t sz;
-
- name = KERN_DOMAINNAME;
- sz = SCARG(uap,len);
- return (kern_sysctl(&name, 1, SCARG(uap, domainname), &sz, 0, 0, p));
-}
-
-
-/* ARGSUSED */
-int
-compat_09_sys_setdomainname(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct compat_09_sys_setdomainname_args /* {
- syscallarg(char *) domainname;
- syscallarg(int) len;
- } */ *uap = v;
- int name;
- int error;
-
- if ((error = suser(p, 0)) != 0)
- return (error);
- name = KERN_DOMAINNAME;
- return (kern_sysctl(&name, 1, 0, 0, SCARG(uap, domainname),
- SCARG(uap, len), p));
-}
diff --git a/sys/compat/linux/linux_misc.c b/sys/compat/linux/linux_misc.c
index ec237c17bed..0b62285fa8c 100644
--- a/sys/compat/linux/linux_misc.c
+++ b/sys/compat/linux/linux_misc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: linux_misc.c,v 1.70 2011/07/08 05:01:27 matthew Exp $ */
+/* $OpenBSD: linux_misc.c,v 1.71 2011/07/08 19:19:20 tedu Exp $ */
/* $NetBSD: linux_misc.c,v 1.27 1996/05/20 01:59:21 fvdl Exp $ */
/*-
@@ -1453,3 +1453,16 @@ linux_sys_mprotect(struct proc *p, void *v, register_t *retval)
SCARG(uap, prot) |= PROT_READ;
return (sys_mprotect(p, uap, retval));
}
+
+int
+linux_sys_setdomainname(struct proc *p, void *v, register_t *retval)
+{
+ struct linux_sys_setdomainname_args *uap = v;
+ int error, mib[1];
+
+ if ((error = suser(p, 0)))
+ return (error);
+ mib[0] = KERN_DOMAINNAME;
+ return (kern_sysctl(mib, 1, NULL, NULL, SCARG(uap, name),
+ SCARG(uap, len), p));
+}
diff --git a/sys/compat/linux/syscalls.master b/sys/compat/linux/syscalls.master
index 2b6cc4d3ddf..1682314d652 100644
--- a/sys/compat/linux/syscalls.master
+++ b/sys/compat/linux/syscalls.master
@@ -1,4 +1,4 @@
- $OpenBSD: syscalls.master,v 1.58 2011/07/08 05:01:27 matthew Exp $
+ $OpenBSD: syscalls.master,v 1.59 2011/07/08 19:19:20 tedu Exp $
; $NetBSD: syscalls.master,v 1.15 1995/12/18 14:35:10 fvdl Exp $
; @(#)syscalls.master 8.1 (Berkeley) 7/19/93
@@ -213,8 +213,7 @@
119 STD { int linux_sys_sigreturn(struct linux_sigcontext *scp); }
120 STD { int linux_sys_clone(int flags, void *stack, \
void *parent_tidptr, void *tls, void *child_tidptr); }
-121 NOARGS { int compat_09_sys_setdomainname(char *name, \
- int len); }
+121 STD { int linux_sys_setdomainname(char *name, int len); }
122 STD { int linux_sys_uname(struct linux_utsname *up); }
#ifdef __i386__
123 STD { int linux_sys_modify_ldt(int func, void *ptr, \
diff --git a/sys/conf/files b/sys/conf/files
index 62b7b5adf5b..8d14b0deff3 100644
--- a/sys/conf/files
+++ b/sys/conf/files
@@ -1,4 +1,4 @@
-# $OpenBSD: files,v 1.522 2011/07/08 18:38:53 ariane Exp $
+# $OpenBSD: files,v 1.523 2011/07/08 19:19:20 tedu Exp $
# $NetBSD: files,v 1.87 1996/05/19 17:17:50 jonathan Exp $
# @(#)files.newconf 7.5 (Berkeley) 5/10/93
@@ -1052,7 +1052,6 @@ file compat/common/compat_exec.c !small_kernel
file compat/common/compat_util.c !small_kernel
file compat/common/compat_dir.c !small_kernel
file compat/common/compat_vm.c !small_kernel & compat_linux
-file compat/common/kern_info_09.c !small_kernel & compat_linux
file compat/common/tty_43.c compat_43
# libx86emu
diff --git a/sys/kern/syscalls.master b/sys/kern/syscalls.master
index 36d9e3a1dc4..906a07f05ee 100644
--- a/sys/kern/syscalls.master
+++ b/sys/kern/syscalls.master
@@ -1,4 +1,4 @@
-; $OpenBSD: syscalls.master,v 1.112 2011/07/08 05:01:27 matthew Exp $
+; $OpenBSD: syscalls.master,v 1.113 2011/07/08 19:19:20 tedu Exp $
; $NetBSD: syscalls.master,v 1.32 1996/04/23 10:24:21 mycroft Exp $
; @(#)syscalls.master 8.2 (Berkeley) 1/13/94
@@ -281,33 +281,16 @@
159 UNIMPL
160 UNIMPL
161 STD { int sys_getfh(const char *fname, fhandle_t *fhp); }
-162 COMPAT_09 { int sys_getdomainname(char *domainname, int len); } \
- ogetdomainname
-163 COMPAT_09 { int sys_setdomainname(char *domainname, int len); } \
- osetdomainname
+162 OBSOL ogetdomainname
+163 OBSOL osetdomainname
164 UNIMPL ouname
165 STD { int sys_sysarch(int op, void *parms); }
166 UNIMPL
167 UNIMPL
168 UNIMPL
-#if defined(SYSVSEM) && !defined(__LP64__)
-169 COMPAT_10 { int sys_semsys(int which, int a2, int a3, int a4, \
- int a5); } osemsys
-#else
-169 UNIMPL 1.0 semsys
-#endif
-#if defined(SYSVMSG) && !defined(__LP64__)
-170 COMPAT_10 { int sys_msgsys(int which, int a2, int a3, int a4, \
- int a5, int a6); } omsgsys
-#else
-170 UNIMPL 1.0 msgsys
-#endif
-#if defined(SYSVSHM) && !defined(__LP64__)
-171 COMPAT_10 { int sys_shmsys(int which, int a2, int a3, int a4); } \
- oshmsys
-#else
-171 UNIMPL 1.0 shmsys
-#endif
+169 OBSOL semsys10
+170 OBSOL msgsys10
+171 OBSOL shmsys10
172 UNIMPL
173 STD { ssize_t sys_pread(int fd, void *buf, \
size_t nbyte, int pad, off_t offset); }