Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/compat/linux add emulation of linux swapoff(2)



details:   https://anonhg.NetBSD.org/src/rev/3071f7f0027a
branches:  trunk
changeset: 499945:3071f7f0027a
user:      jdolecek <jdolecek%NetBSD.org@localhost>
date:      Sat Dec 02 16:43:50 2000 +0000

description:
add emulation of linux swapoff(2)

diffstat:

 sys/compat/linux/arch/alpha/syscalls.master |   4 ++--
 sys/compat/linux/arch/i386/syscalls.master  |   4 ++--
 sys/compat/linux/arch/m68k/syscalls.master  |   4 ++--
 sys/compat/linux/common/linux_misc.c        |  21 ++++++++++++++++++++-
 4 files changed, 26 insertions(+), 7 deletions(-)

diffs (89 lines):

diff -r fa082f00af73 -r 3071f7f0027a sys/compat/linux/arch/alpha/syscalls.master
--- a/sys/compat/linux/arch/alpha/syscalls.master       Sat Dec 02 16:25:39 2000 +0000
+++ b/sys/compat/linux/arch/alpha/syscalls.master       Sat Dec 02 16:43:50 2000 +0000
@@ -1,4 +1,4 @@
-       $NetBSD: syscalls.master,v 1.23 2000/12/01 21:02:55 jdolecek Exp $
+       $NetBSD: syscalls.master,v 1.24 2000/12/02 16:43:51 jdolecek Exp $
 ;
 ;      @(#)syscalls.master     8.1 (Berkeley) 7/19/93
 
@@ -485,7 +485,7 @@
 301    UNIMPL          sethae
 302    UNIMPL          mount
 303    UNIMPL          old_adjtimex
-304    UNIMPL          swapoff
+304    STD             { int linux_sys_swapoff(const char *path); }
 305    STD             { int linux_sys_getdents(int fd, \
                            struct linux_dirent *dent, unsigned int count); }
 306    UNIMPL          alpha_create_module
diff -r fa082f00af73 -r 3071f7f0027a sys/compat/linux/arch/i386/syscalls.master
--- a/sys/compat/linux/arch/i386/syscalls.master        Sat Dec 02 16:25:39 2000 +0000
+++ b/sys/compat/linux/arch/i386/syscalls.master        Sat Dec 02 16:43:50 2000 +0000
@@ -1,4 +1,4 @@
-       $NetBSD: syscalls.master,v 1.44 2000/12/01 21:02:56 jdolecek Exp $
+       $NetBSD: syscalls.master,v 1.45 2000/12/02 16:43:50 jdolecek Exp $
 
 ;      @(#)syscalls.master     8.1 (Berkeley) 7/19/93
 
@@ -202,7 +202,7 @@
 113    UNIMPL          vm86old
 114    STD             { int linux_sys_wait4(int pid, int *status, \
                            int options, struct rusage *rusage); }
-115    UNIMPL          swapoff
+115    STD             { int linux_sys_swapoff(const char *path); }
 116    UNIMPL          sysinfo
 117    STD             { int linux_sys_ipc(int what, int a1, int a2, int a3, \
                            caddr_t ptr); }
diff -r fa082f00af73 -r 3071f7f0027a sys/compat/linux/arch/m68k/syscalls.master
--- a/sys/compat/linux/arch/m68k/syscalls.master        Sat Dec 02 16:25:39 2000 +0000
+++ b/sys/compat/linux/arch/m68k/syscalls.master        Sat Dec 02 16:43:50 2000 +0000
@@ -1,4 +1,4 @@
-       $NetBSD: syscalls.master,v 1.17 2000/12/01 21:02:56 jdolecek Exp $
+       $NetBSD: syscalls.master,v 1.18 2000/12/02 16:43:51 jdolecek Exp $
 
 ;      @(#)syscalls.master     8.1 (Berkeley) 7/19/93
 
@@ -220,7 +220,7 @@
 113    UNIMPL          vm86old
 114    STD             { int linux_sys_wait4(int pid, int *status, \
                            int options, struct rusage *rusage); }
-115    UNIMPL          swapoff
+115    STD             { int linux_sys_swapoff(const char *path); }
 116    UNIMPL          sysinfo
 117    STD             { int linux_sys_ipc(int what, int a1, int a2, int a3, \
                            caddr_t ptr); }
diff -r fa082f00af73 -r 3071f7f0027a sys/compat/linux/common/linux_misc.c
--- a/sys/compat/linux/common/linux_misc.c      Sat Dec 02 16:25:39 2000 +0000
+++ b/sys/compat/linux/common/linux_misc.c      Sat Dec 02 16:43:50 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: linux_misc.c,v 1.75 2000/12/01 21:14:42 jdolecek Exp $ */
+/*     $NetBSD: linux_misc.c,v 1.76 2000/12/02 16:43:51 jdolecek Exp $ */
 
 /*-
  * Copyright (c) 1995, 1998, 1999 The NetBSD Foundation, Inc.
@@ -1191,6 +1191,25 @@
 }
 
 /*
+ * Stop swapping to the file or block device specified by path.
+ */
+int
+linux_sys_swapoff(p, v, retval)
+       struct proc *p;
+       void *v;
+       register_t *retval;
+{
+       struct sys_swapctl_args ua;
+       struct linux_sys_swapoff_args /* {
+               syscallarg(const char *) path;
+       } */ *uap = v;
+
+       SCARG(&ua, cmd) = SWAP_OFF;
+       SCARG(&ua, arg) = (void *)SCARG(uap, path);
+       return (sys_swapctl(p, &ua, retval));
+}
+
+/*
  * Copy of compat_09_sys_setdomainname()
  */
 /* ARGSUSED */



Home | Main Index | Thread Index | Old Index