summaryrefslogtreecommitdiffstats
path: root/sys/compat/linux/linux_misc.c
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2011-07-09 00:10:51 +0000
committerderaadt <deraadt@openbsd.org>2011-07-09 00:10:51 +0000
commit53204b3fc855712fb1aa46bf43ef9c769e465ebd (patch)
tree375bab5d4a57e97b4d9180c04ff2e9fb93d0f6cf /sys/compat/linux/linux_misc.c
parentSeparate some MD and MI bits and a bit of refactoring to make subsequent (diff)
downloadwireguard-openbsd-53204b3fc855712fb1aa46bf43ef9c769e465ebd.tar.xz
wireguard-openbsd-53204b3fc855712fb1aa46bf43ef9c769e465ebd.zip
Remove COMPAT_25. The one piece moved by COMPAT_LINUX moves there.
ok guenther
Diffstat (limited to 'sys/compat/linux/linux_misc.c')
-rw-r--r--sys/compat/linux/linux_misc.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/sys/compat/linux/linux_misc.c b/sys/compat/linux/linux_misc.c
index 0b62285fa8c..57020d126fa 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.71 2011/07/08 19:19:20 tedu Exp $ */
+/* $OpenBSD: linux_misc.c,v 1.72 2011/07/09 00:10:52 deraadt Exp $ */
/* $NetBSD: linux_misc.c,v 1.27 1996/05/20 01:59:21 fvdl Exp $ */
/*-
@@ -51,6 +51,7 @@
#include <sys/mount.h>
#include <sys/ptrace.h>
#include <sys/resource.h>
+#include <sys/swap.h>
#include <sys/resourcevar.h>
#include <sys/signal.h>
#include <sys/signalvar.h>
@@ -1466,3 +1467,17 @@ linux_sys_setdomainname(struct proc *p, void *v, register_t *retval)
return (kern_sysctl(mib, 1, NULL, NULL, SCARG(uap, name),
SCARG(uap, len), p));
}
+
+int
+linux_sys_swapon(struct proc *p, void *v, register_t *retval)
+{
+ struct sys_swapctl_args ua;
+ struct linux_sys_swapon_args /* {
+ syscallarg(const char *) name;
+ } */ *uap = v;
+
+ SCARG(&ua, cmd) = SWAP_ON;
+ SCARG(&ua, arg) = (void *)SCARG(uap, name);
+ SCARG(&ua, misc) = 0; /* priority */
+ return (sys_swapctl(p, &ua, retval));
+}