Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/pgoyette-compat]: src Split compat_netbsd32_sysvipc into version-specifi...
details: https://anonhg.NetBSD.org/src/rev/65268632b1c5
branches: pgoyette-compat
changeset: 830678:65268632b1c5
user: pgoyette <pgoyette%NetBSD.org@localhost>
date: Wed Sep 12 04:35:22 2018 +0000
description:
Split compat_netbsd32_sysvipc into version-specific modules
diffstat:
distrib/sets/lists/modules/ad.arm | 8 +-
distrib/sets/lists/modules/ad.mips | 8 +-
distrib/sets/lists/modules/md.amd64 | 8 +-
sys/compat/netbsd32/files.netbsd32 | 8 +-
sys/compat/netbsd32/netbsd32_compat_10.c | 244 -----------------
sys/compat/netbsd32/netbsd32_compat_10_sysv.c | 290 ++++++++++++++++++++
sys/compat/netbsd32/netbsd32_compat_14.c | 317 ----------------------
sys/compat/netbsd32/netbsd32_compat_14_sysv.c | 367 ++++++++++++++++++++++++++
sys/compat/netbsd32/netbsd32_compat_50_sysv.c | 47 +++-
sys/compat/netbsd32/netbsd32_ipc.c | 31 +--
sys/modules/Makefile | 8 +-
sys/modules/compat_netbsd32/Makefile | 4 +-
sys/modules/compat_netbsd32_sysvipc/Makefile | 5 +-
13 files changed, 739 insertions(+), 606 deletions(-)
diffs (truncated from 1531 to 300 lines):
diff -r defd4a1bdf13 -r 65268632b1c5 distrib/sets/lists/modules/ad.arm
--- a/distrib/sets/lists/modules/ad.arm Wed Sep 12 03:22:07 2018 +0000
+++ b/distrib/sets/lists/modules/ad.arm Wed Sep 12 04:35:22 2018 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: ad.arm,v 1.10.12.4 2018/09/12 01:28:32 pgoyette Exp $
+# $NetBSD: ad.arm,v 1.10.12.5 2018/09/12 04:35:22 pgoyette Exp $
./@MODULEDIR@/compat_netbsd32 base-kernel-modules kmod
./@MODULEDIR@/compat_netbsd32/compat_netbsd32.kmod base-kernel-modules kmod
@@ -36,5 +36,11 @@
./@MODULEDIR@/compat_netbsd32_ptrace/compat_netbsd32_ptrace.kmod base-kernel-modules kmod
./@MODULEDIR@/compat_netbsd32_sysvipc base-kernel-modules kmod
./@MODULEDIR@/compat_netbsd32_sysvipc/compat_netbsd32_sysvipc.kmod base-kernel-modules kmod
+./@MODULEDIR@/compat_netbsd32_sysvipc_10 base-kernel-modules kmod
+./@MODULEDIR@/compat_netbsd32_sysvipc_10/compat_netbsd32_sysvipc_10.kmod base-kernel-modules kmod
+./@MODULEDIR@/compat_netbsd32_sysvipc_14 base-kernel-modules kmod
+./@MODULEDIR@/compat_netbsd32_sysvipc_14/compat_netbsd32_sysvipc_14.kmod base-kernel-modules kmod
+./@MODULEDIR@/compat_netbsd32_sysvipc_50 base-kernel-modules kmod
+./@MODULEDIR@/compat_netbsd32_sysvipc_50/compat_netbsd32_sysvipc_50.kmod base-kernel-modules kmod
./@MODULEDIR@/exec_elf32 base-kernel-modules kmod
./@MODULEDIR@/exec_elf32/exec_elf32.kmod base-kernel-modules kmod
diff -r defd4a1bdf13 -r 65268632b1c5 distrib/sets/lists/modules/ad.mips
--- a/distrib/sets/lists/modules/ad.mips Wed Sep 12 03:22:07 2018 +0000
+++ b/distrib/sets/lists/modules/ad.mips Wed Sep 12 04:35:22 2018 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: ad.mips,v 1.10.12.4 2018/09/12 01:28:32 pgoyette Exp $
+# $NetBSD: ad.mips,v 1.10.12.5 2018/09/12 04:35:22 pgoyette Exp $
./@MODULEDIR@/compat_netbsd32 base-kernel-modules kmod,arch64,nocompatmodules
./@MODULEDIR@/compat_netbsd32/compat_netbsd32.kmod base-kernel-modules kmod,arch64,nocompatmodules
./@MODULEDIR@/compat_netbsd32_09 base-kernel-modules kmod
@@ -35,5 +35,11 @@
./@MODULEDIR@/compat_netbsd32_ptrace/compat_netbsd32_ptrace.kmod base-kernel-modules kmod,arch64,nocompatmodules
./@MODULEDIR@/compat_netbsd32_sysvipc base-kernel-modules kmod,arch64,nocompatmodules
./@MODULEDIR@/compat_netbsd32_sysvipc/compat_netbsd32_sysvipc.kmod base-kernel-modules kmod,arch64,nocompatmodules
+./@MODULEDIR@/compat_netbsd32_sysvipc_10 base-kernel-modules kmod,arch64,nocompatmodules
+./@MODULEDIR@/compat_netbsd32_sysvipc_10/compat_netbsd32_sysvipc_10.kmod base-kernel-modules kmod,arch64,nocompatmodules
+./@MODULEDIR@/compat_netbsd32_sysvipc_14 base-kernel-modules kmod,arch64,nocompatmodules
+./@MODULEDIR@/compat_netbsd32_sysvipc_14/compat_netbsd32_sysvipc_14.kmod base-kernel-modules kmod,arch64,nocompatmodules
+./@MODULEDIR@/compat_netbsd32_sysvipc_50 base-kernel-modules kmod,arch64,nocompatmodules
+./@MODULEDIR@/compat_netbsd32_sysvipc_50/compat_netbsd32_sysvipc_50.kmod base-kernel-modules kmod,arch64,nocompatmodules
./@MODULEDIR@/exec_elf32 base-kernel-modules kmod
./@MODULEDIR@/exec_elf32/exec_elf32.kmod base-kernel-modules kmod
diff -r defd4a1bdf13 -r 65268632b1c5 distrib/sets/lists/modules/md.amd64
--- a/distrib/sets/lists/modules/md.amd64 Wed Sep 12 03:22:07 2018 +0000
+++ b/distrib/sets/lists/modules/md.amd64 Wed Sep 12 04:35:22 2018 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: md.amd64,v 1.75.2.6 2018/09/12 01:28:32 pgoyette Exp $
+# $NetBSD: md.amd64,v 1.75.2.7 2018/09/12 04:35:22 pgoyette Exp $
#
# NOTE that there are two sets of files here:
# @MODULEDIR@ and amd64-xen
@@ -89,6 +89,12 @@
./@MODULEDIR@/compat_netbsd32_ptrace/compat_netbsd32_ptrace.kmod base-kernel-modules kmod
./@MODULEDIR@/compat_netbsd32_sysvipc base-kernel-modules kmod
./@MODULEDIR@/compat_netbsd32_sysvipc/compat_netbsd32_sysvipc.kmod base-kernel-modules kmod
+./@MODULEDIR@/compat_netbsd32_sysvipc_10 base-kernel-modules kmod
+./@MODULEDIR@/compat_netbsd32_sysvipc_10/compat_netbsd32_sysvipc_10.kmod base-kernel-modules kmod
+./@MODULEDIR@/compat_netbsd32_sysvipc_14 base-kernel-modules kmod
+./@MODULEDIR@/compat_netbsd32_sysvipc_14/compat_netbsd32_sysvipc_14.kmod base-kernel-modules kmod
+./@MODULEDIR@/compat_netbsd32_sysvipc_50 base-kernel-modules kmod
+./@MODULEDIR@/compat_netbsd32_sysvipc_50/compat_netbsd32_sysvipc_50.kmod base-kernel-modules kmod
./@MODULEDIR@/coram base-kernel-modules kmod
./@MODULEDIR@/coram/coram.kmod base-kernel-modules kmod
./@MODULEDIR@/coretemp base-kernel-modules kmod
diff -r defd4a1bdf13 -r 65268632b1c5 sys/compat/netbsd32/files.netbsd32
--- a/sys/compat/netbsd32/files.netbsd32 Wed Sep 12 03:22:07 2018 +0000
+++ b/sys/compat/netbsd32/files.netbsd32 Wed Sep 12 04:35:22 2018 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: files.netbsd32,v 1.39.14.3 2018/09/12 01:26:40 pgoyette Exp $
+# $NetBSD: files.netbsd32,v 1.39.14.4 2018/09/12 04:35:22 pgoyette Exp $
#
# config file description for machine-independent netbsd32 compat code.
# included by ports that need it.
@@ -33,10 +33,12 @@
file compat/netbsd32/netbsd32_syscalls.c compat_netbsd32 & syscall_debug
file compat/netbsd32/netbsd32_compat_09.c compat_netbsd32 & (compat_09 | compat_sunos)
-file compat/netbsd32/netbsd32_compat_10.c compat_netbsd32 & (compat_10 | compat_sunos)
+file compat/netbsd32/netbsd32_compat_10_sysv.c compat_netbsd32 & compat_10 &
+ (sysvmsg | sysvsem | sysvshm)
file compat/netbsd32/netbsd32_compat_12.c compat_netbsd32 & (compat_12 | compat_sunos)
file compat/netbsd32/netbsd32_compat_13.c compat_netbsd32 & compat_13
-file compat/netbsd32/netbsd32_compat_14.c compat_netbsd32 & compat_14
+file compat/netbsd32/netbsd32_compat_14_sysv.c compat_netbsd32 & compat_14 &
+ (sysvmsg | sysvsem | sysvshm)
file compat/netbsd32/netbsd32_compat_16.c compat_netbsd32 & compat_16
file compat/netbsd32/netbsd32_compat_20.c compat_netbsd32 & compat_20
file compat/netbsd32/netbsd32_compat_30.c compat_netbsd32 & compat_30
diff -r defd4a1bdf13 -r 65268632b1c5 sys/compat/netbsd32/netbsd32_compat_10.c
--- a/sys/compat/netbsd32/netbsd32_compat_10.c Wed Sep 12 03:22:07 2018 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,244 +0,0 @@
-/* $NetBSD: netbsd32_compat_10.c,v 1.25.16.2 2018/09/11 01:52:00 pgoyette Exp $ */
-
-/*
- * Copyright (c) 1994 Adam Glass and Charles M. Hannum. 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. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Adam Glass and Charles M.
- * Hannum.
- * 4. The names of the authors may not be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``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 AUTHORS 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.
- */
-
-#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_compat_10.c,v 1.25.16.2 2018/09/11 01:52:00 pgoyette Exp $");
-
-#ifdef _KERNEL_OPT
-#include "opt_sysv.h"
-#include "opt_compat_netbsd.h"
-#endif
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/module.h>
-#include <sys/kernel.h>
-#include <sys/proc.h>
-#include <sys/sem.h>
-
-#include <sys/mount.h>
-#include <sys/syscallargs.h>
-#include <sys/syscallvar.h>
-
-#include <compat/netbsd32/netbsd32.h>
-#include <compat/netbsd32/netbsd32_syscallargs.h>
-#include <compat/sys/shm.h>
-
-#if defined(COMPAT_10)
-#if defined(SYSVSEM)
-int
-compat_10_netbsd32_semsys(struct lwp *l, const struct compat_10_netbsd32_semsys_args *uap, register_t *retval)
-{
- /* {
- syscallarg(int) which;
- syscallarg(int) a2;
- syscallarg(int) a3;
- syscallarg(int) a4;
- syscallarg(int) a5;
- } */
- struct compat_50_netbsd32___semctl14_args /* {
- syscallarg(int) semid;
- syscallarg(int) semnum;
- syscallarg(int) cmd;
- syscallarg(union semun *) arg;
- } */ __semctl_args;
- struct sys_semget_args /* {
- syscallarg(key_t) key;
- syscallarg(int) nsems;
- syscallarg(int) semflg;
- } */ semget_args;
- struct sys_semop_args /* {
- syscallarg(int) semid;
- syscallarg(struct sembuf *) sops;
- syscallarg(u_int) nsops;
- } */ semop_args;
- struct sys_semconfig_args /* {
- syscallarg(int) flag;
- } */ semconfig_args;
- int a5;
-
- switch (SCARG(uap, which)) {
- case 0: /* __semctl() */
- SCARG(&__semctl_args, semid) = SCARG(uap, a2);
- SCARG(&__semctl_args, semnum) = SCARG(uap, a3);
- SCARG(&__semctl_args, cmd) = SCARG(uap, a4);
- a5 = SCARG(uap, a5);
- return do_netbsd32___semctl14(l, &__semctl_args, retval, &a5);
-
- case 1: /* semget() */
- SCARG(&semget_args, key) = SCARG(uap, a2);
- SCARG(&semget_args, nsems) = SCARG(uap, a3);
- SCARG(&semget_args, semflg) = SCARG(uap, a4);
- return (sys_semget(l, &semget_args, retval));
-
- case 2: /* semop() */
- SCARG(&semop_args, semid) = SCARG(uap, a2);
- SCARG(&semop_args, sops) = NETBSD32IPTR64(SCARG(uap, a3));
- SCARG(&semop_args, nsops) = SCARG(uap, a4);
- return (sys_semop(l, &semop_args, retval));
-
- case 3: /* semconfig() */
- SCARG(&semconfig_args, flag) = SCARG(uap, a2);
- return (sys_semconfig(l, &semconfig_args, retval));
-
- default:
- return (EINVAL);
- }
-}
-#endif
-
-#if defined(SYSVSHM)
-int
-compat_10_netbsd32_shmsys(struct lwp *l, const struct compat_10_netbsd32_shmsys_args *uap, register_t *retval)
-{
- /* {
- syscallarg(int) which;
- syscallarg(int) a2;
- syscallarg(int) a3;
- syscallarg(int) a4;
- } */
- struct sys_shmat_args /* {
- syscallarg(int) shmid;
- syscallarg(void *) shmaddr;
- syscallarg(int) shmflg;
- } */ shmat_args;
- struct compat_14_sys_shmctl_args /* {
- syscallarg(int) shmid;
- syscallarg(int) cmd;
- syscallarg(struct shmid_ds50 *) buf;
- } */ shmctl_args;
- struct sys_shmdt_args /* {
- syscallarg(void *) shmaddr;
- } */ shmdt_args;
- struct sys_shmget_args /* {
- syscallarg(key_t) key;
- syscallarg(int) size;
- syscallarg(int) shmflg;
- } */ shmget_args;
-
- switch (SCARG(uap, which)) {
- case 0: /* shmat() */
- SCARG(&shmat_args, shmid) = SCARG(uap, a2);
- SCARG(&shmat_args, shmaddr) = NETBSD32IPTR64(SCARG(uap, a3));
- SCARG(&shmat_args, shmflg) = SCARG(uap, a4);
- return (sys_shmat(l, &shmat_args, retval));
-
- case 1: /* shmctl() */
- SCARG(&shmctl_args, shmid) = SCARG(uap, a2);
- SCARG(&shmctl_args, cmd) = SCARG(uap, a3);
- SCARG(&shmctl_args, buf) = NETBSD32IPTR64(SCARG(uap, a4));
- return (compat_14_sys_shmctl(l, &shmctl_args, retval));
-
- case 2: /* shmdt() */
- SCARG(&shmdt_args, shmaddr) = NETBSD32IPTR64(SCARG(uap, a2));
- return (sys_shmdt(l, &shmdt_args, retval));
-
- case 3: /* shmget() */
- SCARG(&shmget_args, key) = SCARG(uap, a2);
- SCARG(&shmget_args, size) = SCARG(uap, a3);
- SCARG(&shmget_args, shmflg) = SCARG(uap, a4);
- return (sys_shmget(l, &shmget_args, retval));
-
- default:
- return (EINVAL);
- }
-}
-#endif
-
-#if defined(SYSVMSG)
-int
-compat_10_netbsd32_msgsys(struct lwp *l, const struct compat_10_netbsd32_msgsys_args *uap, register_t *retval)
-{
- /* {
- syscallarg(int) which;
- syscallarg(int) a2;
- syscallarg(int) a3;
- syscallarg(int) a4;
- syscallarg(int) a5;
- syscallarg(int) a6;
- } */
- struct compat_14_sys_msgctl_args /* {
- syscallarg(int) msqid;
- syscallarg(int) cmd;
- syscallarg(struct msqid_ds *) buf;
- } */ msgctl_args;
- struct sys_msgget_args /* {
- syscallarg(key_t) key;
- syscallarg(int) msgflg;
- } */ msgget_args;
- struct sys_msgsnd_args /* {
- syscallarg(int) msqid;
- syscallarg(void *) msgp;
- syscallarg(size_t) msgsz;
- syscallarg(int) msgflg;
- } */ msgsnd_args;
- struct sys_msgrcv_args /* {
- syscallarg(int) msqid;
- syscallarg(void *) msgp;
- syscallarg(size_t) msgsz;
- syscallarg(long) msgtyp;
Home |
Main Index |
Thread Index |
Old Index