Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys Merge the compat_sysv module into the sysv_ipc module - ...
details: https://anonhg.NetBSD.org/src/rev/6e6f8d9aea8d
branches: trunk
changeset: 342023:6e6f8d9aea8d
user: pgoyette <pgoyette%NetBSD.org@localhost>
date: Thu Dec 03 02:51:00 2015 +0000
description:
Merge the compat_sysv module into the sysv_ipc module - it should
never have been a separate module in the first place (my bad).
Adjust dependencies as appropriate.
diffstat:
sys/compat/common/compat_sysv_mod.c | 119 ------------------------------------
sys/compat/linux/common/linux_mod.c | 6 +-
sys/compat/netbsd32/netbsd32_mod.c | 6 +-
sys/kern/files.kern | 4 +-
sys/kern/syscalls.master | 20 +++---
sys/kern/sysv_ipc.c | 73 ++++++++++++++-------
sys/modules/Makefile | 3 +-
sys/modules/compat_sysv/Makefile | 23 ------
sys/modules/sysv_ipc/Makefile | 18 ++++-
9 files changed, 82 insertions(+), 190 deletions(-)
diffs (truncated from 497 to 300 lines):
diff -r 7a54ae2968b5 -r 6e6f8d9aea8d sys/compat/common/compat_sysv_mod.c
--- a/sys/compat/common/compat_sysv_mod.c Thu Dec 03 02:50:49 2015 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,119 +0,0 @@
-/* $NetBSD: compat_sysv_mod.c,v 1.3 2015/05/13 02:08:20 pgoyette Exp $ */
-
-/*-
- * Copyright (c) 2008 The NetBSD Foundation, Inc.
- * All rights reserved.
- *
- * This code is derived from software developed for The NetBSD Foundation
- * by Andrew Doran.
- *
- * 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.
- *
- * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
- * ``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 FOUNDATION OR CONTRIBUTORS
- * 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.
- */
-
-/*
- * Linkage for the compat module: spaghetti.
- */
-
-#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: compat_sysv_mod.c,v 1.3 2015/05/13 02:08:20 pgoyette Exp $");
-
-#ifdef _KERNEL_OPT
-#include "opt_compat_netbsd.h"
-#endif
-
-#include <sys/systm.h>
-#include <sys/module.h>
-#include <sys/sysctl.h>
-#include <sys/syscall.h>
-#include <sys/syscallargs.h>
-#include <sys/syscallvar.h>
-#include <sys/ipc.h>
-
-MODULE(MODULE_CLASS_EXEC, compat_sysv, "sysv_ipc");
-
-static const struct syscall_package compat_sysv_syscalls[] = {
-#if defined(COMPAT_10) && !defined(_LP64)
-# if defined(SYSVMSG)
- { SYS_compat_10_omsgsys, 0, (sy_call_t *)compat_10_sys_msgsys },
-# endif
-# if defined(SYSVSEM)
- { SYS_compat_10_osemsys, 0, (sy_call_t *)compat_10_sys_semsys },
-# endif
-# if defined(SYSVSHM)
- { SYS_compat_10_oshmsys, 0, (sy_call_t *)compat_10_sys_shmsys },
-# endif
-#endif
-
-#if defined(COMPAT_14)
-# if defined(SYSVSEM)
- { SYS_compat_14___semctl, 0, (sy_call_t *)compat_14_sys___semctl },
-# endif
-# if defined(SYSVMSG)
- { SYS_compat_14_msgctl, 0, (sy_call_t *)compat_14_sys_msgctl },
-# endif
-# if defined(SYSVSHM)
- { SYS_compat_14_shmctl, 0, (sy_call_t *)compat_14_sys_shmctl },
-# endif
-#endif
-
-#if defined(COMPAT_50)
-# if defined(SYSVSEM)
- { SYS_compat_50_____semctl13, 0, (sy_call_t *)compat_50_sys_____semctl13 },
-# endif
-# if defined(SYSVMSG)
- { SYS_compat_50___msgctl13, 0, (sy_call_t *)compat_50_sys___msgctl13 },
-# endif
-# if defined(SYSVSHM)
- { SYS_compat_50___shmctl13, 0, (sy_call_t *)compat_50_sys___shmctl13 },
-# endif
-#endif
- { 0, 0, NULL },
-};
-
-int sysctl_kern_sysvipc50(SYSCTLFN_ARGS);
-
-static int
-compat_sysv_modcmd(modcmd_t cmd, void *arg)
-{
- int error = 0;
-
- switch (cmd) {
- case MODULE_CMD_INIT:
- /* Link the system calls */
- error = syscall_establish(NULL, compat_sysv_syscalls);
-#ifdef COMPAT_50
- sysvipc50_set_compat_sysctl(sysctl_kern_sysvipc50);
-#endif
- return error;
-
- case MODULE_CMD_FINI:
- /* Unlink the system calls. */
- error = syscall_disestablish(NULL, compat_sysv_syscalls);
-#ifdef COMPAT_50
- sysvipc50_set_compat_sysctl(NULL);
-#endif
- return error;
-
- default:
- return ENOTTY;
- }
-}
diff -r 7a54ae2968b5 -r 6e6f8d9aea8d sys/compat/linux/common/linux_mod.c
--- a/sys/compat/linux/common/linux_mod.c Thu Dec 03 02:50:49 2015 +0000
+++ b/sys/compat/linux/common/linux_mod.c Thu Dec 03 02:51:00 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_mod.c,v 1.5 2015/10/10 04:28:04 pgoyette Exp $ */
+/* $NetBSD: linux_mod.c,v 1.6 2015/12/03 02:51:01 pgoyette Exp $ */
/*-
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_mod.c,v 1.5 2015/10/10 04:28:04 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_mod.c,v 1.6 2015/12/03 02:51:01 pgoyette Exp $");
#ifdef _KERNEL_OPT
#include "opt_execfmt.h"
@@ -65,7 +65,7 @@
# define MD3 ""
#endif
-MODULE(MODULE_CLASS_EXEC, compat_linux, "compat,compat_ossaudio,compat_sysv"
+MODULE(MODULE_CLASS_EXEC, compat_linux, "compat,compat_ossaudio,sysv_ipc"
MD1 MD2 MD3);
static struct execsw linux_execsw[] = {
diff -r 7a54ae2968b5 -r 6e6f8d9aea8d sys/compat/netbsd32/netbsd32_mod.c
--- a/sys/compat/netbsd32/netbsd32_mod.c Thu Dec 03 02:50:49 2015 +0000
+++ b/sys/compat/netbsd32/netbsd32_mod.c Thu Dec 03 02:51:00 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: netbsd32_mod.c,v 1.12 2015/12/01 23:56:43 pgoyette Exp $ */
+/* $NetBSD: netbsd32_mod.c,v 1.13 2015/12/03 02:51:01 pgoyette Exp $ */
/*-
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_mod.c,v 1.12 2015/12/01 23:56:43 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_mod.c,v 1.13 2015/12/03 02:51:01 pgoyette Exp $");
#ifdef _KERNEL_OPT
#include "opt_execfmt.h"
@@ -48,7 +48,7 @@
#include <compat/netbsd32/netbsd32_sysctl.h>
#include <compat/netbsd32/netbsd32_exec.h>
-# define DEPS1 "compat,compat_sysv,ksem"
+# define DEPS1 "compat,sysv_ipc,ksem"
#if defined(EXEC_ELF32)
# define DEPS2 ",exec_elf32"
diff -r 7a54ae2968b5 -r 6e6f8d9aea8d sys/kern/files.kern
--- a/sys/kern/files.kern Thu Dec 03 02:50:49 2015 +0000
+++ b/sys/kern/files.kern Thu Dec 03 02:51:00 2015 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: files.kern,v 1.9 2015/09/03 01:09:38 uebayasi Exp $
+# $NetBSD: files.kern,v 1.10 2015/12/03 02:51:00 pgoyette Exp $
#
# kernel sources
@@ -6,8 +6,6 @@
define kern: machdep, uvm
defflag opt_kern.h KERN
file compat/common/compat_mod.c compat_netbsd | compat_netbsd32
-file compat/common/compat_sysv_mod.c (compat_netbsd | compat_netbsd32) &
- (sysvshm | sysvsem | sysvmsg)
file conf/debugsyms.c kern
file conf/param.c kern
file kern/bufq_disksort.c bufq_disksort
diff -r 7a54ae2968b5 -r 6e6f8d9aea8d sys/kern/syscalls.master
--- a/sys/kern/syscalls.master Thu Dec 03 02:50:49 2015 +0000
+++ b/sys/kern/syscalls.master Thu Dec 03 02:51:00 2015 +0000
@@ -1,4 +1,4 @@
- $NetBSD: syscalls.master,v 1.280 2015/10/10 03:27:30 pgoyette Exp $
+ $NetBSD: syscalls.master,v 1.281 2015/12/03 02:51:00 pgoyette Exp $
; @(#)syscalls.master 8.2 (Berkeley) 1/13/94
@@ -351,7 +351,7 @@
168 UNIMPL
; XXX more generally, never on machines where sizeof(void *) != sizeof(int)
#if !defined(_LP64)
-169 COMPAT_10 MODULAR compat_sysv \
+169 COMPAT_10 MODULAR sysv_ipc \
{ int|sys||semsys(int which, int a2, int a3, int a4, \
int a5); } osemsys
#else
@@ -359,7 +359,7 @@
#endif
; XXX more generally, never on machines where sizeof(void *) != sizeof(int)
#if !defined(_LP64)
-170 COMPAT_10 MODULAR compat_sysv \
+170 COMPAT_10 MODULAR sysv_ipc \
{ int|sys||msgsys(int which, int a2, int a3, int a4, \
int a5, int a6); } omsgsys
#else
@@ -367,7 +367,7 @@
#endif
; XXX more generally, never on machines where sizeof(void *) != sizeof(int)
#if !defined(_LP64)
-171 COMPAT_10 MODULAR compat_sysv \
+171 COMPAT_10 MODULAR sysv_ipc \
{ int|sys||shmsys(int which, int a2, int a3, int a4); } \
oshmsys
#else
@@ -453,7 +453,7 @@
218 UNIMPL
219 UNIMPL
; System calls 220-300 are reserved for use by NetBSD
-220 COMPAT_14 MODULAR compat_sysv \
+220 COMPAT_14 MODULAR sysv_ipc \
{ int|sys||__semctl(int semid, int semnum, int cmd, \
union __semun *arg); }
221 STD MODULAR sysv_ipc { int|sys||semget(key_t key, int nsems, \
@@ -461,7 +461,7 @@
222 STD MODULAR sysv_ipc { int|sys||semop(int semid, struct sembuf *sops, \
size_t nsops); }
223 STD MODULAR sysv_ipc { int|sys||semconfig(int flag); }
-224 COMPAT_14 MODULAR compat_sysv { int|sys||msgctl(int msqid, int cmd, \
+224 COMPAT_14 MODULAR sysv_ipc { int|sys||msgctl(int msqid, int cmd, \
struct msqid_ds14 *buf); }
225 STD MODULAR sysv_ipc { int|sys||msgget(key_t key, int msgflg); }
226 STD MODULAR sysv_ipc { int|sys||msgsnd(int msqid, const void *msgp, \
@@ -470,7 +470,7 @@
size_t msgsz, long msgtyp, int msgflg); }
228 STD MODULAR sysv_ipc { void *|sys||shmat(int shmid, \
const void *shmaddr, int shmflg); }
-229 COMPAT_14 MODULAR compat_sysv { int|sys||shmctl(int shmid, int cmd, \
+229 COMPAT_14 MODULAR sysv_ipc { int|sys||shmctl(int shmid, int cmd, \
struct shmid_ds14 *buf); }
230 STD MODULAR sysv_ipc { int|sys||shmdt(const void *shmaddr); }
231 STD MODULAR sysv_ipc { int|sys||shmget(key_t key, size_t size, \
@@ -609,12 +609,12 @@
300 COMPAT_20 MODULAR compat \
{ int|sys||fhstatfs(const struct compat_30_fhandle *fhp, \
struct statfs12 *buf); }
-301 COMPAT_50 MODULAR compat_sysv \
+301 COMPAT_50 MODULAR sysv_ipc \
{ int|sys|13|__semctl(int semid, int semnum, int cmd, \
... union __semun *arg); }
-302 COMPAT_50 MODULAR compat_sysv { int|sys|13|msgctl(int msqid, int cmd, \
+302 COMPAT_50 MODULAR sysv_ipc { int|sys|13|msgctl(int msqid, int cmd, \
struct msqid_ds *buf); }
-303 COMPAT_50 MODULAR compat_sysv { int|sys|13|shmctl(int shmid, int cmd, \
+303 COMPAT_50 MODULAR sysv_ipc { int|sys|13|shmctl(int shmid, int cmd, \
struct shmid_ds13 *buf); }
304 STD RUMP { int|sys||lchflags(const char *path, u_long flags); }
305 NOERR RUMP { int|sys||issetugid(void); }
diff -r 7a54ae2968b5 -r 6e6f8d9aea8d sys/kern/sysv_ipc.c
--- a/sys/kern/sysv_ipc.c Thu Dec 03 02:50:49 2015 +0000
+++ b/sys/kern/sysv_ipc.c Thu Dec 03 02:51:00 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sysv_ipc.c,v 1.30 2015/11/06 02:26:42 pgoyette Exp $ */
+/* $NetBSD: sysv_ipc.c,v 1.31 2015/12/03 02:51:00 pgoyette Exp $ */
/*-
* Copyright (c) 1998, 2007 The NetBSD Foundation, Inc.
@@ -30,10 +30,11 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sysv_ipc.c,v 1.30 2015/11/06 02:26:42 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sysv_ipc.c,v 1.31 2015/12/03 02:51:00 pgoyette Exp $");
#ifdef _KERNEL_OPT
#include "opt_sysv.h"
+#include "opt_compat_netbsd.h"
#endif
#include <sys/syscall.h>
@@ -61,8 +62,6 @@
#include <sys/sysctl.h>
#include <sys/kauth.h>
Home |
Main Index |
Thread Index |
Old Index