Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/pgoyette-compat]: src/sys More compat_netbsd32_xx modules
details: https://anonhg.NetBSD.org/src/rev/0377c21ad1e3
branches: pgoyette-compat
changeset: 830640:0377c21ad1e3
user: pgoyette <pgoyette%NetBSD.org@localhost>
date: Mon Sep 10 10:49:09 2018 +0000
description:
More compat_netbsd32_xx modules
diffstat:
sys/compat/netbsd32/netbsd32_compat_12.c | 38 ++++++++++---------
sys/compat/netbsd32/netbsd32_compat_13.c | 34 ++++++++++++++++-
sys/compat/netbsd32/netbsd32_compat_20.c | 30 ++++++++++++++-
sys/compat/netbsd32/netbsd32_compat_30.c | 48 +++++++++++++++++++++++-
sys/compat/netbsd32/syscalls.master | 62 +++++++++++++++++++++----------
sys/modules/Makefile | 12 ++---
sys/modules/compat_netbsd32/Makefile | 6 +-
sys/modules/compat_netbsd32_13/Makefile | 14 +++++++
sys/modules/compat_netbsd32_20/Makefile | 14 +++++++
sys/modules/compat_netbsd32_30/Makefile | 14 +++++++
10 files changed, 217 insertions(+), 55 deletions(-)
diffs (truncated from 546 to 300 lines):
diff -r 1f663b054184 -r 0377c21ad1e3 sys/compat/netbsd32/netbsd32_compat_12.c
--- a/sys/compat/netbsd32/netbsd32_compat_12.c Mon Sep 10 09:54:47 2018 +0000
+++ b/sys/compat/netbsd32/netbsd32_compat_12.c Mon Sep 10 10:49:09 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: netbsd32_compat_12.c,v 1.33.36.1 2018/09/10 09:54:47 pgoyette Exp $ */
+/* $NetBSD: netbsd32_compat_12.c,v 1.33.36.2 2018/09/10 10:49:09 pgoyette Exp $ */
/*
* Copyright (c) 1998, 2001 Matthew R. Green
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_compat_12.c,v 1.33.36.1 2018/09/10 09:54:47 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_compat_12.c,v 1.33.36.2 2018/09/10 10:49:09 pgoyette Exp $");
#if defined(_KERNEL_OPT)
#include "opt_compat_netbsd.h"
@@ -210,22 +210,22 @@
return (compat_12_sys_getdirentries(l, &ua, retval));
}
-static struct syscall_package compat_netbsd32_09_syscalls[] = {
- { NETBSD32_SYS_reboot, 0,
- (sy_call_t *)compat_12_netbsd32_reboot },
- { NETBSD32_SYS_msync, 0,
- (sy_call_t *)compat_12_netbsd32_msync },
- { NETBSD32_SYS_swapon, 0,
- (sy_call_t *)compat_12_netbsd32_swapon },
- { NETBSD32_SYS_stat12, 0,
- (sy_call_t *)compat_12_netbsd32_stat12 },
- { NETBSD32_SYS_fstat12, 0,
- (sy_call_t *)compat_12_netbsd32_fstat12 },
- { NETBSD32_SYS_lstat12, 0,
- (sy_call_t *)compat_12_netbsd32_lstat12 },
- { NETBSD32_SYS_getdirentries, 0,
- (sy_call_t *)compat_12_netbsd32_getdirentries },
- { 0, 0, NULL }
+static struct syscall_package compat_netbsd32_12_syscalls[] = {
+ { NETBSD32_SYS_reboot, 0,
+ (sy_call_t *)compat_12_netbsd32_reboot },
+ { NETBSD32_SYS_msync, 0,
+ (sy_call_t *)compat_12_netbsd32_msync },
+ { NETBSD32_SYS_swapon, 0,
+ (sy_call_t *)compat_12_netbsd32_swapon },
+ { NETBSD32_SYS_stat12, 0,
+ (sy_call_t *)compat_12_netbsd32_stat12 },
+ { NETBSD32_SYS_fstat12, 0,
+ (sy_call_t *)compat_12_netbsd32_fstat12 },
+ { NETBSD32_SYS_lstat12, 0,
+ (sy_call_t *)compat_12_netbsd32_lstat12 },
+ { NETBSD32_SYS_getdirentries, 0,
+ (sy_call_t *)compat_12_netbsd32_getdirentries },
+ { 0, 0, NULL }
};
MODULE(MODULE_CLASS_EXEC, compat_netbsd32_12, "compat_netbsd32,compat_12");
@@ -236,8 +236,10 @@
switch (cmd) {
case MODULE_CMD_INIT:
+ return syscall_establish(NULL, compat_netbsd32_12_syscalls);
case MODULE_CMD_FINI:
+ return syscall_disestablish(NULL, compat_netbsd32_12_syscalls);
default:
return ENOTTY;
diff -r 1f663b054184 -r 0377c21ad1e3 sys/compat/netbsd32/netbsd32_compat_13.c
--- a/sys/compat/netbsd32/netbsd32_compat_13.c Mon Sep 10 09:54:47 2018 +0000
+++ b/sys/compat/netbsd32/netbsd32_compat_13.c Mon Sep 10 10:49:09 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: netbsd32_compat_13.c,v 1.26 2014/01/24 22:44:00 christos Exp $ */
+/* $NetBSD: netbsd32_compat_13.c,v 1.26.28.1 2018/09/10 10:49:09 pgoyette Exp $ */
/*
* Copyright (c) 1998, 2001 Matthew R. Green
@@ -27,10 +27,11 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_compat_13.c,v 1.26 2014/01/24 22:44:00 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_compat_13.c,v 1.26.28.1 2018/09/10 10:49:09 pgoyette Exp $");
#include <sys/param.h>
#include <sys/systm.h>
+#include <sys/module.h>
#include <sys/mount.h>
#include <sys/proc.h>
#include <sys/signal.h>
@@ -38,6 +39,7 @@
#include <sys/syscallargs.h>
#include <compat/netbsd32/netbsd32.h>
+#include <compat/netbsd32/netbsd32_syscallvar.h>
#include <compat/netbsd32/netbsd32_syscallargs.h>
#include <compat/sys/stat.h>
@@ -90,3 +92,31 @@
native_sigset13_to_sigset(&ess, &bss);
return (sigsuspend1(l, &bss));
}
+
+static struct syscall_package compat_netbsd32_13_syscalls[] = {
+ { NETBSD32_SYS_sigaltstack13, 0,
+ (sy_call_t *)compat_13_netbsd32_sigaltstack13 },
+ { NETBSD32_SYS_sigprocmask, 0,
+ (sy_call_t *)compat_13_netbsd32_sigprocmask },
+ { NETBSD32_SYS_sigsuspend, 0,
+ (sy_call_t *)compat_13_netbsd32_sigsuspend },
+ { 0, 0, NULL }
+};
+
+MODULE(MODULE_CLASS_EXEC, compat_netbsd32_13, "compat_netbsd32,compat_13");
+
+static int
+compat_netbsd32_13_modcmd(modcmd_t cmd, void *arg)
+{
+
+ switch (cmd) {
+ case MODULE_CMD_INIT:
+ return syscall_establish(NULL, compat_netbsd32_13_syscalls);
+
+ case MODULE_CMD_FINI:
+ return syscall_disestablish(NULL, compat_netbsd32_13_syscalls);
+
+ default:
+ return ENOTTY;
+ }
+}
diff -r 1f663b054184 -r 0377c21ad1e3 sys/compat/netbsd32/netbsd32_compat_20.c
--- a/sys/compat/netbsd32/netbsd32_compat_20.c Mon Sep 10 09:54:47 2018 +0000
+++ b/sys/compat/netbsd32/netbsd32_compat_20.c Mon Sep 10 10:49:09 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: netbsd32_compat_20.c,v 1.36.10.1 2018/05/21 04:36:03 pgoyette Exp $ */
+/* $NetBSD: netbsd32_compat_20.c,v 1.36.10.2 2018/09/10 10:49:09 pgoyette Exp $ */
/*
* Copyright (c) 1998, 2001 Matthew R. Green
@@ -27,10 +27,11 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_compat_20.c,v 1.36.10.1 2018/05/21 04:36:03 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_compat_20.c,v 1.36.10.2 2018/09/10 10:49:09 pgoyette Exp $");
#include <sys/param.h>
#include <sys/systm.h>
+#include <sys/module.h>
#include <sys/mount.h>
#include <sys/stat.h>
#include <sys/time.h>
@@ -45,6 +46,7 @@
#include <sys/dirent.h>
#include <compat/netbsd32/netbsd32.h>
+#include <compat/netbsd32/netbsd32_syscallvar.h>
#include <compat/netbsd32/netbsd32_syscallargs.h>
#include <compat/netbsd32/netbsd32_conv.h>
@@ -216,3 +218,27 @@
#endif
return (compat_30_sys_fhstatvfs1(l, &ua, retval));
}
+
+static struct syscall_package compat_netbsd32_20_syscalls[] = {
+ { NETBSD32_SYS_getfsstat, 0,
+ (sy_call_t *)compat_20_netbsd32_getfsstat },
+ { 0, 0, NULL }
+};
+
+MODULE(MODULE_CLASS_EXEC, compat_netbsd32_20, "compat_netbsd32,compat_20");
+
+static int
+compat_netbsd32_20_modcmt(modcmd_t cmd, void *arg)
+{
+
+ switch (cmd) {
+ case MODULE_CMD_INIT:
+ return syscall_establish(NULL, compat_netbsd32_20_syscalls);
+
+ case MODULE_CMD_FINI:
+ return syscall_disestablish(NULL, compat_netbsd32_20_syscalls);
+
+ default:
+ return ENOTTY;
+ }
+}
diff -r 1f663b054184 -r 0377c21ad1e3 sys/compat/netbsd32/netbsd32_compat_30.c
--- a/sys/compat/netbsd32/netbsd32_compat_30.c Mon Sep 10 09:54:47 2018 +0000
+++ b/sys/compat/netbsd32/netbsd32_compat_30.c Mon Sep 10 10:49:09 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: netbsd32_compat_30.c,v 1.31.16.1 2018/09/06 06:55:46 pgoyette Exp $ */
+/* $NetBSD: netbsd32_compat_30.c,v 1.31.16.2 2018/09/10 10:49:09 pgoyette Exp $ */
/*
* Copyright (c) 1998, 2001 Matthew R. Green
@@ -27,11 +27,12 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_compat_30.c,v 1.31.16.1 2018/09/06 06:55:46 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_compat_30.c,v 1.31.16.2 2018/09/10 10:49:09 pgoyette Exp $");
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/mount.h>
+#include <sys/mount.h>
#include <sys/socket.h>
#include <sys/socketvar.h>
#include <sys/stat.h>
@@ -50,6 +51,7 @@
#include <sys/vfs_syscalls.h>
#include <compat/netbsd32/netbsd32.h>
+#include <compat/netbsd32/netbsd32_syscallvar.h>
#include <compat/netbsd32/netbsd32_syscallargs.h>
#include <compat/netbsd32/netbsd32_conv.h>
#include <compat/sys/mount.h>
@@ -293,3 +295,45 @@
NETBSD32TO64_UAP(flags);
return (compat_30_sys_fhopen(l, &ua, retval));
}
+
+static struct syscall_package compat_netbsd32_30_syscalls[] = {
+ { NETBSD32_SYS_getdents, 0,
+ (sy_call_t *)compat_30_netbsd32_getdents },
+ { NETBSD32_SYS_stat13, 0,
+ (sy_call_t *)compat_30_netbsd32___stat13 },
+ { NETBSD32_SYS_fstat13, 0,
+ (sy_call_t *)compat_30_netbsd32___fstat13 },
+ { NETBSD32_SYS_lstat13, 0,
+ (sy_call_t *)compat_30_netbsd32___lstat13 },
+ { NETBSD32_SYS_fhstat, 0,
+ (sy_call_t *)compat_30_netbsd32_fhstat },
+ { NETBSD32_SYS_fhstatvfs1, 0,
+ (sy_call_t *)compat_30_netbsd32_fhstatvfs1 },
+ { NETBSD32_SYS_socket, 0,
+ (sy_call_t *)compat_30_netbsd32_socket },
+ { NETBSD32_SYS_getfh, 0,
+ (sy_call_t *)compat_30_netbsd32_getfh },
+ { NETBSD32_SYS_fhstat30, 0,
+ (sy_call_t *)compat_30_netbsd32___fhstat30 },
+ { NETBSD32_SYS_fhopen, 0,
+ (sy_call_t *)compat_30_netbsd32___fhopen },
+ { 0, 0, NULL }
+};
+
+MODULE(MODULE_CLASS_EXEC, compat_netbsd32_30, "compat_netbsd32,compat_30");
+
+static int
+compat_netbsd32_30_modcmd(modcmd_t cmd, void *arg)
+{
+
+ switch (cmd) {
+ case MODULE_CMD_INIT:
+ return syscall_establish(NULL, compat_netbsd32_30_syscalls);
+
+ case MODULE_CMD_FINI:
+ return syscall_disestablish(NULL, compat_netbsd32_30_syscalls);
+
+ default:
+ return ENOTTY;
+ }
+}
diff -r 1f663b054184 -r 0377c21ad1e3 sys/compat/netbsd32/syscalls.master
--- a/sys/compat/netbsd32/syscalls.master Mon Sep 10 09:54:47 2018 +0000
+++ b/sys/compat/netbsd32/syscalls.master Mon Sep 10 10:49:09 2018 +0000
@@ -1,4 +1,4 @@
- $NetBSD: syscalls.master,v 1.120.2.4 2018/09/10 09:54:47 pgoyette Exp $
+ $NetBSD: syscalls.master,v 1.120.2.5 2018/09/10 10:49:09 pgoyette Exp $
; from: NetBSD: syscalls.master,v 1.81 1998/07/05 08:49:50 jonathan Exp
; @(#)syscalls.master 8.2 (Berkeley) 1/13/94
@@ -86,7 +86,8 @@
16 STD { int|netbsd32||chown(netbsd32_charp path, uid_t uid, \
gid_t gid); }
17 STD { int|netbsd32||break(netbsd32_charp nsize); }
-18 COMPAT_20 { int|netbsd32||getfsstat(netbsd32_statfsp_t buf, \
+18 COMPAT_20 MODULAR compat_netbsd32_20 \
+ { int|netbsd32||getfsstat(netbsd32_statfsp_t buf, \
netbsd32_long bufsize, int flags); }
19 COMPAT_43 { netbsd32_long|netbsd32||olseek(int fd, \
netbsd32_long offset, int whence); }
@@ -141,19 +142,22 @@
netbsd32_sigactionp_t nsa, \
netbsd32_sigactionp_t osa); }
47 NOARGS { gid_t|sys||getgid(void); }
-48 COMPAT_13 { int|netbsd32||sigprocmask(int how, \
+48 COMPAT_13 MODULAR compat_netbsd32_13 \
+ { int|netbsd32||sigprocmask(int how, \
int mask); } sigprocmask13
49 STD { int|netbsd32||__getlogin(netbsd32_charp namebuf, \
u_int namelen); }
50 STD { int|netbsd32||setlogin(netbsd32_charp namebuf); }
51 STD { int|netbsd32||acct(netbsd32_charp path); }
52 COMPAT_13 { int|sys||sigpending(void); } sigpending13
-53 COMPAT_13 { int|netbsd32||sigaltstack13( \
+53 COMPAT_13 MODULAR compat_netbsd32_13 \
+ { int|netbsd32||sigaltstack13( \
Home |
Main Index |
Thread Index |
Old Index