add emulation of linux swapoff(2)

This commit is contained in:
jdolecek 2000-12-02 16:43:50 +00:00
parent c586587e47
commit 1acf11b550
4 changed files with 26 additions and 7 deletions

View File

@ -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 @@ endif
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

View File

@ -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 @@ endif
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); }

View File

@ -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 @@ endif
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); }

View File

@ -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.
@ -1190,6 +1190,25 @@ linux_sys_swapon(p, v, retval)
return (sys_swapctl(p, &ua, retval));
}
/*
* 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()
*/