From b73df246f56bf7e0babe5235e93a25e5308bac03 Mon Sep 17 00:00:00 2001 From: mrg Date: Thu, 12 Jun 1997 19:18:15 +0000 Subject: [PATCH] bring mrg-vm-swap2 onto mainline. --- sys/compat/sunos/sunos_misc.c | 20 +++++++++++++++++++- sys/compat/sunos/sunos_syscall.h | 2 +- sys/compat/sunos/sunos_syscallargs.h | 8 ++++++-- sys/compat/sunos/sunos_syscalls.c | 2 +- sys/compat/sunos/sunos_sysent.c | 6 +++--- 5 files changed, 30 insertions(+), 8 deletions(-) diff --git a/sys/compat/sunos/sunos_misc.c b/sys/compat/sunos/sunos_misc.c index a90c64708462..a682fdd18f8d 100644 --- a/sys/compat/sunos/sunos_misc.c +++ b/sys/compat/sunos/sunos_misc.c @@ -1,4 +1,4 @@ -/* $NetBSD: sunos_misc.c,v 1.78 1997/05/08 16:19:54 mycroft Exp $ */ +/* $NetBSD: sunos_misc.c,v 1.79 1997/06/12 19:18:15 mrg Exp $ */ /* * Copyright (c) 1992, 1993 @@ -99,6 +99,7 @@ #include #include +#include static int sunstatfs __P((struct statfs *, caddr_t)); @@ -1252,3 +1253,20 @@ sunos_sys_sigvec(p, v, retval) } return (0); } + +int +sunos_sys_swapon(p, v, retval) + struct proc *p; + void *v; + register_t *retval; +{ + struct sys_swapctl_args ua; + struct sunos_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)); +} diff --git a/sys/compat/sunos/sunos_syscall.h b/sys/compat/sunos/sunos_syscall.h index 78628cd7f1fb..ebec25083540 100644 --- a/sys/compat/sunos/sunos_syscall.h +++ b/sys/compat/sunos/sunos_syscall.h @@ -2,7 +2,7 @@ * System call numbers. * * DO NOT EDIT-- this file is automatically generated. - * created from NetBSD: syscalls.master,v 1.39 1997/01/31 02:18:56 thorpej Exp + * created from NetBSD: syscalls.master,v 1.40 1997/06/12 19:01:02 mrg Exp */ /* syscall: "syscall" ret: "int" args: */ diff --git a/sys/compat/sunos/sunos_syscallargs.h b/sys/compat/sunos/sunos_syscallargs.h index ae312e82e971..c2b069a49cfa 100644 --- a/sys/compat/sunos/sunos_syscallargs.h +++ b/sys/compat/sunos/sunos_syscallargs.h @@ -2,7 +2,7 @@ * System call argument lists. * * DO NOT EDIT-- this file is automatically generated. - * created from NetBSD: syscalls.master,v 1.39 1997/01/31 02:18:56 thorpej Exp + * created from NetBSD: syscalls.master,v 1.40 1997/06/12 19:01:02 mrg Exp */ #define syscallarg(x) union { x datum; register_t pad; } @@ -107,6 +107,10 @@ struct sunos_sys_setpgrp_args { syscallarg(int) pgid; }; +struct sunos_sys_swapon_args { + syscallarg(char *) name; +}; + struct sunos_sys_fcntl_args { syscallarg(int) fd; syscallarg(int) cmd; @@ -273,7 +277,7 @@ int sys_setgroups __P((struct proc *, void *, register_t *)); int sys_getpgrp __P((struct proc *, void *, register_t *)); int sunos_sys_setpgrp __P((struct proc *, void *, register_t *)); int sys_setitimer __P((struct proc *, void *, register_t *)); -int sys_swapon __P((struct proc *, void *, register_t *)); +int sunos_sys_swapon __P((struct proc *, void *, register_t *)); int sys_getitimer __P((struct proc *, void *, register_t *)); int compat_43_sys_gethostname __P((struct proc *, void *, register_t *)); int compat_43_sys_sethostname __P((struct proc *, void *, register_t *)); diff --git a/sys/compat/sunos/sunos_syscalls.c b/sys/compat/sunos/sunos_syscalls.c index 5e6f1b091172..38ebe6410514 100644 --- a/sys/compat/sunos/sunos_syscalls.c +++ b/sys/compat/sunos/sunos_syscalls.c @@ -2,7 +2,7 @@ * System call names. * * DO NOT EDIT-- this file is automatically generated. - * created from NetBSD: syscalls.master,v 1.39 1997/01/31 02:18:56 thorpej Exp + * created from NetBSD: syscalls.master,v 1.40 1997/06/12 19:01:02 mrg Exp */ char *sunos_syscallnames[] = { diff --git a/sys/compat/sunos/sunos_sysent.c b/sys/compat/sunos/sunos_sysent.c index ae0f3c955fc1..a78efd02b6be 100644 --- a/sys/compat/sunos/sunos_sysent.c +++ b/sys/compat/sunos/sunos_sysent.c @@ -2,7 +2,7 @@ * System call switch table. * * DO NOT EDIT-- this file is automatically generated. - * created from NetBSD: syscalls.master,v 1.39 1997/01/31 02:18:56 thorpej Exp + * created from NetBSD: syscalls.master,v 1.40 1997/06/12 19:01:02 mrg Exp */ #include @@ -205,8 +205,8 @@ struct sysent sunos_sysent[] = { sys_setitimer }, /* 83 = setitimer */ { 0, 0, sys_nosys }, /* 84 = unimplemented { int sunos_sys_wait ( void ) ; } */ - { 1, s(struct sys_swapon_args), - sys_swapon }, /* 85 = swapon */ + { 1, s(struct sunos_sys_swapon_args), + sunos_sys_swapon }, /* 85 = swapon */ { 2, s(struct sys_getitimer_args), sys_getitimer }, /* 86 = getitimer */ { 2, s(struct compat_43_sys_gethostname_args),