CVS commit: [pgoyette-compat] src/sys/compat/common

2019-01-22 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Wed Jan 23 02:55:10 UTC 2019

Modified Files:
src/sys/compat/common [pgoyette-compat]: compat_raid_50.c

Log Message:
Add compat_raid_80 to the required list


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.1 -r1.1.2.2 src/sys/compat/common/compat_raid_50.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/compat/common/compat_raid_50.c
diff -u src/sys/compat/common/compat_raid_50.c:1.1.2.1 src/sys/compat/common/compat_raid_50.c:1.1.2.2
--- src/sys/compat/common/compat_raid_50.c:1.1.2.1	Sat Sep 22 22:21:46 2018
+++ src/sys/compat/common/compat_raid_50.c	Wed Jan 23 02:55:09 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: compat_raid_50.c,v 1.1.2.1 2018/09/22 22:21:46 pgoyette Exp $	*/
+/*	$NetBSD: compat_raid_50.c,v 1.1.2.2 2019/01/23 02:55:09 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
 #endif
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: compat_raid_50.c,v 1.1.2.1 2018/09/22 22:21:46 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: compat_raid_50.c,v 1.1.2.2 2019/01/23 02:55:09 pgoyette Exp $");
 
 #include 
 #include 
@@ -64,7 +64,7 @@ int compat_raid_50_fini(void)
 	return 0;
 }
 
-MODULE(MODULE_CLASS_EXEC, compat_raid_50, "compat_50,raid");
+MODULE(MODULE_CLASS_EXEC, compat_raid_50, "compat_50,raid,compat_raid_80");
 
 static int
 compat_50_modcmd(modcmd_t cmd, void *arg)



CVS commit: [pgoyette-compat] src/sys/compat/common

2018-10-03 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Wed Oct  3 21:52:02 UTC 2018

Modified Files:
src/sys/compat/common [pgoyette-compat]: if_43.c if_43.h

Log Message:
Don't define if_43_{init,fini}() in multiple .h files.


To generate a diff of this commit:
cvs rdiff -u -r1.14.2.8 -r1.14.2.9 src/sys/compat/common/if_43.c
cvs rdiff -u -r1.1.20.1 -r1.1.20.2 src/sys/compat/common/if_43.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/compat/common/if_43.c
diff -u src/sys/compat/common/if_43.c:1.14.2.8 src/sys/compat/common/if_43.c:1.14.2.9
--- src/sys/compat/common/if_43.c:1.14.2.8	Wed Oct  3 21:27:14 2018
+++ src/sys/compat/common/if_43.c	Wed Oct  3 21:52:02 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_43.c,v 1.14.2.8 2018/10/03 21:27:14 pgoyette Exp $	*/
+/*	$NetBSD: if_43.c,v 1.14.2.9 2018/10/03 21:52:02 pgoyette Exp $	*/
 
 /*
  * Copyright (c) 1982, 1986, 1989, 1990, 1993
@@ -32,7 +32,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_43.c,v 1.14.2.8 2018/10/03 21:27:14 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_43.c,v 1.14.2.9 2018/10/03 21:52:02 pgoyette Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_compat_netbsd.h"
@@ -73,6 +73,7 @@ __KERNEL_RCSID(0, "$NetBSD: if_43.c,v 1.
 #include 
 
 #include 
+#include 
 #include 
 #include 
 

Index: src/sys/compat/common/if_43.h
diff -u src/sys/compat/common/if_43.h:1.1.20.1 src/sys/compat/common/if_43.h:1.1.20.2
--- src/sys/compat/common/if_43.h:1.1.20.1	Wed Oct  3 21:27:14 2018
+++ src/sys/compat/common/if_43.h	Wed Oct  3 21:52:02 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_43.h,v 1.1.20.1 2018/10/03 21:27:14 pgoyette Exp $	*/
+/*	$NetBSD: if_43.h,v 1.1.20.2 2018/10/03 21:52:02 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2016 The NetBSD Foundation, Inc.
@@ -36,9 +36,6 @@
 extern u_long (*vec_compat_cvtcmd)(u_long); 
 extern int (*vec_compat_ifioctl)(struct socket *, u_long, u_long, 
 void *, struct lwp *);
-
-int if_43_init(void);
-int if_43_fini(void);
 #endif
 
 #endif /* !_COMPAT_IF_43_H_ */



CVS commit: [pgoyette-compat] src/sys/compat/common

2018-10-03 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Wed Oct  3 21:27:14 UTC 2018

Modified Files:
src/sys/compat/common [pgoyette-compat]: if_43.c if_43.h

Log Message:
Make if_43_{init,fini} return an int, for consistency with all the
related *_{init,fini} routines.


To generate a diff of this commit:
cvs rdiff -u -r1.14.2.7 -r1.14.2.8 src/sys/compat/common/if_43.c
cvs rdiff -u -r1.1 -r1.1.20.1 src/sys/compat/common/if_43.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/compat/common/if_43.c
diff -u src/sys/compat/common/if_43.c:1.14.2.7 src/sys/compat/common/if_43.c:1.14.2.8
--- src/sys/compat/common/if_43.c:1.14.2.7	Sun Sep 30 01:45:49 2018
+++ src/sys/compat/common/if_43.c	Wed Oct  3 21:27:14 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_43.c,v 1.14.2.7 2018/09/30 01:45:49 pgoyette Exp $	*/
+/*	$NetBSD: if_43.c,v 1.14.2.8 2018/10/03 21:27:14 pgoyette Exp $	*/
 
 /*
  * Copyright (c) 1982, 1986, 1989, 1990, 1993
@@ -32,7 +32,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_43.c,v 1.14.2.7 2018/09/30 01:45:49 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_43.c,v 1.14.2.8 2018/10/03 21:27:14 pgoyette Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_compat_netbsd.h"
@@ -301,17 +301,19 @@ compat_ifioctl(struct socket *so, u_long
 MODULE_SET_HOOK2(if_43_hook, "if_43", do_compat_cvtcmd, compat_ifioctl);
 MODULE_UNSET_HOOK2(if_43_hook);
 
-void
+int
 if_43_init(void)
 {
 
 	if_43_hook_set();
+	return 0;
 }
 
-void
+int
 if_43_fini(void)
 {
 
 	if_43_hook_unset();
+	return 0;
 }
 #endif /* defined(COMPAT_43) */

Index: src/sys/compat/common/if_43.h
diff -u src/sys/compat/common/if_43.h:1.1 src/sys/compat/common/if_43.h:1.1.20.1
--- src/sys/compat/common/if_43.h:1.1	Sat Nov  5 23:30:22 2016
+++ src/sys/compat/common/if_43.h	Wed Oct  3 21:27:14 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_43.h,v 1.1 2016/11/05 23:30:22 pgoyette Exp $	*/
+/*	$NetBSD: if_43.h,v 1.1.20.1 2018/10/03 21:27:14 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2016 The NetBSD Foundation, Inc.
@@ -37,8 +37,8 @@ extern u_long (*vec_compat_cvtcmd)(u_lon
 extern int (*vec_compat_ifioctl)(struct socket *, u_long, u_long, 
 void *, struct lwp *);
 
-void if_43_init(void);
-void if_43_fini(void);
+int if_43_init(void);
+int if_43_fini(void);
 #endif
 
 #endif /* !_COMPAT_IF_43_H_ */



CVS commit: [pgoyette-compat] src/sys/compat/common

2018-09-30 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sun Sep 30 21:32:48 UTC 2018

Modified Files:
src/sys/compat/common [pgoyette-compat]: if43_20.c

Log Message:
atm is gone


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.3 -r1.1.2.4 src/sys/compat/common/if43_20.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/compat/common/if43_20.c
diff -u src/sys/compat/common/if43_20.c:1.1.2.3 src/sys/compat/common/if43_20.c:1.1.2.4
--- src/sys/compat/common/if43_20.c:1.1.2.3	Sat Sep 22 04:56:28 2018
+++ src/sys/compat/common/if43_20.c	Sun Sep 30 21:32:48 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: if43_20.c,v 1.1.2.3 2018/09/22 04:56:28 pgoyette Exp $	*/
+/*	$NetBSD: if43_20.c,v 1.1.2.4 2018/09/30 21:32:48 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if43_20.c,v 1.1.2.3 2018/09/22 04:56:28 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if43_20.c,v 1.1.2.4 2018/09/30 21:32:48 pgoyette Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_compat_netbsd.h"
@@ -61,7 +61,6 @@ __KERNEL_RCSID(0, "$NetBSD: if43_20.c,v 
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 



CVS commit: [pgoyette-compat] src/sys/compat/common

2018-09-28 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Fri Sep 28 08:42:01 UTC 2018

Modified Files:
src/sys/compat/common [pgoyette-compat]: files.common

Log Message:
Use the correct attribute - compat_utils vs compat_util


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.39 -r1.1.2.40 src/sys/compat/common/files.common

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/compat/common/files.common
diff -u src/sys/compat/common/files.common:1.1.2.39 src/sys/compat/common/files.common:1.1.2.40
--- src/sys/compat/common/files.common:1.1.2.39	Fri Sep 28 08:08:56 2018
+++ src/sys/compat/common/files.common	Fri Sep 28 08:42:01 2018
@@ -1,13 +1,11 @@
-#	$NetBSD: files.common,v 1.1.2.39 2018/09/28 08:08:56 pgoyette Exp $
+#	$NetBSD: files.common,v 1.1.2.40 2018/09/28 08:42:01 pgoyette Exp $
 
 #
 # Generic utility files, used by various compat options.
 #
 define	compat_netbsd_util
-file	compat/common/compat_exec.c		compat_30 | compat_09 |
-		  compat_util
-file	compat/common/compat_util.c		compat_30 | compat_09 |
-		  compat_util
+file	compat/common/compat_exec.c		compat_utils
+file	compat/common/compat_util.c		compat_utils
 
 #
 # Sources for syscall and ioctl compatibility across the versions.



CVS commit: [pgoyette-compat] src/sys/compat/common

2018-09-27 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Thu Sep 27 23:48:58 UTC 2018

Modified Files:
src/sys/compat/common [pgoyette-compat]: files.common

Log Message:
Add dependencies to ensure that the utility routines get included
as built-in module when needed.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.37 -r1.1.2.38 src/sys/compat/common/files.common

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/compat/common/files.common
diff -u src/sys/compat/common/files.common:1.1.2.37 src/sys/compat/common/files.common:1.1.2.38
--- src/sys/compat/common/files.common:1.1.2.37	Sat Sep 22 10:30:53 2018
+++ src/sys/compat/common/files.common	Thu Sep 27 23:48:58 2018
@@ -1,11 +1,11 @@
-#	$NetBSD: files.common,v 1.1.2.37 2018/09/22 10:30:53 pgoyette Exp $
+#	$NetBSD: files.common,v 1.1.2.38 2018/09/27 23:48:58 pgoyette Exp $
 
 #
-# Generic files, used by all compat options.
+# Generic utility files, used by various compat options.
 #
-#file	compat/common/compat_mod.c		compat_netbsd
-file	compat/common/compat_exec.c		compat_netbsd
-file	compat/common/compat_util.c		compat_netbsd
+define	compat_netbsd_util
+file	compat/common/compat_exec.c		compat_30 | compat_09
+file	compat/common/compat_util.c		compat_30 | compat_09
 
 #
 # Sources for syscall and ioctl compatibility across the versions.



CVS commit: [pgoyette-compat] src/sys/compat/common

2018-09-23 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sun Sep 23 07:39:43 UTC 2018

Modified Files:
src/sys/compat/common [pgoyette-compat]: usb_subr_30.c

Log Message:
Don't try to include usb_verbose.h - it might not exist on platforms
that don't have USB!

It turns out that nothing uses it any.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.3 -r1.1.2.4 src/sys/compat/common/usb_subr_30.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/compat/common/usb_subr_30.c
diff -u src/sys/compat/common/usb_subr_30.c:1.1.2.3 src/sys/compat/common/usb_subr_30.c:1.1.2.4
--- src/sys/compat/common/usb_subr_30.c:1.1.2.3	Tue Sep 18 23:03:54 2018
+++ src/sys/compat/common/usb_subr_30.c	Sun Sep 23 07:39:43 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: usb_subr_30.c,v 1.1.2.3 2018/09/18 23:03:54 pgoyette Exp $	*/
+/*	$NetBSD: usb_subr_30.c,v 1.1.2.4 2018/09/23 07:39:43 pgoyette Exp $	*/
 /*	$FreeBSD: src/sys/dev/usb/usb_subr.c,v 1.18 1999/11/17 22:33:47 n_hibma Exp $	*/
 
 /*
@@ -32,12 +32,11 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: usb_subr_30.c,v 1.1.2.3 2018/09/18 23:03:54 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: usb_subr_30.c,v 1.1.2.4 2018/09/23 07:39:43 pgoyette Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
 #include "opt_usb.h"
-#include "opt_usbverbose.h"
 #endif
 
 #include 



CVS commit: [pgoyette-compat] src/sys/compat/common

2018-09-22 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sun Sep 23 04:27:49 UTC 2018

Modified Files:
src/sys/compat/common [pgoyette-compat]: compat_50_mod.c

Log Message:
Now that cryptodev_50 is a separate module we can't initialize it
from the generic compat_50 module.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.14 -r1.1.2.15 src/sys/compat/common/compat_50_mod.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/compat/common/compat_50_mod.c
diff -u src/sys/compat/common/compat_50_mod.c:1.1.2.14 src/sys/compat/common/compat_50_mod.c:1.1.2.15
--- src/sys/compat/common/compat_50_mod.c:1.1.2.14	Sat Sep 22 22:21:46 2018
+++ src/sys/compat/common/compat_50_mod.c	Sun Sep 23 04:27:48 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: compat_50_mod.c,v 1.1.2.14 2018/09/22 22:21:46 pgoyette Exp $	*/
+/*	$NetBSD: compat_50_mod.c,v 1.1.2.15 2018/09/23 04:27:48 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: compat_50_mod.c,v 1.1.2.14 2018/09/22 22:21:46 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: compat_50_mod.c,v 1.1.2.15 2018/09/23 04:27:48 pgoyette Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_compat_netbsd.h"
@@ -84,7 +84,6 @@ compat_50_init(void)
 	uipc_syscalls_50_init();
 	clockctl_50_init();
 	if_spppsubr_50_init();
-	cryptodev_50_init();
 	puffs_50_init();
 	wsevent_50_init();
 	vnd_50_init();
@@ -111,7 +110,6 @@ compat_50_fini(void)
 	vnd_50_fini();
 	wsevent_50_fini();
 	puffs_50_fini();
-	cryptodev_50_fini();
 	if_spppsubr_50_fini();
 	clockctl_50_fini();
 	uipc_syscalls_50_fini();
@@ -147,7 +145,6 @@ compat_50_fini(void)
 	uipc_syscalls_50_init();
 	clockctl_50_init();
 	if_spppsubr_50_init();
-	cryptodev_50_init();
 	puffs_50_init();
 	wsevent_50_init();
 	vnd_50_init();



CVS commit: [pgoyette-compat] src/sys/compat/common

2018-09-22 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sat Sep 22 10:30:53 UTC 2018

Modified Files:
src/sys/compat/common [pgoyette-compat]: files.common

Log Message:
Missed this in previous files.* changes


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.36 -r1.1.2.37 src/sys/compat/common/files.common

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/compat/common/files.common
diff -u src/sys/compat/common/files.common:1.1.2.36 src/sys/compat/common/files.common:1.1.2.37
--- src/sys/compat/common/files.common:1.1.2.36	Wed Sep 19 04:12:43 2018
+++ src/sys/compat/common/files.common	Sat Sep 22 10:30:53 2018
@@ -1,4 +1,4 @@
-#	$NetBSD: files.common,v 1.1.2.36 2018/09/19 04:12:43 pgoyette Exp $
+#	$NetBSD: files.common,v 1.1.2.37 2018/09/22 10:30:53 pgoyette Exp $
 
 #
 # Generic files, used by all compat options.
@@ -82,8 +82,8 @@ file	compat/common/rtsock_50.c		compat_5
 file	compat/common/vfs_syscalls_50.c		compat_50
 file	compat/common/uipc_syscalls_50.c	compat_50
 file	compat/common/vnd_50.c			compat_50
-file	compat/common/clockctl_50.c		compat_50 & clockctl
-file	compat/common/if_spppsubr50.c		compat_50 & sppp
+file	compat/common/clockctl_50.c		compat_50
+file	compat/common/if_spppsubr50.c		compat_50
 file	compat/common/uvm_50.c			compat_50
 
 # Compatibility code for NetBSD 6.0
@@ -92,7 +92,7 @@ file	compat/common/kern_sa_60.c		compat_
 file	compat/common/tty_60.c			compat_60
 file	compat/common/kern_time_60.c		compat_60
 file	compat/common/kern_cpu_60.c		compat_60
-file	compat/common/ccd_60.c			compat_60 & ccd
+file	compat/common/ccd_60.c			compat_60
 
 # Compatibility code for NetBSD 7.0
 file	compat/common/compat_70_mod.c		compat_70



CVS commit: [pgoyette-compat] src/sys/compat/common

2018-09-21 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sat Sep 22 04:56:28 UTC 2018

Modified Files:
src/sys/compat/common [pgoyette-compat]: bio_30.c clockctl_50.c
compat_09_mod.c compat_10_mod.c compat_12_mod.c compat_13_mod.c
compat_14_mod.c compat_16_mod.c compat_20_mod.c compat_30_mod.c
compat_40_mod.c compat_43_mod.c compat_50_mod.c compat_60_mod.c
compat_70_mod.c compat_80_mod.c compat_exec.c compat_util.c
if43_20.c kern_50.c kern_exit_43.c kern_info_09.c kern_info_43.c
kern_ipc_10.c kern_mod_80.c kern_resource_43.c kern_sa_60.c
kern_select_50.c kern_sig_13.c kern_sig_16.c kern_time_30.c
kern_time_50.c kern_time_60.c kern_xxx_12.c rtsock_14.c
sysmon_power_40.c sysv_msg_14.c sysv_msg_50.c sysv_sem_14.c
sysv_sem_50.c sysv_shm_14.c sysv_shm_50.c tty_43.c
uipc_syscalls_30.c uipc_syscalls_40.c uipc_syscalls_43.c
uipc_syscalls_50.c uipc_usrreq_70.c uvm_13.c uvm_50.c
vfs_syscalls_10.c vfs_syscalls_12.c vfs_syscalls_30.c
vfs_syscalls_40.c vfs_syscalls_50.c vm_12.c vm_43.c vnd_30.c
vnd_50.c

Log Message:
#include "opt_compat_netbsd.h" for all sources that provide compat code.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.3 -r1.1.2.4 src/sys/compat/common/bio_30.c \
src/sys/compat/common/clockctl_50.c src/sys/compat/common/compat_43_mod.c \
src/sys/compat/common/sysmon_power_40.c src/sys/compat/common/vnd_30.c
cvs rdiff -u -r1.1.2.4 -r1.1.2.5 src/sys/compat/common/compat_09_mod.c \
src/sys/compat/common/compat_10_mod.c \
src/sys/compat/common/compat_14_mod.c \
src/sys/compat/common/compat_16_mod.c \
src/sys/compat/common/compat_20_mod.c
cvs rdiff -u -r1.1.2.5 -r1.1.2.6 src/sys/compat/common/compat_12_mod.c \
src/sys/compat/common/compat_13_mod.c \
src/sys/compat/common/compat_40_mod.c
cvs rdiff -u -r1.1.2.8 -r1.1.2.9 src/sys/compat/common/compat_30_mod.c
cvs rdiff -u -r1.1.2.12 -r1.1.2.13 src/sys/compat/common/compat_50_mod.c
cvs rdiff -u -r1.1.2.18 -r1.1.2.19 src/sys/compat/common/compat_60_mod.c
cvs rdiff -u -r1.1.2.9 -r1.1.2.10 src/sys/compat/common/compat_70_mod.c \
src/sys/compat/common/compat_80_mod.c
cvs rdiff -u -r1.17 -r1.17.62.1 src/sys/compat/common/compat_exec.c
cvs rdiff -u -r1.46.18.3 -r1.46.18.4 src/sys/compat/common/compat_util.c
cvs rdiff -u -r1.1.2.2 -r1.1.2.3 src/sys/compat/common/if43_20.c \
src/sys/compat/common/uvm_13.c src/sys/compat/common/uvm_50.c \
src/sys/compat/common/vfs_syscalls_10.c
cvs rdiff -u -r1.1.34.1 -r1.1.34.2 src/sys/compat/common/kern_50.c
cvs rdiff -u -r1.22.62.1 -r1.22.62.2 src/sys/compat/common/kern_exit_43.c
cvs rdiff -u -r1.20.96.1 -r1.20.96.2 src/sys/compat/common/kern_info_09.c
cvs rdiff -u -r1.35.28.2 -r1.35.28.3 src/sys/compat/common/kern_info_43.c
cvs rdiff -u -r1.25 -r1.25.64.1 src/sys/compat/common/kern_ipc_10.c
cvs rdiff -u -r1.1.2.6 -r1.1.2.7 src/sys/compat/common/kern_mod_80.c
cvs rdiff -u -r1.21.96.1 -r1.21.96.2 src/sys/compat/common/kern_resource_43.c
cvs rdiff -u -r1.1.42.3 -r1.1.42.4 src/sys/compat/common/kern_sa_60.c
cvs rdiff -u -r1.1.60.1 -r1.1.60.2 src/sys/compat/common/kern_select_50.c
cvs rdiff -u -r1.20.56.1 -r1.20.56.2 src/sys/compat/common/kern_sig_13.c \
src/sys/compat/common/vm_12.c
cvs rdiff -u -r1.2.38.3 -r1.2.38.4 src/sys/compat/common/kern_sig_16.c
cvs rdiff -u -r1.5.14.1 -r1.5.14.2 src/sys/compat/common/kern_time_30.c
cvs rdiff -u -r1.31.16.3 -r1.31.16.4 src/sys/compat/common/kern_time_50.c
cvs rdiff -u -r1.1.38.1 -r1.1.38.2 src/sys/compat/common/kern_time_60.c
cvs rdiff -u -r1.15.56.1 -r1.15.56.2 src/sys/compat/common/kern_xxx_12.c
cvs rdiff -u -r1.5.14.3 -r1.5.14.4 src/sys/compat/common/rtsock_14.c
cvs rdiff -u -r1.19 -r1.19.56.1 src/sys/compat/common/sysv_msg_14.c
cvs rdiff -u -r1.3 -r1.3.56.1 src/sys/compat/common/sysv_msg_50.c \
src/sys/compat/common/sysv_sem_50.c src/sys/compat/common/sysv_shm_50.c
cvs rdiff -u -r1.16 -r1.16.56.1 src/sys/compat/common/sysv_sem_14.c
cvs rdiff -u -r1.17 -r1.17.56.1 src/sys/compat/common/sysv_shm_14.c
cvs rdiff -u -r1.30.26.1 -r1.30.26.2 src/sys/compat/common/tty_43.c
cvs rdiff -u -r1.3.96.1 -r1.3.96.2 src/sys/compat/common/uipc_syscalls_30.c
cvs rdiff -u -r1.15.2.10 -r1.15.2.11 src/sys/compat/common/uipc_syscalls_40.c
cvs rdiff -u -r1.47.14.5 -r1.47.14.6 src/sys/compat/common/uipc_syscalls_43.c
cvs rdiff -u -r1.3.56.9 -r1.3.56.10 src/sys/compat/common/uipc_syscalls_50.c
cvs rdiff -u -r1.1.20.1 -r1.1.20.2 src/sys/compat/common/uipc_usrreq_70.c
cvs rdiff -u -r1.35.2.2 -r1.35.2.3 src/sys/compat/common/vfs_syscalls_12.c
cvs rdiff -u -r1.36.18.2 -r1.36.18.3 src/sys/compat/common/vfs_syscalls_30.c
cvs rdiff -u -r1.4.16.1 -r1.4.16.2 src/sys/compat/common/vfs_syscalls_40.c
cvs rdiff -u -r1.18.18.1 -r1.18.18.2 src/sys/compat/common/vfs_syscalls_50.c
cvs rdiff -u -r1.20.8.1 -r1.20.8.2 src/sys/compat/common/vm_43.c
cvs rdiff -u -r1.1.2.1 -r1.1.2.2 

CVS commit: [pgoyette-compat] src/sys/compat/common

2018-09-19 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Wed Sep 19 06:37:11 UTC 2018

Modified Files:
src/sys/compat/common [pgoyette-compat]: compat_30_mod.c

Log Message:
We have some COMPAT_30 code that needs compat_offseterr(), so let's
require the compat_util module.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.7 -r1.1.2.8 src/sys/compat/common/compat_30_mod.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/compat/common/compat_30_mod.c
diff -u src/sys/compat/common/compat_30_mod.c:1.1.2.7 src/sys/compat/common/compat_30_mod.c:1.1.2.8
--- src/sys/compat/common/compat_30_mod.c:1.1.2.7	Sat Sep 15 02:14:39 2018
+++ src/sys/compat/common/compat_30_mod.c	Wed Sep 19 06:37:11 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: compat_30_mod.c,v 1.1.2.7 2018/09/15 02:14:39 pgoyette Exp $	*/
+/*	$NetBSD: compat_30_mod.c,v 1.1.2.8 2018/09/19 06:37:11 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: compat_30_mod.c,v 1.1.2.7 2018/09/15 02:14:39 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: compat_30_mod.c,v 1.1.2.8 2018/09/19 06:37:11 pgoyette Exp $");
 
 #include 
 #include 
@@ -98,7 +98,7 @@ compat_30_fini(void)
 	return error;
 }
 
-MODULE(MODULE_CLASS_EXEC, compat_30, "compat_40");
+MODULE(MODULE_CLASS_EXEC, compat_30, "compat_util,compat_40");
 
 static int
 compat_30_modcmd(modcmd_t cmd, void *arg)



CVS commit: [pgoyette-compat] src/sys/compat/common

2018-09-18 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Wed Sep 19 04:22:33 UTC 2018

Modified Files:
src/sys/compat/common [pgoyette-compat]: Makefile.sysio

Log Message:
Update for new vnd_50.c source file.

Not really necessary to update this, since we're no longer building
the "monolithic" compat module.  But let's maintain it correctly, at
least until we delete the file.


To generate a diff of this commit:
cvs rdiff -u -r1.7.18.21 -r1.7.18.22 src/sys/compat/common/Makefile.sysio

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/compat/common/Makefile.sysio
diff -u src/sys/compat/common/Makefile.sysio:1.7.18.21 src/sys/compat/common/Makefile.sysio:1.7.18.22
--- src/sys/compat/common/Makefile.sysio:1.7.18.21	Tue Apr 17 07:24:54 2018
+++ src/sys/compat/common/Makefile.sysio	Wed Sep 19 04:22:33 2018
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.sysio,v 1.7.18.21 2018/04/17 07:24:54 pgoyette Exp $
+#	$NetBSD: Makefile.sysio,v 1.7.18.22 2018/09/19 04:22:33 pgoyette Exp $
 
 # Sources for syscall and ioctl compatibility across the versions.
 
@@ -38,7 +38,7 @@ SRCS+=	vfs_syscalls_40.c uipc_syscalls_4
 # Compatibility code for NetBSD 5.0
 SRCS+=	kern_50.c kern_time_50.c kern_select_50.c rndpseudo_50.c rtsock_50.c \
 	vfs_syscalls_50.c uipc_syscalls_50.c uvm_50.c clockctl_50.c \
-	if_spppsubr50.c
+	if_spppsubr50.c vnd_50.c
 
 # Compatibility code for NetBSD 6.0
 SRCS+=	kern_sa_60.c tty_60.c kern_time_60.c kern_cpu_60.c ccd_60.c



CVS commit: [pgoyette-compat] src/sys/compat/common

2018-09-14 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sat Sep 15 02:14:39 UTC 2018

Modified Files:
src/sys/compat/common [pgoyette-compat]: compat_09_mod.c
compat_10_mod.c compat_12_mod.c compat_13_mod.c compat_14_mod.c
compat_16_mod.c compat_20_mod.c compat_30_mod.c compat_40_mod.c
compat_50_mod.c compat_60_mod.c compat_70_mod.c compat_80_mod.c

Log Message:
Since we've already removed the maximum recursion depth for
required modules, there's no need for us to force loading of
the most-recent (ie, "deepest") modules first.  So, simplify
the required-modules lists to require only the next-highest
version's module.

This will also make it easier to add new compat_xx modules
for future release versions.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.3 -r1.1.2.4 src/sys/compat/common/compat_09_mod.c \
src/sys/compat/common/compat_10_mod.c \
src/sys/compat/common/compat_14_mod.c \
src/sys/compat/common/compat_16_mod.c \
src/sys/compat/common/compat_20_mod.c
cvs rdiff -u -r1.1.2.4 -r1.1.2.5 src/sys/compat/common/compat_12_mod.c \
src/sys/compat/common/compat_13_mod.c \
src/sys/compat/common/compat_40_mod.c
cvs rdiff -u -r1.1.2.6 -r1.1.2.7 src/sys/compat/common/compat_30_mod.c
cvs rdiff -u -r1.1.2.10 -r1.1.2.11 src/sys/compat/common/compat_50_mod.c
cvs rdiff -u -r1.1.2.17 -r1.1.2.18 src/sys/compat/common/compat_60_mod.c
cvs rdiff -u -r1.1.2.8 -r1.1.2.9 src/sys/compat/common/compat_70_mod.c \
src/sys/compat/common/compat_80_mod.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/compat/common/compat_09_mod.c
diff -u src/sys/compat/common/compat_09_mod.c:1.1.2.3 src/sys/compat/common/compat_09_mod.c:1.1.2.4
--- src/sys/compat/common/compat_09_mod.c:1.1.2.3	Thu Sep 13 22:53:52 2018
+++ src/sys/compat/common/compat_09_mod.c	Sat Sep 15 02:14:39 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: compat_09_mod.c,v 1.1.2.3 2018/09/13 22:53:52 pgoyette Exp $	*/
+/*	$NetBSD: compat_09_mod.c,v 1.1.2.4 2018/09/15 02:14:39 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: compat_09_mod.c,v 1.1.2.3 2018/09/13 22:53:52 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: compat_09_mod.c,v 1.1.2.4 2018/09/15 02:14:39 pgoyette Exp $");
 
 #include 
 #include 
@@ -69,12 +69,8 @@ compat_09_fini(void)
 	return 0;
 }
 
-#define REQD_09_1	"compat_80,compat_70,compat_60,compat_50,"
-#define REQD_09_2	"compat_40,compat_30,compat_20,compat_16,"
-#define REQD_09_3	"compat_14,compat_13,compat_12,compat_10,"
-#define REQD_09_4	"compat_util,compat_sysctl_09_43"
-
-MODULE(MODULE_CLASS_EXEC, compat_09, REQD_09_1 REQD_09_2 REQD_09_3 REQD_09_4);
+MODULE(MODULE_CLASS_EXEC, compat_09,
+"compat_10,compat_util,compat_sysctl_09_43");
 
 static int
 compat_09_modcmd(modcmd_t cmd, void *arg)
Index: src/sys/compat/common/compat_10_mod.c
diff -u src/sys/compat/common/compat_10_mod.c:1.1.2.3 src/sys/compat/common/compat_10_mod.c:1.1.2.4
--- src/sys/compat/common/compat_10_mod.c:1.1.2.3	Thu Sep 13 22:53:52 2018
+++ src/sys/compat/common/compat_10_mod.c	Sat Sep 15 02:14:39 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: compat_10_mod.c,v 1.1.2.3 2018/09/13 22:53:52 pgoyette Exp $	*/
+/*	$NetBSD: compat_10_mod.c,v 1.1.2.4 2018/09/15 02:14:39 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: compat_10_mod.c,v 1.1.2.3 2018/09/13 22:53:52 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: compat_10_mod.c,v 1.1.2.4 2018/09/15 02:14:39 pgoyette Exp $");
 
 #include 
 #include 
@@ -62,11 +62,7 @@ compat_10_fini(void)
 	return 0;
 }
 
-#define REQD_10_1	"compat_80,compat_70,compat_60,compat_50,"
-#define REQD_10_2	"compat_40,compat_30,compat_20,compat_16,"
-#define REQD_10_3	"compat_14,compat_13,compat_12,compat_util"
-
-MODULE(MODULE_CLASS_EXEC, compat_10, REQD_10_1 REQD_10_2 REQD_10_3);
+MODULE(MODULE_CLASS_EXEC, compat_10, "compat_12,compat_util");
 
 static int
 compat_10_modcmd(modcmd_t cmd, void *arg)
Index: src/sys/compat/common/compat_14_mod.c
diff -u src/sys/compat/common/compat_14_mod.c:1.1.2.3 src/sys/compat/common/compat_14_mod.c:1.1.2.4
--- src/sys/compat/common/compat_14_mod.c:1.1.2.3	Thu Sep 13 22:53:52 2018
+++ src/sys/compat/common/compat_14_mod.c	Sat Sep 15 02:14:39 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: compat_14_mod.c,v 1.1.2.3 2018/09/13 22:53:52 pgoyette Exp $	*/
+/*	$NetBSD: compat_14_mod.c,v 1.1.2.4 2018/09/15 02:14:39 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: compat_14_mod.c,v 1.1.2.3 2018/09/13 22:53:52 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: compat_14_mod.c,v 1.1.2.4 2018/09/15 02:14:39 pgoyette Exp $");
 
 #include 
 #include 
@@ -62,10 +62,7 @@ compat_14_fini(void)
 	return 0;
 }
 
-#define REQD_14_1	

CVS commit: [pgoyette-compat] src/sys/compat/common

2018-09-13 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Thu Sep 13 23:33:56 UTC 2018

Modified Files:
src/sys/compat/common [pgoyette-compat]: kern_time_50.c

Log Message:
Remove duplicate syscall package entry for ntp_gettime30.  Duplicate
entries cause a panic when disestablishing, since when it looks at the
second entry it finds that the entrypoint doesn't match what's in the
package (it's alrady been reverted to sys_nosys() by the first entry.)


To generate a diff of this commit:
cvs rdiff -u -r1.31.16.2 -r1.31.16.3 src/sys/compat/common/kern_time_50.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/compat/common/kern_time_50.c
diff -u src/sys/compat/common/kern_time_50.c:1.31.16.2 src/sys/compat/common/kern_time_50.c:1.31.16.3
--- src/sys/compat/common/kern_time_50.c:1.31.16.2	Tue Mar 20 08:11:25 2018
+++ src/sys/compat/common/kern_time_50.c	Thu Sep 13 23:33:56 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_time_50.c,v 1.31.16.2 2018/03/20 08:11:25 pgoyette Exp $	*/
+/*	$NetBSD: kern_time_50.c,v 1.31.16.3 2018/09/13 23:33:56 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kern_time_50.c,v 1.31.16.2 2018/03/20 08:11:25 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_time_50.c,v 1.31.16.3 2018/09/13 23:33:56 pgoyette Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_aio.h"
@@ -102,8 +102,6 @@ static const struct syscall_package kern
 	(sy_call_t *)compat_50_sys_timer_gettime },
 	{ SYS_compat_50___ntp_gettime30, 0,
 	(sy_call_t *)compat_50_sys___ntp_gettime30 },
-	{ SYS_compat_50___ntp_gettime30, 0,
-	(sy_call_t *)compat_50_sys___ntp_gettime30 },
 	{ 0, 0, NULL }
 }; 
 



CVS commit: [pgoyette-compat] src/sys/compat/common

2018-09-13 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Thu Sep 13 22:53:52 UTC 2018

Modified Files:
src/sys/compat/common [pgoyette-compat]: compat_09_mod.c
compat_10_mod.c compat_12_mod.c compat_13_mod.c compat_14_mod.c
compat_16_mod.c compat_30_mod.c compat_40_mod.c compat_43_mod.c
compat_50_mod.c compat_60_mod.c

Log Message:
When unloading a module with MODULE_CMD_FINI, call the compat_xx_fini()
routine rather than again calling the compat_xx_init() routine!

(Cut strikes again)


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.2 -r1.1.2.3 src/sys/compat/common/compat_09_mod.c \
src/sys/compat/common/compat_10_mod.c \
src/sys/compat/common/compat_14_mod.c \
src/sys/compat/common/compat_16_mod.c \
src/sys/compat/common/compat_43_mod.c
cvs rdiff -u -r1.1.2.3 -r1.1.2.4 src/sys/compat/common/compat_12_mod.c \
src/sys/compat/common/compat_13_mod.c \
src/sys/compat/common/compat_40_mod.c
cvs rdiff -u -r1.1.2.5 -r1.1.2.6 src/sys/compat/common/compat_30_mod.c
cvs rdiff -u -r1.1.2.9 -r1.1.2.10 src/sys/compat/common/compat_50_mod.c
cvs rdiff -u -r1.1.2.16 -r1.1.2.17 src/sys/compat/common/compat_60_mod.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/compat/common/compat_09_mod.c
diff -u src/sys/compat/common/compat_09_mod.c:1.1.2.2 src/sys/compat/common/compat_09_mod.c:1.1.2.3
--- src/sys/compat/common/compat_09_mod.c:1.1.2.2	Mon Sep 10 08:41:47 2018
+++ src/sys/compat/common/compat_09_mod.c	Thu Sep 13 22:53:52 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: compat_09_mod.c,v 1.1.2.2 2018/09/10 08:41:47 pgoyette Exp $	*/
+/*	$NetBSD: compat_09_mod.c,v 1.1.2.3 2018/09/13 22:53:52 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: compat_09_mod.c,v 1.1.2.2 2018/09/10 08:41:47 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: compat_09_mod.c,v 1.1.2.3 2018/09/13 22:53:52 pgoyette Exp $");
 
 #include 
 #include 
@@ -84,7 +84,7 @@ compat_09_modcmd(modcmd_t cmd, void *arg
 	case MODULE_CMD_INIT:
 		return compat_09_init();
 	case MODULE_CMD_FINI:
-		return compat_09_init();
+		return compat_09_fini();
 	default:
 		return ENOTTY;
 	}
Index: src/sys/compat/common/compat_10_mod.c
diff -u src/sys/compat/common/compat_10_mod.c:1.1.2.2 src/sys/compat/common/compat_10_mod.c:1.1.2.3
--- src/sys/compat/common/compat_10_mod.c:1.1.2.2	Mon Sep 10 08:41:47 2018
+++ src/sys/compat/common/compat_10_mod.c	Thu Sep 13 22:53:52 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: compat_10_mod.c,v 1.1.2.2 2018/09/10 08:41:47 pgoyette Exp $	*/
+/*	$NetBSD: compat_10_mod.c,v 1.1.2.3 2018/09/13 22:53:52 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: compat_10_mod.c,v 1.1.2.2 2018/09/10 08:41:47 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: compat_10_mod.c,v 1.1.2.3 2018/09/13 22:53:52 pgoyette Exp $");
 
 #include 
 #include 
@@ -76,7 +76,7 @@ compat_10_modcmd(modcmd_t cmd, void *arg
 	case MODULE_CMD_INIT:
 		return compat_10_init();
 	case MODULE_CMD_FINI:
-		return compat_10_init();
+		return compat_10_fini();
 	default:
 		return ENOTTY;
 	}
Index: src/sys/compat/common/compat_14_mod.c
diff -u src/sys/compat/common/compat_14_mod.c:1.1.2.2 src/sys/compat/common/compat_14_mod.c:1.1.2.3
--- src/sys/compat/common/compat_14_mod.c:1.1.2.2	Mon Sep 10 08:41:47 2018
+++ src/sys/compat/common/compat_14_mod.c	Thu Sep 13 22:53:52 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: compat_14_mod.c,v 1.1.2.2 2018/09/10 08:41:47 pgoyette Exp $	*/
+/*	$NetBSD: compat_14_mod.c,v 1.1.2.3 2018/09/13 22:53:52 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: compat_14_mod.c,v 1.1.2.2 2018/09/10 08:41:47 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: compat_14_mod.c,v 1.1.2.3 2018/09/13 22:53:52 pgoyette Exp $");
 
 #include 
 #include 
@@ -75,7 +75,7 @@ compat_14_modcmd(modcmd_t cmd, void *arg
 	case MODULE_CMD_INIT:
 		return compat_14_init();
 	case MODULE_CMD_FINI:
-		return compat_14_init();
+		return compat_14_fini();
 	default:
 		return ENOTTY;
 	}
Index: src/sys/compat/common/compat_16_mod.c
diff -u src/sys/compat/common/compat_16_mod.c:1.1.2.2 src/sys/compat/common/compat_16_mod.c:1.1.2.3
--- src/sys/compat/common/compat_16_mod.c:1.1.2.2	Mon Sep 10 08:41:47 2018
+++ src/sys/compat/common/compat_16_mod.c	Thu Sep 13 22:53:52 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: compat_16_mod.c,v 1.1.2.2 2018/09/10 08:41:47 pgoyette Exp $	*/
+/*	$NetBSD: compat_16_mod.c,v 1.1.2.3 2018/09/13 22:53:52 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: compat_16_mod.c,v 1.1.2.2 2018/09/10 08:41:47 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: compat_16_mod.c,v 1.1.2.3 2018/09/13 

CVS commit: [pgoyette-compat] src/sys/compat/common

2018-09-13 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Thu Sep 13 21:42:25 UTC 2018

Modified Files:
src/sys/compat/common [pgoyette-compat]: compat_20_mod.c

Log Message:
Fix typo - Don't try to re-init the submodule when doing MODULE_CMD_fINI!


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.2 -r1.1.2.3 src/sys/compat/common/compat_20_mod.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/compat/common/compat_20_mod.c
diff -u src/sys/compat/common/compat_20_mod.c:1.1.2.2 src/sys/compat/common/compat_20_mod.c:1.1.2.3
--- src/sys/compat/common/compat_20_mod.c:1.1.2.2	Mon Sep 10 08:41:47 2018
+++ src/sys/compat/common/compat_20_mod.c	Thu Sep 13 21:42:24 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: compat_20_mod.c,v 1.1.2.2 2018/09/10 08:41:47 pgoyette Exp $	*/
+/*	$NetBSD: compat_20_mod.c,v 1.1.2.3 2018/09/13 21:42:24 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: compat_20_mod.c,v 1.1.2.2 2018/09/10 08:41:47 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: compat_20_mod.c,v 1.1.2.3 2018/09/13 21:42:24 pgoyette Exp $");
 
 #include 
 #include 
@@ -90,7 +90,7 @@ compat_20_modcmd(modcmd_t cmd, void *arg
 	case MODULE_CMD_INIT:
 		return compat_20_init();
 	case MODULE_CMD_FINI:
-		return compat_20_init();
+		return compat_20_fini();
 	default:
 		return ENOTTY;
 	}



CVS commit: [pgoyette-compat] src/sys/compat/common

2018-09-12 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Thu Sep 13 00:15:01 UTC 2018

Modified Files:
src/sys/compat/common [pgoyette-compat]: compat_sysv_10_mod.c
compat_sysv_14_mod.c

Log Message:
Fix some module requirements


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.1 -r1.1.2.2 src/sys/compat/common/compat_sysv_10_mod.c \
src/sys/compat/common/compat_sysv_14_mod.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/compat/common/compat_sysv_10_mod.c
diff -u src/sys/compat/common/compat_sysv_10_mod.c:1.1.2.1 src/sys/compat/common/compat_sysv_10_mod.c:1.1.2.2
--- src/sys/compat/common/compat_sysv_10_mod.c:1.1.2.1	Tue Apr 17 23:06:11 2018
+++ src/sys/compat/common/compat_sysv_10_mod.c	Thu Sep 13 00:15:00 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: compat_sysv_10_mod.c,v 1.1.2.1 2018/04/17 23:06:11 pgoyette Exp $	*/
+/*	$NetBSD: compat_sysv_10_mod.c,v 1.1.2.2 2018/09/13 00:15:00 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: compat_sysv_10_mod.c,v 1.1.2.1 2018/04/17 23:06:11 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: compat_sysv_10_mod.c,v 1.1.2.2 2018/09/13 00:15:00 pgoyette Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
@@ -44,7 +44,8 @@ __KERNEL_RCSID(0, "$NetBSD: compat_sysv_
 #include 
 #include 
 
-MODULE(MODULE_CLASS_EXEC, compat_sysv_10, "sysv_ipc,sysv_50,sysv_14");
+MODULE(MODULE_CLASS_EXEC, compat_sysv_10,
+"sysv_ipc,compat_sysv_50,compat_sysv_14");
 
 /* Build the syscall package based on options specified */
 
Index: src/sys/compat/common/compat_sysv_14_mod.c
diff -u src/sys/compat/common/compat_sysv_14_mod.c:1.1.2.1 src/sys/compat/common/compat_sysv_14_mod.c:1.1.2.2
--- src/sys/compat/common/compat_sysv_14_mod.c:1.1.2.1	Tue Apr 17 23:06:11 2018
+++ src/sys/compat/common/compat_sysv_14_mod.c	Thu Sep 13 00:15:00 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: compat_sysv_14_mod.c,v 1.1.2.1 2018/04/17 23:06:11 pgoyette Exp $	*/
+/*	$NetBSD: compat_sysv_14_mod.c,v 1.1.2.2 2018/09/13 00:15:00 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: compat_sysv_14_mod.c,v 1.1.2.1 2018/04/17 23:06:11 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: compat_sysv_14_mod.c,v 1.1.2.2 2018/09/13 00:15:00 pgoyette Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
@@ -44,7 +44,7 @@ __KERNEL_RCSID(0, "$NetBSD: compat_sysv_
 #include 
 #include 
 
-MODULE(MODULE_CLASS_EXEC, compat_sysv_14, "sysv_ipc_50,sysv_ipc");
+MODULE(MODULE_CLASS_EXEC, compat_sysv_14, "compat_sysv_50,sysv_ipc");
 
 /* Build the syscall package based on options specified */
 



CVS commit: [pgoyette-compat] src/sys/compat/common

2018-09-10 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Mon Sep 10 08:41:47 UTC 2018

Modified Files:
src/sys/compat/common [pgoyette-compat]: compat_09_mod.c
compat_10_mod.c compat_12_mod.c compat_13_mod.c compat_14_mod.c
compat_16_mod.c compat_20_mod.c compat_30_mod.c compat_40_mod.c
compat_43_mod.c compat_50_mod.c compat_60_mod.c compat_70_mod.c
compat_80_mod.c compat_sysctl_09_43.c compat_util.c files.common

Log Message:
Remove the monolithic compat and compat_sysv modules.  Now that we
don't have aliases, we need to use only the version-specific module
names when resolving dependencies.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.1 -r1.1.2.2 src/sys/compat/common/compat_09_mod.c \
src/sys/compat/common/compat_10_mod.c \
src/sys/compat/common/compat_14_mod.c \
src/sys/compat/common/compat_16_mod.c \
src/sys/compat/common/compat_20_mod.c \
src/sys/compat/common/compat_43_mod.c \
src/sys/compat/common/compat_sysctl_09_43.c
cvs rdiff -u -r1.1.2.2 -r1.1.2.3 src/sys/compat/common/compat_12_mod.c \
src/sys/compat/common/compat_13_mod.c \
src/sys/compat/common/compat_40_mod.c
cvs rdiff -u -r1.1.2.4 -r1.1.2.5 src/sys/compat/common/compat_30_mod.c
cvs rdiff -u -r1.1.2.8 -r1.1.2.9 src/sys/compat/common/compat_50_mod.c
cvs rdiff -u -r1.1.2.15 -r1.1.2.16 src/sys/compat/common/compat_60_mod.c
cvs rdiff -u -r1.1.2.7 -r1.1.2.8 src/sys/compat/common/compat_70_mod.c \
src/sys/compat/common/compat_80_mod.c
cvs rdiff -u -r1.46.18.2 -r1.46.18.3 src/sys/compat/common/compat_util.c
cvs rdiff -u -r1.1.2.33 -r1.1.2.34 src/sys/compat/common/files.common

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/compat/common/compat_09_mod.c
diff -u src/sys/compat/common/compat_09_mod.c:1.1.2.1 src/sys/compat/common/compat_09_mod.c:1.1.2.2
--- src/sys/compat/common/compat_09_mod.c:1.1.2.1	Tue Apr 17 08:07:13 2018
+++ src/sys/compat/common/compat_09_mod.c	Mon Sep 10 08:41:47 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: compat_09_mod.c,v 1.1.2.1 2018/04/17 08:07:13 pgoyette Exp $	*/
+/*	$NetBSD: compat_09_mod.c,v 1.1.2.2 2018/09/10 08:41:47 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: compat_09_mod.c,v 1.1.2.1 2018/04/17 08:07:13 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: compat_09_mod.c,v 1.1.2.2 2018/09/10 08:41:47 pgoyette Exp $");
 
 #include 
 #include 
@@ -69,8 +69,6 @@ compat_09_fini(void)
 	return 0;
 }
 
-#ifdef _MODULE
-
 #define REQD_09_1	"compat_80,compat_70,compat_60,compat_50,"
 #define REQD_09_2	"compat_40,compat_30,compat_20,compat_16,"
 #define REQD_09_3	"compat_14,compat_13,compat_12,compat_10,"
@@ -91,4 +89,3 @@ compat_09_modcmd(modcmd_t cmd, void *arg
 		return ENOTTY;
 	}
 }
-#endif
Index: src/sys/compat/common/compat_10_mod.c
diff -u src/sys/compat/common/compat_10_mod.c:1.1.2.1 src/sys/compat/common/compat_10_mod.c:1.1.2.2
--- src/sys/compat/common/compat_10_mod.c:1.1.2.1	Tue Apr 17 08:07:13 2018
+++ src/sys/compat/common/compat_10_mod.c	Mon Sep 10 08:41:47 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: compat_10_mod.c,v 1.1.2.1 2018/04/17 08:07:13 pgoyette Exp $	*/
+/*	$NetBSD: compat_10_mod.c,v 1.1.2.2 2018/09/10 08:41:47 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: compat_10_mod.c,v 1.1.2.1 2018/04/17 08:07:13 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: compat_10_mod.c,v 1.1.2.2 2018/09/10 08:41:47 pgoyette Exp $");
 
 #include 
 #include 
@@ -62,8 +62,6 @@ compat_10_fini(void)
 	return 0;
 }
 
-#ifdef _MODULE
-
 #define REQD_10_1	"compat_80,compat_70,compat_60,compat_50,"
 #define REQD_10_2	"compat_40,compat_30,compat_20,compat_16,"
 #define REQD_10_3	"compat_14,compat_13,compat_12,compat_util"
@@ -83,4 +81,3 @@ compat_10_modcmd(modcmd_t cmd, void *arg
 		return ENOTTY;
 	}
 }
-#endif
Index: src/sys/compat/common/compat_14_mod.c
diff -u src/sys/compat/common/compat_14_mod.c:1.1.2.1 src/sys/compat/common/compat_14_mod.c:1.1.2.2
--- src/sys/compat/common/compat_14_mod.c:1.1.2.1	Fri Mar 30 10:09:07 2018
+++ src/sys/compat/common/compat_14_mod.c	Mon Sep 10 08:41:47 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: compat_14_mod.c,v 1.1.2.1 2018/03/30 10:09:07 pgoyette Exp $	*/
+/*	$NetBSD: compat_14_mod.c,v 1.1.2.2 2018/09/10 08:41:47 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: compat_14_mod.c,v 1.1.2.1 2018/03/30 10:09:07 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: compat_14_mod.c,v 1.1.2.2 2018/09/10 08:41:47 pgoyette Exp $");
 
 #include 
 #include 
@@ -62,8 +62,6 @@ compat_14_fini(void)
 	return 0;
 }
 
-#ifdef _MODULE
-
 #define REQD_14_1	"compat_80,compat_70,compat_60,compat_50,"
 #define REQD_14_2	"compat_40,compat_30,compat_20,compat_16"
 
@@ -82,4 

CVS commit: [pgoyette-compat] src/sys/compat/common

2018-09-06 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Thu Sep  6 21:37:43 UTC 2018

Modified Files:
src/sys/compat/common [pgoyette-compat]: kern_mod_80.c

Log Message:
Remove editor glitch


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.2 -r1.1.2.3 src/sys/compat/common/kern_mod_80.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/compat/common/kern_mod_80.c
diff -u src/sys/compat/common/kern_mod_80.c:1.1.2.2 src/sys/compat/common/kern_mod_80.c:1.1.2.3
--- src/sys/compat/common/kern_mod_80.c:1.1.2.2	Thu Sep  6 21:22:05 2018
+++ src/sys/compat/common/kern_mod_80.c	Thu Sep  6 21:37:43 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_mod_80.c,v 1.1.2.2 2018/09/06 21:22:05 pgoyette Exp $	*/
+/*	$NetBSD: kern_mod_80.c,v 1.1.2.3 2018/09/06 21:37:43 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kern_mod_80.c,v 1.1.2.2 2018/09/06 21:22:05 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_mod_80.c,v 1.1.2.3 2018/09/06 21:37:43 pgoyette Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_modular.h"
@@ -161,7 +161,6 @@ compat_80_modstat(int cmd, struct iovec 
 		if (mod->mod_kobj != NULL && stataddr) {
 			kobj_stat(mod->mod_kobj, , );
 			oms->oms_addr = addr;
-A
 			oms->oms_size = size;
 		}
 		oms->oms_class = mi->mi_class;



CVS commit: [pgoyette-compat] src/sys/compat/common

2018-09-06 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Thu Sep  6 21:22:05 UTC 2018

Modified Files:
src/sys/compat/common [pgoyette-compat]: kern_mod_80.c

Log Message:
Catch up to recent change on head:  min() -> uimin()


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.1 -r1.1.2.2 src/sys/compat/common/kern_mod_80.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/compat/common/kern_mod_80.c
diff -u src/sys/compat/common/kern_mod_80.c:1.1.2.1 src/sys/compat/common/kern_mod_80.c:1.1.2.2
--- src/sys/compat/common/kern_mod_80.c:1.1.2.1	Tue Apr  3 08:29:44 2018
+++ src/sys/compat/common/kern_mod_80.c	Thu Sep  6 21:22:05 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_mod_80.c,v 1.1.2.1 2018/04/03 08:29:44 pgoyette Exp $	*/
+/*	$NetBSD: kern_mod_80.c,v 1.1.2.2 2018/09/06 21:22:05 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kern_mod_80.c,v 1.1.2.1 2018/04/03 08:29:44 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_mod_80.c,v 1.1.2.2 2018/09/06 21:22:05 pgoyette Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_modular.h"
@@ -161,6 +161,7 @@ compat_80_modstat(int cmd, struct iovec 
 		if (mod->mod_kobj != NULL && stataddr) {
 			kobj_stat(mod->mod_kobj, , );
 			oms->oms_addr = addr;
+A
 			oms->oms_size = size;
 		}
 		oms->oms_class = mi->mi_class;
@@ -178,7 +179,7 @@ compat_80_modstat(int cmd, struct iovec 
 		}
 	}
 	kernconfig_unlock();
-	error = copyout(omso, iov->iov_base, min(omslen, iov->iov_len));
+	error = copyout(omso, iov->iov_base, uimin(omslen, iov->iov_len));
 	kmem_free(omso, omslen);
 	if (error == 0) {
 		iov->iov_len = omslen;



CVS commit: [pgoyette-compat] src/sys/compat/common

2018-09-04 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Tue Sep  4 11:25:53 UTC 2018

Modified Files:
src/sys/compat/common [pgoyette-compat]: compat_sysv_mod.c

Log Message:
Use correct module names for the aliases.


To generate a diff of this commit:
cvs rdiff -u -r1.4.10.2 -r1.4.10.3 src/sys/compat/common/compat_sysv_mod.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/compat/common/compat_sysv_mod.c
diff -u src/sys/compat/common/compat_sysv_mod.c:1.4.10.2 src/sys/compat/common/compat_sysv_mod.c:1.4.10.3
--- src/sys/compat/common/compat_sysv_mod.c:1.4.10.2	Tue Apr 17 23:06:11 2018
+++ src/sys/compat/common/compat_sysv_mod.c	Tue Sep  4 11:25:53 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: compat_sysv_mod.c,v 1.4.10.2 2018/04/17 23:06:11 pgoyette Exp $	*/
+/*	$NetBSD: compat_sysv_mod.c,v 1.4.10.3 2018/09/04 11:25:53 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: compat_sysv_mod.c,v 1.4.10.2 2018/04/17 23:06:11 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: compat_sysv_mod.c,v 1.4.10.3 2018/09/04 11:25:53 pgoyette Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
@@ -47,7 +47,7 @@ __KERNEL_RCSID(0, "$NetBSD: compat_sysv_
 #include 
 
 static const char * const compat_sysv_includes[] = {
-"compat_sysv_50", "compat_14", "compat_10", NULL
+"compat_sysv_50", "compat_sysv_14", "compat_sysv_10", NULL
 };
 
 MODULE_WITH_ALIASES(MODULE_CLASS_EXEC, compat_sysv, "sysv_ipc",



CVS commit: [pgoyette-compat] src/sys/compat/common

2018-05-04 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Fri May  4 08:19:47 UTC 2018

Modified Files:
src/sys/compat/common [pgoyette-compat]: kern_sig_16.c

Log Message:
Add comment to note that compat_16_sigreturn14 is in MD code!


To generate a diff of this commit:
cvs rdiff -u -r1.2.38.2 -r1.2.38.3 src/sys/compat/common/kern_sig_16.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/compat/common/kern_sig_16.c
diff -u src/sys/compat/common/kern_sig_16.c:1.2.38.2 src/sys/compat/common/kern_sig_16.c:1.2.38.3
--- src/sys/compat/common/kern_sig_16.c:1.2.38.2	Tue Apr 17 07:24:55 2018
+++ src/sys/compat/common/kern_sig_16.c	Fri May  4 08:19:47 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_sig_16.c,v 1.2.38.2 2018/04/17 07:24:55 pgoyette Exp $	*/
+/*	$NetBSD: kern_sig_16.c,v 1.2.38.3 2018/05/04 08:19:47 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -66,7 +66,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kern_sig_16.c,v 1.2.38.2 2018/04/17 07:24:55 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_sig_16.c,v 1.2.38.3 2018/05/04 08:19:47 pgoyette Exp $");
 
 #include 
 #include 
@@ -99,6 +99,7 @@ static const struct syscall_package kern
 #ifdef COMPAT_SIGCONTEXT
 	{ SYS_compat_16___sigaction14, 0,
 	(sy_call_t *)compat_16_sys___sigaction14 },
+	/* compat_16_sigreturn14 is in MD code! */
 	{ SYS_compat_16___sigreturn14, 0,
 	(sy_call_t *)compat_16_sys___sigreturn14 },
 #endif



CVS commit: [pgoyette-compat] src/sys/compat/common

2018-05-04 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Fri May  4 08:13:18 UTC 2018

Modified Files:
src/sys/compat/common [pgoyette-compat]: uipc_syscalls_43.c

Log Message:
Undo merge of changes from HEAD.  This will get re-done properly
at the next sync-with-HEAD (which will also pull in other changes
needed).


To generate a diff of this commit:
cvs rdiff -u -r1.47.14.3 -r1.47.14.4 src/sys/compat/common/uipc_syscalls_43.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/compat/common/uipc_syscalls_43.c
diff -u src/sys/compat/common/uipc_syscalls_43.c:1.47.14.3 src/sys/compat/common/uipc_syscalls_43.c:1.47.14.4
--- src/sys/compat/common/uipc_syscalls_43.c:1.47.14.3	Fri May  4 02:38:46 2018
+++ src/sys/compat/common/uipc_syscalls_43.c	Fri May  4 08:13:18 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: uipc_syscalls_43.c,v 1.47.14.3 2018/05/04 02:38:46 pgoyette Exp $	*/
+/*	$NetBSD: uipc_syscalls_43.c,v 1.47.14.4 2018/05/04 08:13:18 pgoyette Exp $	*/
 
 /*
  * Copyright (c) 1982, 1986, 1989, 1990, 1993
@@ -32,7 +32,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: uipc_syscalls_43.c,v 1.47.14.3 2018/05/04 02:38:46 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uipc_syscalls_43.c,v 1.47.14.4 2018/05/04 08:13:18 pgoyette Exp $");
 
 #include 
 #include 
@@ -233,7 +233,7 @@ compat_43_sys_recvmsg(struct lwp *l, con
 	msg.msg_iov	= omsg.msg_iov;
 	msg.msg_flags	= (SCARG(uap, flags) & MSG_USERFLAGS) | MSG_IOVUSRSPACE;
 
-	error = do_sys_recvmsg(l, SCARG(uap, s), , NULL, ,
+	error = do_sys_recvmsg(l, SCARG(uap, s), , NULL, 0, ,
 	omsg.msg_accrights != NULL ?  : NULL, retval);
 	if (error != 0)
 		return error;
@@ -380,7 +380,7 @@ compat_43_sys_sendmsg(struct lwp *l, con
 		goto bad;
 
 	return do_sys_sendmsg(l, SCARG(uap, s), , SCARG(uap, flags),
-	retval);
+	NULL, 0, retval);
 
 bad:
 	if (nam != NULL)



CVS commit: [pgoyette-compat] src/sys/compat/common

2018-05-03 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Fri May  4 02:38:46 UTC 2018

Modified Files:
src/sys/compat/common [pgoyette-compat]: uipc_syscalls_43.c

Log Message:
Merge rev 1.49 from HEAD


To generate a diff of this commit:
cvs rdiff -u -r1.47.14.2 -r1.47.14.3 src/sys/compat/common/uipc_syscalls_43.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/compat/common/uipc_syscalls_43.c
diff -u src/sys/compat/common/uipc_syscalls_43.c:1.47.14.2 src/sys/compat/common/uipc_syscalls_43.c:1.47.14.3
--- src/sys/compat/common/uipc_syscalls_43.c:1.47.14.2	Tue Apr 17 00:02:58 2018
+++ src/sys/compat/common/uipc_syscalls_43.c	Fri May  4 02:38:46 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: uipc_syscalls_43.c,v 1.47.14.2 2018/04/17 00:02:58 pgoyette Exp $	*/
+/*	$NetBSD: uipc_syscalls_43.c,v 1.47.14.3 2018/05/04 02:38:46 pgoyette Exp $	*/
 
 /*
  * Copyright (c) 1982, 1986, 1989, 1990, 1993
@@ -32,7 +32,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: uipc_syscalls_43.c,v 1.47.14.2 2018/04/17 00:02:58 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uipc_syscalls_43.c,v 1.47.14.3 2018/05/04 02:38:46 pgoyette Exp $");
 
 #include 
 #include 
@@ -233,7 +233,7 @@ compat_43_sys_recvmsg(struct lwp *l, con
 	msg.msg_iov	= omsg.msg_iov;
 	msg.msg_flags	= (SCARG(uap, flags) & MSG_USERFLAGS) | MSG_IOVUSRSPACE;
 
-	error = do_sys_recvmsg(l, SCARG(uap, s), , NULL, 0, ,
+	error = do_sys_recvmsg(l, SCARG(uap, s), , NULL, ,
 	omsg.msg_accrights != NULL ?  : NULL, retval);
 	if (error != 0)
 		return error;
@@ -380,7 +380,7 @@ compat_43_sys_sendmsg(struct lwp *l, con
 		goto bad;
 
 	return do_sys_sendmsg(l, SCARG(uap, s), , SCARG(uap, flags),
-	NULL, 0, retval);
+	retval);
 
 bad:
 	if (nam != NULL)



CVS commit: [pgoyette-compat] src/sys/compat/common

2018-04-26 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Thu Apr 26 09:37:22 UTC 2018

Modified Files:
src/sys/compat/common [pgoyette-compat]: uipc_syscalls_50.c

Log Message:
Import rev 1.5 from HEAD


To generate a diff of this commit:
cvs rdiff -u -r1.3.56.6 -r1.3.56.7 src/sys/compat/common/uipc_syscalls_50.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/compat/common/uipc_syscalls_50.c
diff -u src/sys/compat/common/uipc_syscalls_50.c:1.3.56.6 src/sys/compat/common/uipc_syscalls_50.c:1.3.56.7
--- src/sys/compat/common/uipc_syscalls_50.c:1.3.56.6	Mon Apr 16 03:41:34 2018
+++ src/sys/compat/common/uipc_syscalls_50.c	Thu Apr 26 09:37:22 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: uipc_syscalls_50.c,v 1.3.56.6 2018/04/16 03:41:34 pgoyette Exp $	*/
+/*	$NetBSD: uipc_syscalls_50.c,v 1.3.56.7 2018/04/26 09:37:22 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: uipc_syscalls_50.c,v 1.3.56.6 2018/04/16 03:41:34 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uipc_syscalls_50.c,v 1.3.56.7 2018/04/26 09:37:22 pgoyette Exp $");
 
 #include 
 #include 
@@ -66,10 +66,19 @@ compat_ifdatareq(struct lwp *l, u_long c
 	struct ifnet *ifp;
 	int error;
 
-	ifp = ifunit(ifdr->ifdr_name);
-	if (ifp == NULL)
-		return ENXIO;
+	/* Validate arguments. */
+	switch (cmd) {
+	case SIOCGIFDATA:
+	case SIOCZIFDATA:
+		ifp = ifunit(ifdr->ifdr_name);
+		if (ifp == NULL)
+			return ENXIO;
+		break;
+	default:
+		return ENOSYS;
+	}
 
+	/* Do work. */
 	switch (cmd) {
 	case SIOCGIFDATA:
 		ifdatan2o(>ifdr_data, >if_data);
@@ -94,6 +103,7 @@ compat_ifdatareq(struct lwp *l, u_long c
 		return 0;
 
 	default:
+		/* Impossible due to above validation, but makes gcc happy. */
 		return ENOSYS;
 	}
 }



CVS commit: [pgoyette-compat] src/sys/compat/common

2018-04-17 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Tue Apr 17 22:31:41 UTC 2018

Modified Files:
src/sys/compat/common [pgoyette-compat]: compat_mod.c

Log Message:
Ooops - forgot to enable the last couple of alias module names.


To generate a diff of this commit:
cvs rdiff -u -r1.24.14.34 -r1.24.14.35 src/sys/compat/common/compat_mod.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/compat/common/compat_mod.c
diff -u src/sys/compat/common/compat_mod.c:1.24.14.34 src/sys/compat/common/compat_mod.c:1.24.14.35
--- src/sys/compat/common/compat_mod.c:1.24.14.34	Tue Apr 17 07:24:55 2018
+++ src/sys/compat/common/compat_mod.c	Tue Apr 17 22:31:41 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: compat_mod.c,v 1.24.14.34 2018/04/17 07:24:55 pgoyette Exp $	*/
+/*	$NetBSD: compat_mod.c,v 1.24.14.35 2018/04/17 22:31:41 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: compat_mod.c,v 1.24.14.34 2018/04/17 07:24:55 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: compat_mod.c,v 1.24.14.35 2018/04/17 22:31:41 pgoyette Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
@@ -56,7 +56,7 @@ __KERNEL_RCSID(0, "$NetBSD: compat_mod.c
 static const char * const compat_includes[] = {
 	"compat_80", "compat_70", "compat_60", "compat_50", "compat_40",
 	"compat_30", "compat_20", "compat_16", "compat_14", "compat_13",
-	"compat_12", /*"compat_10", "compat_09",*/ "compat_43", NULL
+	"compat_12", "compat_10", "compat_09", "compat_43", NULL
 };
 
 MODULE_WITH_ALIASES(MODULE_CLASS_EXEC, compat, NULL, _includes);



CVS commit: [pgoyette-compat] src/sys/compat/common

2018-04-17 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Tue Apr 17 08:07:13 UTC 2018

Added Files:
src/sys/compat/common [pgoyette-compat]: compat_09_mod.c
compat_10_mod.c compat_43_mod.c

Log Message:
Actually commit these three files to provide module interfaces


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1.2.1 src/sys/compat/common/compat_09_mod.c \
src/sys/compat/common/compat_10_mod.c \
src/sys/compat/common/compat_43_mod.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Added files:

Index: src/sys/compat/common/compat_09_mod.c
diff -u /dev/null src/sys/compat/common/compat_09_mod.c:1.1.2.1
--- /dev/null	Tue Apr 17 08:07:13 2018
+++ src/sys/compat/common/compat_09_mod.c	Tue Apr 17 08:07:13 2018
@@ -0,0 +1,94 @@
+/*	$NetBSD: compat_09_mod.c,v 1.1.2.1 2018/04/17 08:07:13 pgoyette Exp $	*/
+
+/*-
+ * Copyright (c) 2018 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software developed for The NetBSD Foundation
+ * by Paul Goyette
+ *
+ * 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 
+__KERNEL_RCSID(0, "$NetBSD: compat_09_mod.c,v 1.1.2.1 2018/04/17 08:07:13 pgoyette Exp $");
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+#include 
+
+
+static int saved_pgid_mask;
+
+int
+compat_09_init(void)
+{
+
+	kern_info_09_init();
+	saved_pgid_mask = kern_sig_43_pgid_mask;
+	kern_sig_43_pgid_mask = 0x;
+	return 0;
+}
+
+int
+compat_09_fini(void)
+{
+
+	kern_info_09_fini();
+	kern_sig_43_pgid_mask = saved_pgid_mask;
+	return 0;
+}
+
+#ifdef _MODULE
+
+#define REQD_09_1	"compat_80,compat_70,compat_60,compat_50,"
+#define REQD_09_2	"compat_40,compat_30,compat_20,compat_16,"
+#define REQD_09_3	"compat_14,compat_13,compat_12,compat_10,"
+#define REQD_09_4	"compat_util,compat_sysctl_09_43"
+
+MODULE(MODULE_CLASS_EXEC, compat_09, REQD_09_1 REQD_09_2 REQD_09_3 REQD_09_4);
+
+static int
+compat_09_modcmd(modcmd_t cmd, void *arg)
+{
+
+	switch (cmd) {
+	case MODULE_CMD_INIT:
+		return compat_09_init();
+	case MODULE_CMD_FINI:
+		return compat_09_init();
+	default:
+		return ENOTTY;
+	}
+}
+#endif
Index: src/sys/compat/common/compat_10_mod.c
diff -u /dev/null src/sys/compat/common/compat_10_mod.c:1.1.2.1
--- /dev/null	Tue Apr 17 08:07:13 2018
+++ src/sys/compat/common/compat_10_mod.c	Tue Apr 17 08:07:13 2018
@@ -0,0 +1,86 @@
+/*	$NetBSD: compat_10_mod.c,v 1.1.2.1 2018/04/17 08:07:13 pgoyette Exp $	*/
+
+/*-
+ * Copyright (c) 2018 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software developed for The NetBSD Foundation
+ * by Paul Goyette
+ *
+ * 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 

CVS commit: [pgoyette-compat] src/sys/compat/common

2018-04-01 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sun Apr  1 23:07:57 UTC 2018

Modified Files:
src/sys/compat/common [pgoyette-compat]: compat_12_mod.c
compat_13_mod.c

Log Message:
Update modules' required lists to take advantage of the new unlimited
number of requirements permitted.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.1 -r1.1.2.2 src/sys/compat/common/compat_12_mod.c \
src/sys/compat/common/compat_13_mod.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/compat/common/compat_12_mod.c
diff -u src/sys/compat/common/compat_12_mod.c:1.1.2.1 src/sys/compat/common/compat_12_mod.c:1.1.2.2
--- src/sys/compat/common/compat_12_mod.c:1.1.2.1	Sat Mar 31 09:17:35 2018
+++ src/sys/compat/common/compat_12_mod.c	Sun Apr  1 23:07:57 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: compat_12_mod.c,v 1.1.2.1 2018/03/31 09:17:35 pgoyette Exp $	*/
+/*	$NetBSD: compat_12_mod.c,v 1.1.2.2 2018/04/01 23:07:57 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: compat_12_mod.c,v 1.1.2.1 2018/03/31 09:17:35 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: compat_12_mod.c,v 1.1.2.2 2018/04/01 23:07:57 pgoyette Exp $");
 
 #include 
 #include 
@@ -98,10 +98,11 @@ compat_12_fini(void)
 
 #ifdef _MODULE
 
-#define REQD_12_1	"compat_60,compat_50,compat_40,compat_30,"
-#define REQD_12_2	"compat_20,compat_16,compat_14,compat_13"
+#define REQD_12_1	"compat_80,compat_70,compat_60,compat_50,"
+#define REQD_12_2	"compat_40,compat_30,compat_20,compat_16,"
+#define REQD_12_3	"compat_14,compat_13"
 
-MODULE(MODULE_CLASS_EXEC, compat_12, REQD_12_1 REQD_12_2);
+MODULE(MODULE_CLASS_EXEC, compat_12, REQD_12_1 REQD_12_2 REQD_12_3);
 
 static int
 compat_12_modcmd(modcmd_t cmd, void *arg)
Index: src/sys/compat/common/compat_13_mod.c
diff -u src/sys/compat/common/compat_13_mod.c:1.1.2.1 src/sys/compat/common/compat_13_mod.c:1.1.2.2
--- src/sys/compat/common/compat_13_mod.c:1.1.2.1	Fri Mar 30 11:18:34 2018
+++ src/sys/compat/common/compat_13_mod.c	Sun Apr  1 23:07:57 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: compat_13_mod.c,v 1.1.2.1 2018/03/30 11:18:34 pgoyette Exp $	*/
+/*	$NetBSD: compat_13_mod.c,v 1.1.2.2 2018/04/01 23:07:57 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: compat_13_mod.c,v 1.1.2.1 2018/03/30 11:18:34 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: compat_13_mod.c,v 1.1.2.2 2018/04/01 23:07:57 pgoyette Exp $");
 
 #include 
 #include 
@@ -76,10 +76,11 @@ compat_13_fini(void)
 
 #ifdef _MODULE
 
-#define REQD_13_1	"compat_70,compat_60,compat_50,compat_40,"
-#define REQD_13_2	"compat_30,compat_20,compat_16,compat_14"
+#define REQD_13_1	"compat_80,compat_70,compat_60,compat_50,"
+#define REQD_13_2	"compat_40,compat_30,compat_20,compat_16,"
+#define REQD_13_3	"compat_14"
 
-MODULE(MODULE_CLASS_EXEC, compat_13, REQD_13_1 REQD_13_2);
+MODULE(MODULE_CLASS_EXEC, compat_13, REQD_13_1 REQD_13_2 REQD_13_3);
 
 static int
 compat_13_modcmd(modcmd_t cmd, void *arg)



CVS commit: [pgoyette-compat] src/sys/compat/common

2018-03-31 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sat Mar 31 11:45:33 UTC 2018

Modified Files:
src/sys/compat/common [pgoyette-compat]: vfs_syscalls_43.c

Log Message:
Only need to #include sysctl.h once


To generate a diff of this commit:
cvs rdiff -u -r1.62 -r1.62.2.1 src/sys/compat/common/vfs_syscalls_43.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/compat/common/vfs_syscalls_43.c
diff -u src/sys/compat/common/vfs_syscalls_43.c:1.62 src/sys/compat/common/vfs_syscalls_43.c:1.62.2.1
--- src/sys/compat/common/vfs_syscalls_43.c:1.62	Sun Dec  3 15:23:30 2017
+++ src/sys/compat/common/vfs_syscalls_43.c	Sat Mar 31 11:45:33 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: vfs_syscalls_43.c,v 1.62 2017/12/03 15:23:30 christos Exp $	*/
+/*	$NetBSD: vfs_syscalls_43.c,v 1.62.2.1 2018/03/31 11:45:33 pgoyette Exp $	*/
 
 /*
  * Copyright (c) 1989, 1993
@@ -37,7 +37,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: vfs_syscalls_43.c,v 1.62 2017/12/03 15:23:30 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_syscalls_43.c,v 1.62.2.1 2018/03/31 11:45:33 pgoyette Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_compat_netbsd.h"
@@ -62,7 +62,6 @@ __KERNEL_RCSID(0, "$NetBSD: vfs_syscalls
 #include 
 #include 
 #include 
-#include 
 
 #include 
 #include 



CVS commit: [pgoyette-compat] src/sys/compat/common

2018-03-31 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sat Mar 31 10:01:58 UTC 2018

Modified Files:
src/sys/compat/common [pgoyette-compat]: compat_mod.c

Log Message:
Add compat_12 to the alias list, and add compat_80 entry points to the
init-fini list.


To generate a diff of this commit:
cvs rdiff -u -r1.24.14.30 -r1.24.14.31 src/sys/compat/common/compat_mod.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/compat/common/compat_mod.c
diff -u src/sys/compat/common/compat_mod.c:1.24.14.30 src/sys/compat/common/compat_mod.c:1.24.14.31
--- src/sys/compat/common/compat_mod.c:1.24.14.30	Sat Mar 31 09:17:35 2018
+++ src/sys/compat/common/compat_mod.c	Sat Mar 31 10:01:58 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: compat_mod.c,v 1.24.14.30 2018/03/31 09:17:35 pgoyette Exp $	*/
+/*	$NetBSD: compat_mod.c,v 1.24.14.31 2018/03/31 10:01:58 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: compat_mod.c,v 1.24.14.30 2018/03/31 09:17:35 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: compat_mod.c,v 1.24.14.31 2018/03/31 10:01:58 pgoyette Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
@@ -79,7 +79,7 @@ static struct sysctllog *compat_clog = N
 static const char * const compat_includes[] = {
 	"compat_80", "compat_70", "compat_60", "compat_50", "compat_40",
 	"compat_30", "compat_20", "compat_16", "compat_14", "compat_13",
-	NULL
+	"compat_12", NULL
 };
 
 MODULE_WITH_ALIASES(MODULE_CLASS_EXEC, compat, NULL, _includes);
@@ -137,6 +137,9 @@ struct compat_init_fini {
 	int (*init)(void);
 	int (*fini)(void);
 } init_fini_list[] = {
+#ifdef COMPAT_80
+	{ compat_80_init, compat_80_fini },
+#endif
 #ifdef COMPAT_70
 	{ compat_70_init, compat_70_fini },
 #endif



CVS commit: [pgoyette-compat] src/sys/compat/common

2018-03-30 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Fri Mar 30 11:29:53 UTC 2018

Modified Files:
src/sys/compat/common [pgoyette-compat]: compat_mod.c

Log Message:
Update list of modules which are included in the monolithic compat_netbsd
module.


To generate a diff of this commit:
cvs rdiff -u -r1.24.14.28 -r1.24.14.29 src/sys/compat/common/compat_mod.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/compat/common/compat_mod.c
diff -u src/sys/compat/common/compat_mod.c:1.24.14.28 src/sys/compat/common/compat_mod.c:1.24.14.29
--- src/sys/compat/common/compat_mod.c:1.24.14.28	Fri Mar 30 11:18:34 2018
+++ src/sys/compat/common/compat_mod.c	Fri Mar 30 11:29:53 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: compat_mod.c,v 1.24.14.28 2018/03/30 11:18:34 pgoyette Exp $	*/
+/*	$NetBSD: compat_mod.c,v 1.24.14.29 2018/03/30 11:29:53 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: compat_mod.c,v 1.24.14.28 2018/03/30 11:18:34 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: compat_mod.c,v 1.24.14.29 2018/03/30 11:29:53 pgoyette Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
@@ -78,7 +78,7 @@ static struct sysctllog *compat_clog = N
 
 static const char * const compat_includes[] = {
 	"compat_80", "compat_70", "compat_60", "compat_50", "compat_40",
-	"compat_30", "compat_20",
+	"compat_30", "compat_20", "compat_16", "compat_14", "compat_13",
 	NULL
 };
 



CVS commit: [pgoyette-compat] src/sys/compat/common

2018-03-30 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Fri Mar 30 06:34:01 UTC 2018

Modified Files:
src/sys/compat/common [pgoyette-compat]: files.common

Log Message:
typo in version dependency


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.25 -r1.1.2.26 src/sys/compat/common/files.common

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/compat/common/files.common
diff -u src/sys/compat/common/files.common:1.1.2.25 src/sys/compat/common/files.common:1.1.2.26
--- src/sys/compat/common/files.common:1.1.2.25	Fri Mar 30 05:35:47 2018
+++ src/sys/compat/common/files.common	Fri Mar 30 06:34:00 2018
@@ -1,4 +1,4 @@
-#	$NetBSD: files.common,v 1.1.2.25 2018/03/30 05:35:47 pgoyette Exp $
+#	$NetBSD: files.common,v 1.1.2.26 2018/03/30 06:34:00 pgoyette Exp $
 
 #
 # Generic files, used by all compat options.
@@ -41,7 +41,7 @@ file	compat/common/uvm_13.c			compat_13
 file	compat/common/rtsock_14.c		compat_14
 
 # Compatibility code for NetBSD 1.6
-file	compat/common/compat_16_mod.c		compat_20
+file	compat/common/compat_16_mod.c		compat_16
 file	compat/common/kern_sig_16.c		compat_16
 
 # Compatibility code for NetBSD 2.0



CVS commit: [pgoyette-compat] src/sys/compat/common

2018-03-29 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Fri Mar 30 02:52:06 UTC 2018

Modified Files:
src/sys/compat/common [pgoyette-compat]: compat_mod.c

Log Message:
Add compat_20 to the list of aliases


To generate a diff of this commit:
cvs rdiff -u -r1.24.14.24 -r1.24.14.25 src/sys/compat/common/compat_mod.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/compat/common/compat_mod.c
diff -u src/sys/compat/common/compat_mod.c:1.24.14.24 src/sys/compat/common/compat_mod.c:1.24.14.25
--- src/sys/compat/common/compat_mod.c:1.24.14.24	Fri Mar 30 02:28:49 2018
+++ src/sys/compat/common/compat_mod.c	Fri Mar 30 02:52:06 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: compat_mod.c,v 1.24.14.24 2018/03/30 02:28:49 pgoyette Exp $	*/
+/*	$NetBSD: compat_mod.c,v 1.24.14.25 2018/03/30 02:52:06 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: compat_mod.c,v 1.24.14.24 2018/03/30 02:28:49 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: compat_mod.c,v 1.24.14.25 2018/03/30 02:52:06 pgoyette Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
@@ -78,7 +78,7 @@ static struct sysctllog *compat_clog = N
 
 static const char * const compat_includes[] = {
 	"compat_80", "compat_70", "compat_60", "compat_50", "compat_40",
-	"compat_30",
+	"compat_30","compat_20",
 	NULL
 };
 



CVS commit: [pgoyette-compat] src/sys/compat/common

2018-03-25 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sun Mar 25 21:27:51 UTC 2018

Modified Files:
src/sys/compat/common [pgoyette-compat]: Makefile.sysio

Log Message:
Don't add the compat_60_cpu_ucode.c file here.  It's already added in
the main Makefile, and doing again here results in trying to link it
twice (with resulting symbol redefinition errors).


To generate a diff of this commit:
cvs rdiff -u -r1.7.18.15 -r1.7.18.16 src/sys/compat/common/Makefile.sysio

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/compat/common/Makefile.sysio
diff -u src/sys/compat/common/Makefile.sysio:1.7.18.15 src/sys/compat/common/Makefile.sysio:1.7.18.16
--- src/sys/compat/common/Makefile.sysio:1.7.18.15	Sun Mar 25 10:38:51 2018
+++ src/sys/compat/common/Makefile.sysio	Sun Mar 25 21:27:51 2018
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.sysio,v 1.7.18.15 2018/03/25 10:38:51 pgoyette Exp $
+#	$NetBSD: Makefile.sysio,v 1.7.18.16 2018/03/25 21:27:51 pgoyette Exp $
 
 # Sources for syscall and ioctl compatibility across the versions.
 
@@ -61,9 +61,3 @@ SRCS+=	puffs_compat.c
 .PATH:	${S}/dev/wscons
 SRCS+=	wsevent_50.c
 
-# x86-specific compatability code for NetBSD 6.0
-.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64"
-CPPFLAGS+=  -DCPU_UCODE
-.PATH:  ${S}/arch/x86/x86
-SRCS+=  compat_60_cpu_ucode.c
-.endif



CVS commit: [pgoyette-compat] src/sys/compat/common

2018-03-25 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sun Mar 25 08:03:26 UTC 2018

Modified Files:
src/sys/compat/common [pgoyette-compat]: compat_mod.c

Log Message:
Now that we have a compat_80 module, make sure it is marked as "included"
in the monolithic compat module


To generate a diff of this commit:
cvs rdiff -u -r1.24.14.19 -r1.24.14.20 src/sys/compat/common/compat_mod.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/compat/common/compat_mod.c
diff -u src/sys/compat/common/compat_mod.c:1.24.14.19 src/sys/compat/common/compat_mod.c:1.24.14.20
--- src/sys/compat/common/compat_mod.c:1.24.14.19	Thu Mar 22 01:44:47 2018
+++ src/sys/compat/common/compat_mod.c	Sun Mar 25 08:03:26 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: compat_mod.c,v 1.24.14.19 2018/03/22 01:44:47 pgoyette Exp $	*/
+/*	$NetBSD: compat_mod.c,v 1.24.14.20 2018/03/25 08:03:26 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: compat_mod.c,v 1.24.14.19 2018/03/22 01:44:47 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: compat_mod.c,v 1.24.14.20 2018/03/25 08:03:26 pgoyette Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
@@ -81,7 +81,7 @@ static struct sysctllog *compat_clog = N
 #endif
 
 static const char * const compat_includes[] = {
-	"compat_70", "compat_60", "compat_50", 
+	"compat_80", "compat_70", "compat_60", "compat_50", 
 	NULL
 };
 



CVS commit: [pgoyette-compat] src/sys/compat/common

2018-03-24 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sat Mar 24 08:11:12 UTC 2018

Modified Files:
src/sys/compat/common [pgoyette-compat]: compat_50_mod.c
compat_60_mod.c compat_70_mod.c

Log Message:
Don't include unneeded opt_* files


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.5 -r1.1.2.6 src/sys/compat/common/compat_50_mod.c
cvs rdiff -u -r1.1.2.12 -r1.1.2.13 src/sys/compat/common/compat_60_mod.c
cvs rdiff -u -r1.1.2.6 -r1.1.2.7 src/sys/compat/common/compat_70_mod.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/compat/common/compat_50_mod.c
diff -u src/sys/compat/common/compat_50_mod.c:1.1.2.5 src/sys/compat/common/compat_50_mod.c:1.1.2.6
--- src/sys/compat/common/compat_50_mod.c:1.1.2.5	Sat Mar 24 05:24:10 2018
+++ src/sys/compat/common/compat_50_mod.c	Sat Mar 24 08:11:12 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: compat_50_mod.c,v 1.1.2.5 2018/03/24 05:24:10 pgoyette Exp $	*/
+/*	$NetBSD: compat_50_mod.c,v 1.1.2.6 2018/03/24 08:11:12 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -34,12 +34,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: compat_50_mod.c,v 1.1.2.5 2018/03/24 05:24:10 pgoyette Exp $");
-
-#ifdef _KERNEL_OPT
-#include "opt_compat_netbsd.h"
-#include "opt_compat_43.h"
-#endif
+__KERNEL_RCSID(0, "$NetBSD: compat_50_mod.c,v 1.1.2.6 2018/03/24 08:11:12 pgoyette Exp $");
 
 #include 
 #include 
@@ -56,6 +51,10 @@ __KERNEL_RCSID(0, "$NetBSD: compat_50_mo
 #include 
 #include 
 
+#include 
+
+#include 
+
 int
 compat_50_init(void)
 {
@@ -83,6 +82,7 @@ compat_50_init(void)
 	if_spppsubr_50_init();
 	cryptodev_50_init();
 	raidframe_50_init();
+	puffs_50_init();
 
 	return error;
 
@@ -103,6 +103,7 @@ compat_50_fini(void)
 {
 	int error = 0;
 
+	puffs_50_fini();
 	raidframe_50_fini();
 	cryptodev_50_fini();
 	if_spppsubr_50_fini();
@@ -142,6 +143,7 @@ compat_50_fini(void)
 	if_spppsubr_50_init();
 	cryptodev_50_init();
 	raidframe_50_init();
+	puffs_50_init();
 
 	return error;
 }

Index: src/sys/compat/common/compat_60_mod.c
diff -u src/sys/compat/common/compat_60_mod.c:1.1.2.12 src/sys/compat/common/compat_60_mod.c:1.1.2.13
--- src/sys/compat/common/compat_60_mod.c:1.1.2.12	Wed Mar 21 10:01:04 2018
+++ src/sys/compat/common/compat_60_mod.c	Sat Mar 24 08:11:12 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: compat_60_mod.c,v 1.1.2.12 2018/03/21 10:01:04 pgoyette Exp $	*/
+/*	$NetBSD: compat_60_mod.c,v 1.1.2.13 2018/03/24 08:11:12 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -34,12 +34,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: compat_60_mod.c,v 1.1.2.12 2018/03/21 10:01:04 pgoyette Exp $");
-
-#ifdef _KERNEL_OPT
-#include "opt_compat_netbsd.h"
-#include "opt_compat_43.h"
-#endif
+__KERNEL_RCSID(0, "$NetBSD: compat_60_mod.c,v 1.1.2.13 2018/03/24 08:11:12 pgoyette Exp $");
 
 #include 
 #include 

Index: src/sys/compat/common/compat_70_mod.c
diff -u src/sys/compat/common/compat_70_mod.c:1.1.2.6 src/sys/compat/common/compat_70_mod.c:1.1.2.7
--- src/sys/compat/common/compat_70_mod.c:1.1.2.6	Wed Mar 21 10:01:04 2018
+++ src/sys/compat/common/compat_70_mod.c	Sat Mar 24 08:11:12 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: compat_70_mod.c,v 1.1.2.6 2018/03/21 10:01:04 pgoyette Exp $	*/
+/*	$NetBSD: compat_70_mod.c,v 1.1.2.7 2018/03/24 08:11:12 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -34,12 +34,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: compat_70_mod.c,v 1.1.2.6 2018/03/21 10:01:04 pgoyette Exp $");
-
-#ifdef _KERNEL_OPT
-#include "opt_compat_netbsd.h"
-#include "opt_compat_43.h"
-#endif
+__KERNEL_RCSID(0, "$NetBSD: compat_70_mod.c,v 1.1.2.7 2018/03/24 08:11:12 pgoyette Exp $");
 
 #include 
 #include 



CVS commit: [pgoyette-compat] src/sys/compat/common

2018-03-24 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sat Mar 24 08:10:49 UTC 2018

Modified Files:
src/sys/compat/common [pgoyette-compat]: compat_80_mod.c

Log Message:
Remove unneeded opt_* includes.

Since raidframe_80_{init,fini} don't return values, don't try to use them!


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.5 -r1.1.2.6 src/sys/compat/common/compat_80_mod.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/compat/common/compat_80_mod.c
diff -u src/sys/compat/common/compat_80_mod.c:1.1.2.5 src/sys/compat/common/compat_80_mod.c:1.1.2.6
--- src/sys/compat/common/compat_80_mod.c:1.1.2.5	Sat Mar 24 05:25:59 2018
+++ src/sys/compat/common/compat_80_mod.c	Sat Mar 24 08:10:49 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: compat_80_mod.c,v 1.1.2.5 2018/03/24 05:25:59 pgoyette Exp $	*/
+/*	$NetBSD: compat_80_mod.c,v 1.1.2.6 2018/03/24 08:10:49 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -34,44 +34,27 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: compat_80_mod.c,v 1.1.2.5 2018/03/24 05:25:59 pgoyette Exp $");
-
-#ifdef _KERNEL_OPT
-#include "opt_compat_netbsd.h"
-#include "opt_compat_43.h"
-#endif
+__KERNEL_RCSID(0, "$NetBSD: compat_80_mod.c,v 1.1.2.6 2018/03/24 08:10:49 pgoyette Exp $");
 
 #include 
 #include 
 
-#include 
-#include 
-
 #include 
 #include 
-#include 
-
-#include 
-#include 
+#include 
 
 int compat_80_init(void)
 {
-	int error;
 
-	error = raidframe_80_init();
-	if (error != 0)
-		return error;
+	raidframe_80_init();
 
 	return 0;
 }
 
 int compat_80_fini(void)
 {
-	int error;
 
-	error = raidframe_80_fini();
-	if (error != 0)
-		return error;
+	raidframe_80_fini();
 
 	return 0;
 }



CVS commit: [pgoyette-compat] src/sys/compat/common

2018-03-23 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sat Mar 24 05:25:59 UTC 2018

Modified Files:
src/sys/compat/common [pgoyette-compat]: compat_80_mod.c

Log Message:
Also add raidframe init/fini for compat_80


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.4 -r1.1.2.5 src/sys/compat/common/compat_80_mod.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/compat/common/compat_80_mod.c
diff -u src/sys/compat/common/compat_80_mod.c:1.1.2.4 src/sys/compat/common/compat_80_mod.c:1.1.2.5
--- src/sys/compat/common/compat_80_mod.c:1.1.2.4	Sat Mar 24 01:59:15 2018
+++ src/sys/compat/common/compat_80_mod.c	Sat Mar 24 05:25:59 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: compat_80_mod.c,v 1.1.2.4 2018/03/24 01:59:15 pgoyette Exp $	*/
+/*	$NetBSD: compat_80_mod.c,v 1.1.2.5 2018/03/24 05:25:59 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: compat_80_mod.c,v 1.1.2.4 2018/03/24 01:59:15 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: compat_80_mod.c,v 1.1.2.5 2018/03/24 05:25:59 pgoyette Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
@@ -56,26 +56,22 @@ __KERNEL_RCSID(0, "$NetBSD: compat_80_mo
 
 int compat_80_init(void)
 {
-#ifdef NOTYET
 	int error;
 
 	error = raidframe_80_init();
 	if (error != 0)
 		return error;
-#endif
 
 	return 0;
 }
 
 int compat_80_fini(void)
 {
-#ifdef NOTYET
 	int error;
 
 	error = raidframe_80_fini();
 	if (error != 0)
 		return error;
-#endif
 
 	return 0;
 }



CVS commit: [pgoyette-compat] src/sys/compat/common

2018-03-23 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sat Mar 24 05:24:10 UTC 2018

Modified Files:
src/sys/compat/common [pgoyette-compat]: compat_50_mod.c

Log Message:
Add raidframe init/fini calls


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.4 -r1.1.2.5 src/sys/compat/common/compat_50_mod.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/compat/common/compat_50_mod.c
diff -u src/sys/compat/common/compat_50_mod.c:1.1.2.4 src/sys/compat/common/compat_50_mod.c:1.1.2.5
--- src/sys/compat/common/compat_50_mod.c:1.1.2.4	Fri Mar 23 09:41:10 2018
+++ src/sys/compat/common/compat_50_mod.c	Sat Mar 24 05:24:10 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: compat_50_mod.c,v 1.1.2.4 2018/03/23 09:41:10 pgoyette Exp $	*/
+/*	$NetBSD: compat_50_mod.c,v 1.1.2.5 2018/03/24 05:24:10 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: compat_50_mod.c,v 1.1.2.4 2018/03/23 09:41:10 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: compat_50_mod.c,v 1.1.2.5 2018/03/24 05:24:10 pgoyette Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
@@ -82,6 +82,7 @@ compat_50_init(void)
 	clockctl_50_init();
 	if_spppsubr_50_init();
 	cryptodev_50_init();
+	raidframe_50_init();
 
 	return error;
 
@@ -102,6 +103,7 @@ compat_50_fini(void)
 {
 	int error = 0;
 
+	raidframe_50_fini();
 	cryptodev_50_fini();
 	if_spppsubr_50_fini();
 	clockctl_50_fini();
@@ -139,6 +141,7 @@ compat_50_fini(void)
 	clockctl_50_init();
 	if_spppsubr_50_init();
 	cryptodev_50_init();
+	raidframe_50_init();
 
 	return error;
 }



CVS commit: [pgoyette-compat] src/sys/compat/common

2018-03-23 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Fri Mar 23 09:38:48 UTC 2018

Modified Files:
src/sys/compat/common [pgoyette-compat]: compat_80_mod.c compat_mod.h
files.common

Log Message:
For now, the compat_80 module is empty.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.2 -r1.1.2.3 src/sys/compat/common/compat_80_mod.c
cvs rdiff -u -r1.1.42.7 -r1.1.42.8 src/sys/compat/common/compat_mod.h
cvs rdiff -u -r1.1.2.16 -r1.1.2.17 src/sys/compat/common/files.common

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/compat/common/compat_80_mod.c
diff -u src/sys/compat/common/compat_80_mod.c:1.1.2.2 src/sys/compat/common/compat_80_mod.c:1.1.2.3
--- src/sys/compat/common/compat_80_mod.c:1.1.2.2	Wed Mar 21 10:12:48 2018
+++ src/sys/compat/common/compat_80_mod.c	Fri Mar 23 09:38:48 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: compat_80_mod.c,v 1.1.2.2 2018/03/21 10:12:48 pgoyette Exp $	*/
+/*	$NetBSD: compat_80_mod.c,v 1.1.2.3 2018/03/23 09:38:48 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: compat_80_mod.c,v 1.1.2.2 2018/03/21 10:12:48 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: compat_80_mod.c,v 1.1.2.3 2018/03/23 09:38:48 pgoyette Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
@@ -56,22 +56,26 @@ __KERNEL_RCSID(0, "$NetBSD: compat_80_mo
 
 int compat_80_init(void)
 {
+#ifdef NOTYET
 	int error;
 
 	error = raidframe_80_init();
 	if (error != 0)
 		return error;
+#endif
 
 	return 0;
 }
 
 int compat_80_fini(void)
 {
+#ifdef NOTYET
 	int error;
 
 	error = raidframe_80_fini();
 	if (error != 0)
 		return error;
+#endif
 
 	return 0;
 }

Index: src/sys/compat/common/compat_mod.h
diff -u src/sys/compat/common/compat_mod.h:1.1.42.7 src/sys/compat/common/compat_mod.h:1.1.42.8
--- src/sys/compat/common/compat_mod.h:1.1.42.7	Mon Mar 19 21:54:43 2018
+++ src/sys/compat/common/compat_mod.h	Fri Mar 23 09:38:48 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: compat_mod.h,v 1.1.42.7 2018/03/19 21:54:43 pgoyette Exp $	*/
+/*	$NetBSD: compat_mod.h,v 1.1.42.8 2018/03/23 09:38:48 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -39,6 +39,11 @@ void compat_sysctl_fini(void);
 
 void compat_sysctl_vfs(struct sysctllog **);
 
+#ifdef COMPAT_80
+int compat_80_init(void);
+int compat_80_fini(void);
+#endif
+
 #ifdef COMPAT_70
 int compat_70_init(void);
 int compat_70_fini(void);

Index: src/sys/compat/common/files.common
diff -u src/sys/compat/common/files.common:1.1.2.16 src/sys/compat/common/files.common:1.1.2.17
--- src/sys/compat/common/files.common:1.1.2.16	Wed Mar 21 10:12:48 2018
+++ src/sys/compat/common/files.common	Fri Mar 23 09:38:48 2018
@@ -1,4 +1,4 @@
-#	$NetBSD: files.common,v 1.1.2.16 2018/03/21 10:12:48 pgoyette Exp $
+#	$NetBSD: files.common,v 1.1.2.17 2018/03/23 09:38:48 pgoyette Exp $
 
 #
 # Generic files, used by all compat options.
@@ -83,7 +83,7 @@ file	compat/common/uipc_usrreq_70.c		com
 
 # Compatability code for NetBSD 8.0
 file	compat/common/compat_80_mod.c		compat_80
-file	compat/common/raidframe80.c		compat_80 & raid
+#file	compat/common/raidframe80.c		compat_80 & raid
 
 #
 # Sources for sysv ipc compatibility across the versions.



CVS commit: [pgoyette-compat] src/sys/compat/common

2018-03-21 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Wed Mar 21 10:01:04 UTC 2018

Modified Files:
src/sys/compat/common [pgoyette-compat]: compat_50_mod.c
compat_60_mod.c compat_70_mod.c
Added Files:
src/sys/compat/common [pgoyette-compat]: compat_80_mod.c

Log Message:
Add a compat_80 module - we need this for some raidframe stuff.

Update other modules to add compat_80 to the required lists.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.2 -r1.1.2.3 src/sys/compat/common/compat_50_mod.c
cvs rdiff -u -r1.1.2.11 -r1.1.2.12 src/sys/compat/common/compat_60_mod.c
cvs rdiff -u -r1.1.2.5 -r1.1.2.6 src/sys/compat/common/compat_70_mod.c
cvs rdiff -u -r0 -r1.1.2.1 src/sys/compat/common/compat_80_mod.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/compat/common/compat_50_mod.c
diff -u src/sys/compat/common/compat_50_mod.c:1.1.2.2 src/sys/compat/common/compat_50_mod.c:1.1.2.3
--- src/sys/compat/common/compat_50_mod.c:1.1.2.2	Wed Mar 21 04:48:31 2018
+++ src/sys/compat/common/compat_50_mod.c	Wed Mar 21 10:01:04 2018
@@ -1,11 +1,11 @@
-/*	$NetBSD: compat_50_mod.c,v 1.1.2.2 2018/03/21 04:48:31 pgoyette Exp $	*/
+/*	$NetBSD: compat_50_mod.c,v 1.1.2.3 2018/03/21 10:01:04 pgoyette Exp $	*/
 
 /*-
- * Copyright (c) 2008 The NetBSD Foundation, Inc.
+ * Copyright (c) 2018 The NetBSD Foundation, Inc.
  * All rights reserved.
  *
  * This code is derived from software developed for The NetBSD Foundation
- * by Andrew Doran.
+ * by Paul Goyette
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -34,7 +34,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: compat_50_mod.c,v 1.1.2.2 2018/03/21 04:48:31 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: compat_50_mod.c,v 1.1.2.3 2018/03/21 10:01:04 pgoyette Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
@@ -52,6 +52,7 @@ __KERNEL_RCSID(0, "$NetBSD: compat_50_mo
 
 #include 
 #include 
+#include 
 
 int
 compat_50_init(void)
@@ -77,6 +78,7 @@ compat_50_init(void)
 	uvm_50_init();
 	if_50_init();
 	clockctl_50_init();
+	if_spppsubr_50_init();
 
 	return error;
 
@@ -97,6 +99,7 @@ compat_50_fini(void)
 {
 	int error = 0;
 
+	if_spppsubr_50_fini();
 	clockctl_50_fini();
 	if_50_fini();
 	uvm_50_fini();
@@ -130,15 +133,16 @@ compat_50_fini(void)
 	uvm_50_init();
 	if_50_init();
 	clockctl_50_init();
+	if_spppsubr_50_init();
 
 	return error;
 }
 
 #ifdef _MODULE
 
-#define REQUIRED_50	"compat_70,compat_60"	/* XXX No compat_80 yet */
+#define REQD_50	"compat_80,compat_70,compat_60"
 
-MODULE(MODULE_CLASS_EXEC, compat_50, REQUIRED_50);
+MODULE(MODULE_CLASS_EXEC, compat_50, REQD_50);
 
 static int
 compat_50_modcmd(modcmd_t cmd, void *arg)

Index: src/sys/compat/common/compat_60_mod.c
diff -u src/sys/compat/common/compat_60_mod.c:1.1.2.11 src/sys/compat/common/compat_60_mod.c:1.1.2.12
--- src/sys/compat/common/compat_60_mod.c:1.1.2.11	Mon Mar 19 21:54:43 2018
+++ src/sys/compat/common/compat_60_mod.c	Wed Mar 21 10:01:04 2018
@@ -1,11 +1,11 @@
-/*	$NetBSD: compat_60_mod.c,v 1.1.2.11 2018/03/19 21:54:43 pgoyette Exp $	*/
+/*	$NetBSD: compat_60_mod.c,v 1.1.2.12 2018/03/21 10:01:04 pgoyette Exp $	*/
 
 /*-
- * Copyright (c) 2008 The NetBSD Foundation, Inc.
+ * Copyright (c) 2018 The NetBSD Foundation, Inc.
  * All rights reserved.
  *
  * This code is derived from software developed for The NetBSD Foundation
- * by Andrew Doran.
+ * by Paul Goyette
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -34,7 +34,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: compat_60_mod.c,v 1.1.2.11 2018/03/19 21:54:43 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: compat_60_mod.c,v 1.1.2.12 2018/03/21 10:01:04 pgoyette Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
@@ -116,7 +116,7 @@ compat_60_fini(void)
 
 #ifdef _MODULE
 
-#define REQUIRED_60 "compat_70"		/* XXX No compat_80 yet */
+#define REQUIRED_60 "compat_70,compat_80"
 MODULE(MODULE_CLASS_EXEC, compat_60, REQUIRED_60);
 
 static int

Index: src/sys/compat/common/compat_70_mod.c
diff -u src/sys/compat/common/compat_70_mod.c:1.1.2.5 src/sys/compat/common/compat_70_mod.c:1.1.2.6
--- src/sys/compat/common/compat_70_mod.c:1.1.2.5	Sat Mar 17 00:44:38 2018
+++ src/sys/compat/common/compat_70_mod.c	Wed Mar 21 10:01:04 2018
@@ -1,11 +1,11 @@
-/*	$NetBSD: compat_70_mod.c,v 1.1.2.5 2018/03/17 00:44:38 pgoyette Exp $	*/
+/*	$NetBSD: compat_70_mod.c,v 1.1.2.6 2018/03/21 10:01:04 pgoyette Exp $	*/
 
 /*-
- * Copyright (c) 2008 The NetBSD Foundation, Inc.
+ * Copyright (c) 2018 The NetBSD Foundation, Inc.
  * All rights reserved.
  *
  * This code is derived from software developed for The NetBSD Foundation
- * by Andrew Doran.
+ * by Paul Goyette
  *
  * Redistribution and use in source and 

CVS commit: [pgoyette-compat] src/sys/compat/common

2018-03-20 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Tue Mar 20 06:23:36 UTC 2018

Modified Files:
src/sys/compat/common [pgoyette-compat]: compat_mod.c

Log Message:
Prep for additional version-specific compat modules; commented out for now.


To generate a diff of this commit:
cvs rdiff -u -r1.24.14.17 -r1.24.14.18 src/sys/compat/common/compat_mod.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/compat/common/compat_mod.c
diff -u src/sys/compat/common/compat_mod.c:1.24.14.17 src/sys/compat/common/compat_mod.c:1.24.14.18
--- src/sys/compat/common/compat_mod.c:1.24.14.17	Mon Mar 19 21:54:43 2018
+++ src/sys/compat/common/compat_mod.c	Tue Mar 20 06:23:36 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: compat_mod.c,v 1.24.14.17 2018/03/19 21:54:43 pgoyette Exp $	*/
+/*	$NetBSD: compat_mod.c,v 1.24.14.18 2018/03/20 06:23:36 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: compat_mod.c,v 1.24.14.17 2018/03/19 21:54:43 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: compat_mod.c,v 1.24.14.18 2018/03/20 06:23:36 pgoyette Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
@@ -209,6 +209,38 @@ struct compat_init_fini {
 #ifdef COMPAT_50
 	{ compat_50_init, compat_50_fini },
 #endif
+#if 0	/* NOT YET */
+#ifdef COMPAT_40
+	{ compat_40_init, compat_40_fini },
+#endif
+#ifdef COMPAT_30
+	{ compat_30_init, compat_30_fini },
+#endif
+#ifdef COMPAT_20
+	{ compat_20_init, compat_20_fini },
+#endif
+#ifdef COMPAT_16
+	{ compat_16_init, compat_16_fini },
+#endif
+#ifdef COMPAT_14
+	{ compat_14_init, compat_14_fini },
+#endif
+#ifdef COMPAT_13
+	{ compat_13_init, compat_13_fini },
+#endif
+#ifdef COMPAT_12
+	{ compat_12_init, compat_12_fini },
+#endif
+#ifdef COMPAT_10
+	{ compat_10_init, compat_10_fini },
+#endif
+#ifdef COMPAT_09
+	{ compat_09_init, compat_09_fini },
+#endif
+#ifdef COMPAT_43
+	{ compat_43_init, compat_43_fini },
+#endif
+#endif /* 0 NOT YET */
 };
 
 static int



CVS commit: [pgoyette-compat] src/sys/compat/common

2018-03-19 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Mon Mar 19 21:53:04 UTC 2018

Modified Files:
src/sys/compat/common [pgoyette-compat]: ccd_60.c

Log Message:
Stub-out the compat ioctl routine for now to fix compile error on
kernels with no ccd device.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.4 -r1.1.2.5 src/sys/compat/common/ccd_60.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/compat/common/ccd_60.c
diff -u src/sys/compat/common/ccd_60.c:1.1.2.4 src/sys/compat/common/ccd_60.c:1.1.2.5
--- src/sys/compat/common/ccd_60.c:1.1.2.4	Sun Mar 18 23:34:25 2018
+++ src/sys/compat/common/ccd_60.c	Mon Mar 19 21:53:04 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: ccd_60.c,v 1.1.2.4 2018/03/18 23:34:25 pgoyette Exp $	*/
+/*	$NetBSD: ccd_60.c,v 1.1.2.5 2018/03/19 21:53:04 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -26,7 +26,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ccd_60.c,v 1.1.2.4 2018/03/18 23:34:25 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ccd_60.c,v 1.1.2.5 2018/03/19 21:53:04 pgoyette Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
@@ -45,6 +45,7 @@ __KERNEL_RCSID(0, "$NetBSD: ccd_60.c,v 1
  * sizeof (size_t) == sizeof (uint64_t) as CCDIOCSET will
  * be the same as CCDIOCSET_60
  */
+#if 0
 static int
 compat_60_ccdioctl(dev_t dev, u_long cmd, void *data, int flag, struct lwp *l,
 int (*f)(dev_t, u_long, void *, int, struct lwp *))
@@ -89,15 +90,18 @@ compat_60_ccdioctl(dev_t dev, u_long cmd
 		return ENOSYS;
 	}
 }
+#endif /* 0 */
 
 void
 ccd_60_init(void)
 {
-	compat_ccd_ioctl_60 = compat_60_ccdioctl;
+
+//	compat_ccd_ioctl_60 = compat_60_ccdioctl;
 }
 
 void
 ccd_60_fini(void)
 {
-	compat_ccd_ioctl_60 = (void *)enosys;
+
+//	compat_ccd_ioctl_60 = (void *)enosys;
 }



CVS commit: [pgoyette-compat] src/sys/compat/common

2018-03-18 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sun Mar 18 22:49:26 UTC 2018

Modified Files:
src/sys/compat/common [pgoyette-compat]: ccd_60.c

Log Message:
Declare 'error' if needed


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.2 -r1.1.2.3 src/sys/compat/common/ccd_60.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/compat/common/ccd_60.c
diff -u src/sys/compat/common/ccd_60.c:1.1.2.2 src/sys/compat/common/ccd_60.c:1.1.2.3
--- src/sys/compat/common/ccd_60.c:1.1.2.2	Sun Mar 18 21:41:31 2018
+++ src/sys/compat/common/ccd_60.c	Sun Mar 18 22:49:26 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: ccd_60.c,v 1.1.2.2 2018/03/18 21:41:31 pgoyette Exp $	*/
+/*	$NetBSD: ccd_60.c,v 1.1.2.3 2018/03/18 22:49:26 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -26,7 +26,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ccd_60.c,v 1.1.2.2 2018/03/18 21:41:31 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ccd_60.c,v 1.1.2.3 2018/03/18 22:49:26 pgoyette Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
@@ -52,6 +52,8 @@ compat_60_ccdioctl(dev_t dev, u_long cmd
 	switch (cmd) {
 #if defined(COMPAT_60) && !defined(_LP64)
 	case CCDIOCSET_60: {
+		int error;
+
 		if (data == NULL)
 			return 0;
 		
@@ -77,6 +79,8 @@ compat_60_ccdioctl(dev_t dev, u_long cmd
 	}
 
 	case CCDIOCCLR_60:
+		int error;
+
 		if (data == NULL)
 			return ENOSYS;
 		/*
@@ -90,14 +94,16 @@ compat_60_ccdioctl(dev_t dev, u_long cmd
 	}
 }
 
-void
+int
 ccd_60_init(void)
 {
-compat_ccd_ioctl_60 = compat_60_ccdioctl;
+	compat_ccd_ioctl_60 = compat_60_ccdioctl;
+	return 0;
 }
 
-void
+int
 ccd_60_fini(void)
 {
-compat_ccd_ioctl_60 = (void *)enosys;
+	compat_ccd_ioctl_60 = (void *)enosys;
+	return 0;
 }



CVS commit: [pgoyette-compat] src/sys/compat/common

2018-03-16 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sat Mar 17 00:44:38 UTC 2018

Modified Files:
src/sys/compat/common [pgoyette-compat]: compat_70_mod.c compat_mod.h

Log Message:
Make all the compat_xx_{init,fini} routines return an int, whether or
not they currently need it.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.4 -r1.1.2.5 src/sys/compat/common/compat_70_mod.c
cvs rdiff -u -r1.1.42.2 -r1.1.42.3 src/sys/compat/common/compat_mod.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/compat/common/compat_70_mod.c
diff -u src/sys/compat/common/compat_70_mod.c:1.1.2.4 src/sys/compat/common/compat_70_mod.c:1.1.2.5
--- src/sys/compat/common/compat_70_mod.c:1.1.2.4	Fri Mar 16 08:10:26 2018
+++ src/sys/compat/common/compat_70_mod.c	Sat Mar 17 00:44:38 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: compat_70_mod.c,v 1.1.2.4 2018/03/16 08:10:26 pgoyette Exp $	*/
+/*	$NetBSD: compat_70_mod.c,v 1.1.2.5 2018/03/17 00:44:38 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: compat_70_mod.c,v 1.1.2.4 2018/03/16 08:10:26 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: compat_70_mod.c,v 1.1.2.5 2018/03/17 00:44:38 pgoyette Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
@@ -54,18 +54,22 @@ __KERNEL_RCSID(0, "$NetBSD: compat_70_mo
 #include 
 #include 
 
-void compat_70_init(void)
+int compat_70_init(void)
 {
 
 	vec_ocreds_valid = true;
 	rtsock_70_init();
+
+	return 0;
 }
 
-void compat_70_fini(void)
+int compat_70_fini(void)
 {
 
 	rtsock_70_fini();
 	vec_ocreds_valid = false;
+
+	return 0;
 }
 
 #ifdef _MODULE
@@ -78,12 +82,10 @@ compat_70_modcmd(modcmd_t cmd, void *arg
 
 	switch (cmd) {
 	case MODULE_CMD_INIT:
-		compat_70_init();
-		return 0;
+		return compat_70_init();
 
 	case MODULE_CMD_FINI:
-		compat_70_fini();
-		return 0;
+		return compat_70_fini();
 
 	default:
 		return ENOTTY;

Index: src/sys/compat/common/compat_mod.h
diff -u src/sys/compat/common/compat_mod.h:1.1.42.2 src/sys/compat/common/compat_mod.h:1.1.42.3
--- src/sys/compat/common/compat_mod.h:1.1.42.2	Fri Mar 16 08:10:26 2018
+++ src/sys/compat/common/compat_mod.h	Sat Mar 17 00:44:38 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: compat_mod.h,v 1.1.42.2 2018/03/16 08:10:26 pgoyette Exp $	*/
+/*	$NetBSD: compat_mod.h,v 1.1.42.3 2018/03/17 00:44:38 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -38,8 +38,8 @@ void compat_sysctl_fini(void);
 void compat_sysctl_time(struct sysctllog **);
 void compat_sysctl_vfs(struct sysctllog **);
 
-void compat_70_init(void);
-void compat_70_fini(void);
+int compat_70_init(void);
+int compat_70_fini(void);
 
 int compat_60_init(void);
 int compat_60_fini(void);



CVS commit: [pgoyette-compat] src/sys/compat/common

2018-03-15 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Thu Mar 15 23:34:53 UTC 2018

Modified Files:
src/sys/compat/common [pgoyette-compat]: compat_mod.c

Log Message:
Update alias list for included modules for compat_60


To generate a diff of this commit:
cvs rdiff -u -r1.24.14.10 -r1.24.14.11 src/sys/compat/common/compat_mod.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/compat/common/compat_mod.c
diff -u src/sys/compat/common/compat_mod.c:1.24.14.10 src/sys/compat/common/compat_mod.c:1.24.14.11
--- src/sys/compat/common/compat_mod.c:1.24.14.10	Thu Mar 15 23:32:35 2018
+++ src/sys/compat/common/compat_mod.c	Thu Mar 15 23:34:53 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: compat_mod.c,v 1.24.14.10 2018/03/15 23:32:35 pgoyette Exp $	*/
+/*	$NetBSD: compat_mod.c,v 1.24.14.11 2018/03/15 23:34:53 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: compat_mod.c,v 1.24.14.10 2018/03/15 23:32:35 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: compat_mod.c,v 1.24.14.11 2018/03/15 23:34:53 pgoyette Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
@@ -84,7 +84,7 @@ void if_50_fini(void);
 #endif
 
 static const char * const compat_includes[] = {
-	"compat_70",
+	"compat_70", "compat_60",
 	NULL
 };
 



CVS commit: [pgoyette-compat] src/sys/compat/common

2018-03-15 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Thu Mar 15 23:32:35 UTC 2018

Modified Files:
src/sys/compat/common [pgoyette-compat]: compat_mod.c

Log Message:
The big all-inclusive compat module still needs to initialize the
compat_70 stuff.


To generate a diff of this commit:
cvs rdiff -u -r1.24.14.9 -r1.24.14.10 src/sys/compat/common/compat_mod.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/compat/common/compat_mod.c
diff -u src/sys/compat/common/compat_mod.c:1.24.14.9 src/sys/compat/common/compat_mod.c:1.24.14.10
--- src/sys/compat/common/compat_mod.c:1.24.14.9	Thu Mar 15 22:46:22 2018
+++ src/sys/compat/common/compat_mod.c	Thu Mar 15 23:32:35 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: compat_mod.c,v 1.24.14.9 2018/03/15 22:46:22 pgoyette Exp $	*/
+/*	$NetBSD: compat_mod.c,v 1.24.14.10 2018/03/15 23:32:35 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: compat_mod.c,v 1.24.14.9 2018/03/15 22:46:22 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: compat_mod.c,v 1.24.14.10 2018/03/15 23:32:35 pgoyette Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
@@ -78,6 +78,11 @@ void if_50_init(void);
 void if_50_fini(void);
 #endif
 
+#ifdef COMPAT_70
+#include 
+#include 
+#endif
+
 static const char * const compat_includes[] = {
 	"compat_70",
 	NULL
@@ -282,9 +287,17 @@ compat_modcmd(modcmd_t cmd, void *arg)
 		uvm_50_init();
 		if_50_init();
 #endif
+#ifdef COMPAT_70
+		vec_ocreds_valid = true;
+		rtsock_70_init();
+#endif
 		return 0;
 
 	case MODULE_CMD_FINI:
+#ifdef COMPAT_70
+		rtsock_70_fini();
+		vec_ocreds_valid = false;
+#endif
 #ifdef COMPAT_10
 		vfs_syscalls_10_fini();
 #endif



CVS commit: [pgoyette-compat] src/sys/compat/common

2018-03-15 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Thu Mar 15 23:14:21 UTC 2018

Modified Files:
src/sys/compat/common [pgoyette-compat]: compat_70_mod.c

Log Message:
Remove some unnecessary #includes


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.1 -r1.1.2.2 src/sys/compat/common/compat_70_mod.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/compat/common/compat_70_mod.c
diff -u src/sys/compat/common/compat_70_mod.c:1.1.2.1 src/sys/compat/common/compat_70_mod.c:1.1.2.2
--- src/sys/compat/common/compat_70_mod.c:1.1.2.1	Thu Mar 15 05:10:05 2018
+++ src/sys/compat/common/compat_70_mod.c	Thu Mar 15 23:14:21 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: compat_70_mod.c,v 1.1.2.1 2018/03/15 05:10:05 pgoyette Exp $	*/
+/*	$NetBSD: compat_70_mod.c,v 1.1.2.2 2018/03/15 23:14:21 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -34,19 +34,15 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: compat_70_mod.c,v 1.1.2.1 2018/03/15 05:10:05 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: compat_70_mod.c,v 1.1.2.2 2018/03/15 23:14:21 pgoyette Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
 #include "opt_compat_43.h"
-#include "opt_ntp.h"
-#include "opt_sysv.h"
-#include "opt_lfs.h"
 #endif
 
 #include 
 #include 
-#include 
 
 #include 
 #include 



CVS commit: [pgoyette-compat] src/sys/compat/common

2018-03-15 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Thu Mar 15 22:46:22 UTC 2018

Modified Files:
src/sys/compat/common [pgoyette-compat]: compat_mod.c

Log Message:
Add alias module name 'compat_70' since the full compat module includes
the entire compat_70 module.


To generate a diff of this commit:
cvs rdiff -u -r1.24.14.8 -r1.24.14.9 src/sys/compat/common/compat_mod.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/compat/common/compat_mod.c
diff -u src/sys/compat/common/compat_mod.c:1.24.14.8 src/sys/compat/common/compat_mod.c:1.24.14.9
--- src/sys/compat/common/compat_mod.c:1.24.14.8	Thu Mar 15 11:17:54 2018
+++ src/sys/compat/common/compat_mod.c	Thu Mar 15 22:46:22 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: compat_mod.c,v 1.24.14.8 2018/03/15 11:17:54 pgoyette Exp $	*/
+/*	$NetBSD: compat_mod.c,v 1.24.14.9 2018/03/15 22:46:22 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: compat_mod.c,v 1.24.14.8 2018/03/15 11:17:54 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: compat_mod.c,v 1.24.14.9 2018/03/15 22:46:22 pgoyette Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
@@ -78,7 +78,12 @@ void if_50_init(void);
 void if_50_fini(void);
 #endif
 
-MODULE(MODULE_CLASS_EXEC, compat, NULL);
+static const char * const compat_includes[] = {
+	"compat_70",
+	NULL
+};
+
+MODULE_WITH_ALIASES(MODULE_CLASS_EXEC, compat, NULL, _includes);
 
 int	ttcompat(struct tty *, u_long, void *, int, struct lwp *);
 



CVS commit: [pgoyette-compat] src/sys/compat/common

2018-03-14 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Wed Mar 14 22:04:27 UTC 2018

Modified Files:
src/sys/compat/common [pgoyette-compat]: files.common

Log Message:
Tag files with their specific compat version required.  This way
the files only get included if needed, allowing for subsequent
loading of COMPAT_xx modules for older-than-built-in code.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.8 -r1.1.2.9 src/sys/compat/common/files.common

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/compat/common/files.common
diff -u src/sys/compat/common/files.common:1.1.2.8 src/sys/compat/common/files.common:1.1.2.9
--- src/sys/compat/common/files.common:1.1.2.8	Wed Mar 14 02:24:56 2018
+++ src/sys/compat/common/files.common	Wed Mar 14 22:04:27 2018
@@ -1,4 +1,4 @@
-#	$NetBSD: files.common,v 1.1.2.8 2018/03/14 02:24:56 pgoyette Exp $
+#	$NetBSD: files.common,v 1.1.2.9 2018/03/14 22:04:27 pgoyette Exp $
 
 #
 # Generic files, used by all compat options.
@@ -12,67 +12,67 @@ file	compat/common/compat_util.c		compat
 #
 
 # Compatibility code for 4.3BSD
-file	compat/common/kern_exit_43.c		compat_netbsd
-file	compat/common/kern_info_43.c		compat_netbsd
-file	compat/common/kern_resource_43.c	compat_netbsd
-file	compat/common/kern_sig_43.c		compat_netbsd
-file	compat/common/tty_43.c			compat_netbsd
-file	compat/common/uipc_syscalls_43.c	compat_netbsd
-file	compat/common/vfs_syscalls_43.c		compat_netbsd
-file	compat/common/vm_43.c			compat_netbsd
-file	compat/common/if_43.c			compat_netbsd
+file	compat/common/kern_exit_43.c		compat_43
+file	compat/common/kern_info_43.c		compat_43
+file	compat/common/kern_resource_43.c	compat_43
+file	compat/common/kern_sig_43.c		compat_43
+file	compat/common/tty_43.c			compat_43
+file	compat/common/uipc_syscalls_43.c	compat_43
+file	compat/common/vfs_syscalls_43.c		compat_43
+file	compat/common/vm_43.c			compat_43
+file	compat/common/if_43.c			compat_43
 
 # Compatibility code for NetBSD 0.9
-file	compat/common/kern_info_09.c		compat_netbsd
+file	compat/common/kern_info_09.c		compat_09
 
 # Compatability code for NetBSD 1.0
-file	compat/common/vfs_syscalls_10.c		compat_netbsd
+file	compat/common/vfs_syscalls_10.c		compat_10
 
 # Compatibility code for NetBSD 1.2
-file	compat/common/kern_xxx_12.c		compat_netbsd
-file	compat/common/vfs_syscalls_12.c		compat_netbsd
-file	compat/common/vm_12.c			compat_netbsd
+file	compat/common/kern_xxx_12.c		compat_12
+file	compat/common/vfs_syscalls_12.c		compat_12
+file	compat/common/vm_12.c			compat_12
 
 # Compatibility code for NetBSD 1.3
-file	compat/common/kern_sig_13.c		compat_netbsd
-file	compat/common/uvm_stats_13.c		compat_netbsd
+file	compat/common/kern_sig_13.c		compat_13
+file	compat/common/uvm_stats_13.c		compat_13
 
 # Compatibility code for NetBSD 1.4
-file	compat/common/rtsock_14.c		compat_netbsd
+file	compat/common/rtsock_14.c		compat_14
 
 # Compatibility code for NetBSD 1.6
-file	compat/common/kern_sig_16.c		compat_netbsd
+file	compat/common/kern_sig_16.c		compat_16
 
 # Compatibility code for NetBSD 2.0
-file	compat/common/vfs_syscalls_20.c		compat_netbsd
+file	compat/common/vfs_syscalls_20.c		compat_20
 
 # Compatibility code for NetBSD 3.0
-file	compat/common/kern_time_30.c		compat_netbsd
-file	compat/common/vfs_syscalls_30.c		compat_netbsd
-file	compat/common/uipc_syscalls_30.c	compat_netbsd
+file	compat/common/kern_time_30.c		compat_30
+file	compat/common/vfs_syscalls_30.c		compat_30
+file	compat/common/uipc_syscalls_30.c	compat_30
 
 # Compatibility code for NetBSD 4.0
-file	compat/common/vfs_syscalls_40.c		compat_netbsd
-file	compat/common/uipc_syscalls_40.c	compat_netbsd
+file	compat/common/vfs_syscalls_40.c		compat_40
+file	compat/common/uipc_syscalls_40.c	compat_40
 
 # Compatibility code for NetBSD 5.0
-file	compat/common/kern_50.c			compat_netbsd
-file	compat/common/kern_time_50.c		compat_netbsd
-file	compat/common/kern_select_50.c		compat_netbsd
-file	compat/common/rndpseudo_50.c		compat_netbsd
-file	compat/common/rtsock_50.c		compat_netbsd
-file	compat/common/vfs_syscalls_50.c		compat_netbsd
-file	compat/common/uipc_syscalls_50.c	compat_netbsd
-file	compat/common/uvm_stats_50.c		compat_netbsd
+file	compat/common/kern_50.c			compat_50
+file	compat/common/kern_time_50.c		compat_50
+file	compat/common/kern_select_50.c		compat_50
+file	compat/common/rndpseudo_50.c		compat_50
+file	compat/common/rtsock_50.c		compat_50
+file	compat/common/vfs_syscalls_50.c		compat_50
+file	compat/common/uipc_syscalls_50.c	compat_50
+file	compat/common/uvm_stats_50.c		compat_50
 
 # Compatibility code for NetBSD 6.0
-file	compat/common/kern_sa_60.c		compat_netbsd
-file	compat/common/tty_60.c			compat_netbsd
-file	compat/common/kern_time_60.c		compat_netbsd
+file	compat/common/kern_sa_60.c		compat_60
+file	compat/common/tty_60.c			compat_60
+file	compat/common/kern_time_60.c		compat_60
 
 # Compatibility code for NetBSD 7.0

CVS commit: [pgoyette-compat] src/sys/compat/common

2018-03-13 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Tue Mar 13 08:53:06 UTC 2018

Modified Files:
src/sys/compat/common [pgoyette-compat]: Makefile.inc

Log Message:
Revert the COMPAT_AS sestting back to library, the documented default.

It doesn't really matter, since we no longer build the library in any
format, but best to make the code match the comments.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.23.2.1 src/sys/compat/common/Makefile.inc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/compat/common/Makefile.inc
diff -u src/sys/compat/common/Makefile.inc:1.23 src/sys/compat/common/Makefile.inc:1.23.2.1
--- src/sys/compat/common/Makefile.inc:1.23	Sat Dec 16 08:31:36 2017
+++ src/sys/compat/common/Makefile.inc	Tue Mar 13 08:53:06 2018
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.23 2017/12/16 08:31:36 maxv Exp $
+#	$NetBSD: Makefile.inc,v 1.23.2.1 2018/03/13 08:53:06 pgoyette Exp $
 #
 #	Configuration variables (default values are below):
 #
@@ -21,7 +21,7 @@ COMPAT_AS?=		obj
 COMPATDOTDIR?= ../../.
 
 COMPATDIR=		${S:S@^.@${COMPATDOTDIR}@:Q}/compat/common
-.if (${COMPAT_AS} == "obj")
+.if (${COMPAT_AS} == "library")
 COMPATLIB=		${COMPATDST}/libcompat.o
 COMPATLIB_PROF=	${COMPATDST}/libcompat.po
 .else



CVS commit: [pgoyette-compat] src/sys/compat/common

2018-03-09 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sat Mar 10 02:20:13 UTC 2018

Modified Files:
src/sys/compat/common [pgoyette-compat]: sysv_ipc_50.c sysv_mod.c
sysv_mod.h

Log Message:
Put declaration of the 5.0 sysctl routine in a header file


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.4.16.1 src/sys/compat/common/sysv_ipc_50.c
cvs rdiff -u -r1.1.2.6 -r1.1.2.7 src/sys/compat/common/sysv_mod.c
cvs rdiff -u -r1.1.2.2 -r1.1.2.3 src/sys/compat/common/sysv_mod.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/compat/common/sysv_ipc_50.c
diff -u src/sys/compat/common/sysv_ipc_50.c:1.4 src/sys/compat/common/sysv_ipc_50.c:1.4.16.1
--- src/sys/compat/common/sysv_ipc_50.c:1.4	Thu Dec  3 00:28:55 2015
+++ src/sys/compat/common/sysv_ipc_50.c	Sat Mar 10 02:20:13 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: sysv_ipc_50.c,v 1.4 2015/12/03 00:28:55 pgoyette Exp $	*/
+/*	$NetBSD: sysv_ipc_50.c,v 1.4.16.1 2018/03/10 02:20:13 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2007 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: sysv_ipc_50.c,v 1.4 2015/12/03 00:28:55 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sysv_ipc_50.c,v 1.4.16.1 2018/03/10 02:20:13 pgoyette Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_sysv.h"
@@ -58,7 +58,6 @@ __KERNEL_RCSID(0, "$NetBSD: sysv_ipc_50.
 #include 
 #include 
 
-#ifdef COMPAT_50
 #include 
 #ifdef SYSVMSG
 #include 
@@ -74,8 +73,6 @@ __KERNEL_RCSID(0, "$NetBSD: sysv_ipc_50.
  * Check for ipc permission
  */
 
-int sysctl_kern_sysvipc50(SYSCTLFN_PROTO);
-
 int
 sysctl_kern_sysvipc50(SYSCTLFN_ARGS)
 {
@@ -215,4 +212,3 @@ sysctl_kern_sysvipc50(SYSCTLFN_ARGS)
 		free(bf, M_TEMP);
 	return error;
 }
-#endif /* COMPAT_50 */

Index: src/sys/compat/common/sysv_mod.c
diff -u src/sys/compat/common/sysv_mod.c:1.1.2.6 src/sys/compat/common/sysv_mod.c:1.1.2.7
--- src/sys/compat/common/sysv_mod.c:1.1.2.6	Fri Mar  9 09:37:01 2018
+++ src/sys/compat/common/sysv_mod.c	Sat Mar 10 02:20:13 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: sysv_mod.c,v 1.1.2.6 2018/03/09 09:37:01 pgoyette Exp $	*/
+/*	$NetBSD: sysv_mod.c,v 1.1.2.7 2018/03/10 02:20:13 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: sysv_mod.c,v 1.1.2.6 2018/03/09 09:37:01 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sysv_mod.c,v 1.1.2.7 2018/03/10 02:20:13 pgoyette Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
@@ -46,10 +46,6 @@ __KERNEL_RCSID(0, "$NetBSD: sysv_mod.c,v
 
 #include 
 
-#ifdef COMPAT_50
-int sysctl_kern_sysvipc50(SYSCTLFN_PROTO);
-#endif
-
 MODULE(MODULE_CLASS_EXEC, compat_sysv, "sysv_ipc");
 
 /* Build the syscall package based on options specified */

Index: src/sys/compat/common/sysv_mod.h
diff -u src/sys/compat/common/sysv_mod.h:1.1.2.2 src/sys/compat/common/sysv_mod.h:1.1.2.3
--- src/sys/compat/common/sysv_mod.h:1.1.2.2	Fri Mar  9 10:41:05 2018
+++ src/sys/compat/common/sysv_mod.h	Sat Mar 10 02:20:13 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: sysv_mod.h,v 1.1.2.2 2018/03/09 10:41:05 pgoyette Exp $	*/
+/*	$NetBSD: sysv_mod.h,v 1.1.2.3 2018/03/10 02:20:13 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -36,4 +36,6 @@
 
 extern int (*vec_sysvipc50_sysctl)(SYSCTLFN_PROTO);
 
+int sysctl_kern_sysvipc50(SYSCTLFN_PROTO);
+
 #endif /* _COMPAT_COMMON_SYSV_IPC_MOD_H_ */



CVS commit: [pgoyette-compat] src/sys/compat/common

2018-03-08 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Fri Mar  9 04:48:42 UTC 2018

Modified Files:
src/sys/compat/common [pgoyette-compat]: sysv_mod.c

Log Message:
Include correct header file


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.4 -r1.1.2.5 src/sys/compat/common/sysv_mod.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/compat/common/sysv_mod.c
diff -u src/sys/compat/common/sysv_mod.c:1.1.2.4 src/sys/compat/common/sysv_mod.c:1.1.2.5
--- src/sys/compat/common/sysv_mod.c:1.1.2.4	Fri Mar  9 04:42:11 2018
+++ src/sys/compat/common/sysv_mod.c	Fri Mar  9 04:48:42 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: sysv_mod.c,v 1.1.2.4 2018/03/09 04:42:11 pgoyette Exp $	*/
+/*	$NetBSD: sysv_mod.c,v 1.1.2.5 2018/03/09 04:48:42 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: sysv_mod.c,v 1.1.2.4 2018/03/09 04:42:11 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sysv_mod.c,v 1.1.2.5 2018/03/09 04:48:42 pgoyette Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
@@ -44,7 +44,7 @@ __KERNEL_RCSID(0, "$NetBSD: sysv_mod.c,v
 #include 
 #include 
 
-#include 
+#include 
 
 #ifdef COMPAT_50
 int sysctl_kern_sysvipc50(SYSCTLFN_PROTO);



CVS commit: [pgoyette-compat] src/sys/compat/common

2018-03-08 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Fri Mar  9 04:42:11 UTC 2018

Modified Files:
src/sys/compat/common [pgoyette-compat]: sysv_mod.c

Log Message:
All the COMPAT_xx macros are already in opt_compat_netbsd.h so no
need to look for them in opt_compat_xx.h


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.3 -r1.1.2.4 src/sys/compat/common/sysv_mod.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/compat/common/sysv_mod.c
diff -u src/sys/compat/common/sysv_mod.c:1.1.2.3 src/sys/compat/common/sysv_mod.c:1.1.2.4
--- src/sys/compat/common/sysv_mod.c:1.1.2.3	Fri Mar  9 03:58:32 2018
+++ src/sys/compat/common/sysv_mod.c	Fri Mar  9 04:42:11 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: sysv_mod.c,v 1.1.2.3 2018/03/09 03:58:32 pgoyette Exp $	*/
+/*	$NetBSD: sysv_mod.c,v 1.1.2.4 2018/03/09 04:42:11 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -30,13 +30,10 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: sysv_mod.c,v 1.1.2.3 2018/03/09 03:58:32 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sysv_mod.c,v 1.1.2.4 2018/03/09 04:42:11 pgoyette Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
-#include "opt_compat_50.h"
-#include "opt_compat_14.h"
-#include "opt_compat_10.h"
 #include "opt_sysv.h"
 #endif
 



CVS commit: [pgoyette-compat] src/sys/compat/common

2018-03-08 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Fri Mar  9 02:13:46 UTC 2018

Modified Files:
src/sys/compat/common [pgoyette-compat]: sysv_mod.c

Log Message:
Update dependency: compat_sysv requires sysv_ipc


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.1 -r1.1.2.2 src/sys/compat/common/sysv_mod.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/compat/common/sysv_mod.c
diff -u src/sys/compat/common/sysv_mod.c:1.1.2.1 src/sys/compat/common/sysv_mod.c:1.1.2.2
--- src/sys/compat/common/sysv_mod.c:1.1.2.1	Fri Mar  9 02:02:59 2018
+++ src/sys/compat/common/sysv_mod.c	Fri Mar  9 02:13:46 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: sysv_mod.c,v 1.1.2.1 2018/03/09 02:02:59 pgoyette Exp $	*/
+/*	$NetBSD: sysv_mod.c,v 1.1.2.2 2018/03/09 02:13:46 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: sysv_mod.c,v 1.1.2.1 2018/03/09 02:02:59 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sysv_mod.c,v 1.1.2.2 2018/03/09 02:13:46 pgoyette Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
@@ -53,7 +53,7 @@ __KERNEL_RCSID(0, "$NetBSD: sysv_mod.c,v
 int sysctl_kern_sysvipc50(SYSCTLFN_PROTO);
 #endif
 
-MODULE(MODULE_CLASS_EXEC, compat_sysv_ipc, NULL);
+MODULE(MODULE_CLASS_EXEC, compat_sysv_ipc, "sysv_ipc");
 
 /* Build the syscall package based on options specified */
 



CVS commit: [pgoyette-compat] src/sys/compat/common

2018-03-08 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Fri Mar  9 02:02:59 UTC 2018

Modified Files:
src/sys/compat/common [pgoyette-compat]: files.common
Added Files:
src/sys/compat/common [pgoyette-compat]: sysv_mod.c sysv_mod.h
Removed Files:
src/sys/compat/common [pgoyette-compat]: sysv_ipc_mod.c sysv_ipc_mod.h

Log Message:
More on renaming the new module


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.4 -r1.1.2.5 src/sys/compat/common/files.common
cvs rdiff -u -r1.1.2.1 -r0 src/sys/compat/common/sysv_ipc_mod.c \
src/sys/compat/common/sysv_ipc_mod.h
cvs rdiff -u -r0 -r1.1.2.1 src/sys/compat/common/sysv_mod.c \
src/sys/compat/common/sysv_mod.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/compat/common/files.common
diff -u src/sys/compat/common/files.common:1.1.2.4 src/sys/compat/common/files.common:1.1.2.5
--- src/sys/compat/common/files.common:1.1.2.4	Fri Mar  9 01:27:50 2018
+++ src/sys/compat/common/files.common	Fri Mar  9 02:02:59 2018
@@ -1,4 +1,4 @@
-#	$NetBSD: files.common,v 1.1.2.4 2018/03/09 01:27:50 pgoyette Exp $
+#	$NetBSD: files.common,v 1.1.2.5 2018/03/09 02:02:59 pgoyette Exp $
 
 #
 # Generic files, used by all compat options.
@@ -75,7 +75,7 @@ file	compat/common/uipc_usrreq_70.c		com
 
 # Module interface for sysv ipc compatability options
 
-file	compat/common/sysv_ipc_mod.c		compat_netbsd
+file	compat/common/sysv_mod.c		compat_netbsd
 
 # Compatibility code for NetBSD 1.0
 file	compat/common/kern_ipc_10.c		compat_netbsd

Added files:

Index: src/sys/compat/common/sysv_mod.c
diff -u /dev/null src/sys/compat/common/sysv_mod.c:1.1.2.1
--- /dev/null	Fri Mar  9 02:02:59 2018
+++ src/sys/compat/common/sysv_mod.c	Fri Mar  9 02:02:59 2018
@@ -0,0 +1,134 @@
+/*	$NetBSD: sysv_mod.c,v 1.1.2.1 2018/03/09 02:02:59 pgoyette Exp $	*/
+
+/*-
+ * Copyright (c) 2018 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software developed for The NetBSD Foundation
+ * by Paul Goyette
+ *
+ * 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.
+ */
+
+#include 
+__KERNEL_RCSID(0, "$NetBSD: sysv_mod.c,v 1.1.2.1 2018/03/09 02:02:59 pgoyette Exp $");
+
+#ifdef _KERNEL_OPT
+#include "opt_compat_netbsd.h"
+#include "opt_compat_50.h"
+#include "opt_compat_14.h"
+#include "opt_compat_10.h"
+#include "opt_sysv.h"
+#endif
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+
+#ifdef COMPAT_50
+int sysctl_kern_sysvipc50(SYSCTLFN_PROTO);
+#endif
+
+MODULE(MODULE_CLASS_EXEC, compat_sysv_ipc, NULL);
+
+/* Build the syscall package based on options specified */
+
+static const struct syscall_package compat_syscalls[] = {
+#if defined(COMPAT_10) && !defined(_LP64)
+#ifdef	SYSVSHM
+	{ SYS_compat_10_oshmsys, 0, (sy_call_t *)compat_10_sys_shmsys },
+#endif
+#ifdef	SYSVSEM
+	{ SYS_compat_10_osemsys, 0, (sy_call_t *)compat_10_sys_semsys },
+#endif
+#ifdef	SYSVMSG
+	{ SYS_compat_10_omsgsys, 0, (sy_call_t *)compat_10_sys_msgsys },
+#endif
+#endif /* defined(COMPAT_10) && !defined(_LP64) */
+
+#if defined(COMPAT_14)
+#ifdef SYSVSHM
+	{ SYS_compat_14_shmctl, 0, (sy_call_t *)compat_14_sys_shmctl },
+#endif
+#ifdef	SYSVSEM
+	{ SYS_compat_14___semctl, 0, (sy_call_t *)compat_14_sys___semctl },
+#endif
+#ifdef	SYSVMSG
+	{ SYS_compat_14_msgctl, 0, (sy_call_t *)compat_14_sys_msgctl },
+#endif
+#endif	/* defined(COMPAT_14) */
+
+#if defined(COMPAT_50)
+#ifdef SYSVSHM
+	{ SYS_compat_50___shmctl13, 0, (sy_call_t *)compat_50_sys___shmctl13 },
+#endif
+#ifdef	SYSVSEM
+	{ SYS_compat_50_semctl13, 0, (sy_call_t *)compat_50_sys_semctl13 },
+#endif
+#ifdef	SYSVMSG
+	{ 

CVS commit: [pgoyette-compat] src/sys/compat/common

2018-03-08 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Thu Mar  8 09:56:06 UTC 2018

Modified Files:
src/sys/compat/common [pgoyette-compat]: uipc_syscalls_40.c
uipc_syscalls_50.c

Log Message:
Remove unnecessary conditionals.  These files aren't built unless
their content is needed (via config option or module configuration).


To generate a diff of this commit:
cvs rdiff -u -r1.15.2.4 -r1.15.2.5 src/sys/compat/common/uipc_syscalls_40.c
cvs rdiff -u -r1.3.56.2 -r1.3.56.3 src/sys/compat/common/uipc_syscalls_50.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/compat/common/uipc_syscalls_40.c
diff -u src/sys/compat/common/uipc_syscalls_40.c:1.15.2.4 src/sys/compat/common/uipc_syscalls_40.c:1.15.2.5
--- src/sys/compat/common/uipc_syscalls_40.c:1.15.2.4	Thu Mar  8 00:25:30 2018
+++ src/sys/compat/common/uipc_syscalls_40.c	Thu Mar  8 09:56:05 2018
@@ -1,9 +1,9 @@
-/*	$NetBSD: uipc_syscalls_40.c,v 1.15.2.4 2018/03/08 00:25:30 pgoyette Exp $	*/
+/*	$NetBSD: uipc_syscalls_40.c,v 1.15.2.5 2018/03/08 09:56:05 pgoyette Exp $	*/
 
 /* written by Pavel Cahyna, 2006. Public domain. */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: uipc_syscalls_40.c,v 1.15.2.4 2018/03/08 00:25:30 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uipc_syscalls_40.c,v 1.15.2.5 2018/03/08 09:56:05 pgoyette Exp $");
 
 /*
  * System call interface to the socket abstraction.
@@ -24,7 +24,6 @@ __KERNEL_RCSID(0, "$NetBSD: uipc_syscall
 
 #include 
 
-#ifdef COMPAT_OIFREQ
 /*
  * Return interface configuration
  * of system.  List may be used
@@ -153,8 +152,7 @@ release_exit:
 	curlwp_bindx(bound);
 	return error;
 }
-#endif
-#if defined(COMPAT_40)
+
 static int (*orig_compat_ifconf)(u_long, void *);
 static int (*orig_compat_ifconf)(u_long, void *);
  
@@ -172,4 +170,3 @@ if_40_fini(void)
  
 	vec_compat_ifconf = orig_compat_ifconf;
 }
-#endif /* defined(COMPAT_40) */

Index: src/sys/compat/common/uipc_syscalls_50.c
diff -u src/sys/compat/common/uipc_syscalls_50.c:1.3.56.2 src/sys/compat/common/uipc_syscalls_50.c:1.3.56.3
--- src/sys/compat/common/uipc_syscalls_50.c:1.3.56.2	Thu Mar  8 07:04:01 2018
+++ src/sys/compat/common/uipc_syscalls_50.c	Thu Mar  8 09:56:05 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: uipc_syscalls_50.c,v 1.3.56.2 2018/03/08 07:04:01 pgoyette Exp $	*/
+/*	$NetBSD: uipc_syscalls_50.c,v 1.3.56.3 2018/03/08 09:56:05 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: uipc_syscalls_50.c,v 1.3.56.2 2018/03/08 07:04:01 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uipc_syscalls_50.c,v 1.3.56.3 2018/03/08 09:56:05 pgoyette Exp $");
 
 #include 
 #include 
@@ -56,7 +56,6 @@ __KERNEL_RCSID(0, "$NetBSD: uipc_syscall
 #include 
 #include 
 
-#ifdef COMPAT_OIFDATA
 /*ARGSUSED*/
 int
 compat_ifdatareq(struct lwp *l, u_long cmd, void *data)
@@ -115,4 +114,3 @@ if_50_fini(void)
 
 	vec_compat_ifdatareq = orig_compat_ifdatareq;
 }
-#endif



CVS commit: [pgoyette-compat] src/sys/compat/common

2018-03-08 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Thu Mar  8 08:56:47 UTC 2018

Modified Files:
src/sys/compat/common [pgoyette-compat]: uipc_usrreq_70.c

Log Message:
No need to compile conditionally, since it won't be compiled at all
unless requested.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.1.20.1 src/sys/compat/common/uipc_usrreq_70.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/compat/common/uipc_usrreq_70.c
diff -u src/sys/compat/common/uipc_usrreq_70.c:1.1 src/sys/compat/common/uipc_usrreq_70.c:1.1.20.1
--- src/sys/compat/common/uipc_usrreq_70.c:1.1	Wed Apr  6 19:45:45 2016
+++ src/sys/compat/common/uipc_usrreq_70.c	Thu Mar  8 08:56:47 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: uipc_usrreq_70.c,v 1.1 2016/04/06 19:45:45 roy Exp $	*/
+/*	$NetBSD: uipc_usrreq_70.c,v 1.1.20.1 2018/03/08 08:56:47 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2016 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: uipc_usrreq_70.c,v 1.1 2016/04/06 19:45:45 roy Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uipc_usrreq_70.c,v 1.1.20.1 2018/03/08 08:56:47 pgoyette Exp $");
 
 #include 
 #include 
@@ -42,7 +42,6 @@ __KERNEL_RCSID(0, "$NetBSD: uipc_usrreq_
 
 #include 
 
-#ifdef COMPAT_SOCKCRED70
 struct mbuf *
 compat_70_unp_addsockcred(struct lwp *l, struct mbuf *control)
 {
@@ -67,4 +66,3 @@ compat_70_unp_addsockcred(struct lwp *l,
 
 	return m_add(control, m);
 }
-#endif



CVS commit: [pgoyette-compat] src/sys/compat/common

2018-03-08 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Thu Mar  8 08:55:52 UTC 2018

Modified Files:
src/sys/compat/common [pgoyette-compat]: tty_60.c

Log Message:
We don't need to conditionalize the code on COMPAT_60 since we'll
only include the source file when COMPAT_60 is requested (either
by kernel option or module specification)


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.4.16.1 src/sys/compat/common/tty_60.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/compat/common/tty_60.c
diff -u src/sys/compat/common/tty_60.c:1.4 src/sys/compat/common/tty_60.c:1.4.16.1
--- src/sys/compat/common/tty_60.c:1.4	Thu Oct 22 15:18:25 2015
+++ src/sys/compat/common/tty_60.c	Thu Mar  8 08:55:52 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: tty_60.c,v 1.4 2015/10/22 15:18:25 christos Exp $	*/
+/*	$NetBSD: tty_60.c,v 1.4.16.1 2018/03/08 08:55:52 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: tty_60.c,v 1.4 2015/10/22 15:18:25 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tty_60.c,v 1.4.16.1 2018/03/08 08:55:52 pgoyette Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_compat_netbsd.h"
@@ -45,8 +45,6 @@ __KERNEL_RCSID(0, "$NetBSD: tty_60.c,v 1
 #include 
 #include 
 
-#ifdef COMPAT_60
-
 /* convert struct ptmget to struct compat_60_ptmget */
 static int
 ptmget_to_ptmget60(struct ptmget *pg, struct compat_60_ptmget *pg60)
@@ -116,5 +114,3 @@ compat_60_ptmioctl(dev_t dev, u_long cmd
 		return EPASSTHROUGH;
 	}
 }
-
-#endif /* COMPAT_60 */



CVS commit: [pgoyette-compat] src/sys/compat/common

2018-03-07 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Thu Mar  8 07:04:01 UTC 2018

Modified Files:
src/sys/compat/common [pgoyette-compat]: uipc_syscalls_50.c

Log Message:
Clean up compat routine vectors


To generate a diff of this commit:
cvs rdiff -u -r1.3.56.1 -r1.3.56.2 src/sys/compat/common/uipc_syscalls_50.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/compat/common/uipc_syscalls_50.c
diff -u src/sys/compat/common/uipc_syscalls_50.c:1.3.56.1 src/sys/compat/common/uipc_syscalls_50.c:1.3.56.2
--- src/sys/compat/common/uipc_syscalls_50.c:1.3.56.1	Thu Mar  8 00:23:47 2018
+++ src/sys/compat/common/uipc_syscalls_50.c	Thu Mar  8 07:04:01 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: uipc_syscalls_50.c,v 1.3.56.1 2018/03/08 00:23:47 pgoyette Exp $	*/
+/*	$NetBSD: uipc_syscalls_50.c,v 1.3.56.2 2018/03/08 07:04:01 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: uipc_syscalls_50.c,v 1.3.56.1 2018/03/08 00:23:47 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uipc_syscalls_50.c,v 1.3.56.2 2018/03/08 07:04:01 pgoyette Exp $");
 
 #include 
 #include 
@@ -54,6 +54,7 @@ __KERNEL_RCSID(0, "$NetBSD: uipc_syscall
 #include 
 #include 
 #include 
+#include 
 
 #ifdef COMPAT_OIFDATA
 /*ARGSUSED*/
@@ -98,16 +99,13 @@ compat_ifdatareq(struct lwp *l, u_long c
 
 /* Save and restore compat vector as needed */
 
-int (*orig_compat_ifconf)(u_long, void *);
 int (*orig_compat_ifdatareq)(struct lwp *, u_long, void *);
 
 void
 if_50_init(void)
 {
 
-	orig_compat_ifreqo2n = vec_compat_ifreqo2n;
 	orig_compat_ifdatareq = vec_compat_ifdatareq;
-	vec_compat_ifreqo2n = compat_ifreqo2n;
 	vec_compat_ifdatareq = compat_ifdatareq;
 }
 
@@ -115,7 +113,6 @@ void
 if_50_fini(void)
 {
 
-	vec_compat_ifreqo2n = orig_compat_ifreqo2n;
 	vec_compat_ifdatareq = orig_compat_ifdatareq;
 }
 #endif



CVS commit: [pgoyette-compat] src/sys/compat/common

2018-03-07 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Thu Mar  8 01:07:13 UTC 2018

Modified Files:
src/sys/compat/common [pgoyette-compat]: compat_mod.c

Log Message:
Include if.h to get IFNAMSIZE


To generate a diff of this commit:
cvs rdiff -u -r1.24.14.3 -r1.24.14.4 src/sys/compat/common/compat_mod.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/compat/common/compat_mod.c
diff -u src/sys/compat/common/compat_mod.c:1.24.14.3 src/sys/compat/common/compat_mod.c:1.24.14.4
--- src/sys/compat/common/compat_mod.c:1.24.14.3	Thu Mar  8 00:23:47 2018
+++ src/sys/compat/common/compat_mod.c	Thu Mar  8 01:07:13 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: compat_mod.c,v 1.24.14.3 2018/03/08 00:23:47 pgoyette Exp $	*/
+/*	$NetBSD: compat_mod.c,v 1.24.14.4 2018/03/08 01:07:13 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: compat_mod.c,v 1.24.14.3 2018/03/08 00:23:47 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: compat_mod.c,v 1.24.14.4 2018/03/08 01:07:13 pgoyette Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
@@ -54,6 +54,8 @@ __KERNEL_RCSID(0, "$NetBSD: compat_mod.c
 #include 
 #include 
 
+#include 
+
 #include 
 #include 
 



CVS commit: [pgoyette-compat] src/sys/compat/common

2018-03-07 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Thu Mar  8 00:23:47 UTC 2018

Modified Files:
src/sys/compat/common [pgoyette-compat]: compat_mod.c
uipc_syscalls_50.c

Log Message:
Implement vector initialization for ifreqo2n and ifdatareq


To generate a diff of this commit:
cvs rdiff -u -r1.24.14.2 -r1.24.14.3 src/sys/compat/common/compat_mod.c
cvs rdiff -u -r1.3 -r1.3.56.1 src/sys/compat/common/uipc_syscalls_50.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/compat/common/compat_mod.c
diff -u src/sys/compat/common/compat_mod.c:1.24.14.2 src/sys/compat/common/compat_mod.c:1.24.14.3
--- src/sys/compat/common/compat_mod.c:1.24.14.2	Tue Mar  6 23:17:42 2018
+++ src/sys/compat/common/compat_mod.c	Thu Mar  8 00:23:47 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: compat_mod.c,v 1.24.14.2 2018/03/06 23:17:42 pgoyette Exp $	*/
+/*	$NetBSD: compat_mod.c,v 1.24.14.3 2018/03/08 00:23:47 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: compat_mod.c,v 1.24.14.2 2018/03/06 23:17:42 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: compat_mod.c,v 1.24.14.3 2018/03/08 00:23:47 pgoyette Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
@@ -60,6 +60,8 @@ __KERNEL_RCSID(0, "$NetBSD: compat_mod.c
 #include 
 #include 
 #include 
+#include 
+
 
 #if defined(COMPAT_09) || defined(COMPAT_43) || defined(COMPAT_50)
 static struct sysctllog *compat_clog = NULL;

Index: src/sys/compat/common/uipc_syscalls_50.c
diff -u src/sys/compat/common/uipc_syscalls_50.c:1.3 src/sys/compat/common/uipc_syscalls_50.c:1.3.56.1
--- src/sys/compat/common/uipc_syscalls_50.c:1.3	Wed Jan 19 10:21:16 2011
+++ src/sys/compat/common/uipc_syscalls_50.c	Thu Mar  8 00:23:47 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: uipc_syscalls_50.c,v 1.3 2011/01/19 10:21:16 tsutsui Exp $	*/
+/*	$NetBSD: uipc_syscalls_50.c,v 1.3.56.1 2018/03/08 00:23:47 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: uipc_syscalls_50.c,v 1.3 2011/01/19 10:21:16 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uipc_syscalls_50.c,v 1.3.56.1 2018/03/08 00:23:47 pgoyette Exp $");
 
 #include 
 #include 
@@ -95,4 +95,27 @@ compat_ifdatareq(struct lwp *l, u_long c
 		return EINVAL;
 	}
 }
+
+/* Save and restore compat vector as needed */
+
+int (*orig_compat_ifconf)(u_long, void *);
+int (*orig_compat_ifdatareq)(struct lwp *, u_long, void *);
+
+void
+if_50_init(void)
+{
+
+	orig_compat_ifreqo2n = vec_compat_ifreqo2n;
+	orig_compat_ifdatareq = vec_compat_ifdatareq;
+	vec_compat_ifreqo2n = compat_ifreqo2n;
+	vec_compat_ifdatareq = compat_ifdatareq;
+}
+
+void
+if_50_fini(void)
+{
+
+	vec_compat_ifreqo2n = orig_compat_ifreqo2n;
+	vec_compat_ifdatareq = orig_compat_ifdatareq;
+}
 #endif



CVS commit: [pgoyette-compat] src/sys/compat/common

2018-03-06 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Tue Mar  6 23:17:42 UTC 2018

Modified Files:
src/sys/compat/common [pgoyette-compat]: compat_mod.c
uipc_syscalls_40.c
Added Files:
src/sys/compat/common [pgoyette-compat]: if_40.h

Log Message:
Use a .h file for declaring the if_40_{init, fini} routines


To generate a diff of this commit:
cvs rdiff -u -r1.24.14.1 -r1.24.14.2 src/sys/compat/common/compat_mod.c
cvs rdiff -u -r0 -r1.1.2.1 src/sys/compat/common/if_40.h
cvs rdiff -u -r1.15.2.2 -r1.15.2.3 src/sys/compat/common/uipc_syscalls_40.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/compat/common/compat_mod.c
diff -u src/sys/compat/common/compat_mod.c:1.24.14.1 src/sys/compat/common/compat_mod.c:1.24.14.2
--- src/sys/compat/common/compat_mod.c:1.24.14.1	Tue Mar  6 05:46:06 2018
+++ src/sys/compat/common/compat_mod.c	Tue Mar  6 23:17:42 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: compat_mod.c,v 1.24.14.1 2018/03/06 05:46:06 pgoyette Exp $	*/
+/*	$NetBSD: compat_mod.c,v 1.24.14.2 2018/03/06 23:17:42 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: compat_mod.c,v 1.24.14.1 2018/03/06 05:46:06 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: compat_mod.c,v 1.24.14.2 2018/03/06 23:17:42 pgoyette Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
@@ -66,8 +66,7 @@ static struct sysctllog *compat_clog = N
 #endif
 
 #ifdef COMPAT_40
-void if_40_init(void);
-void if_40_fini(void);
+#include 
 #endif
 
 #ifdef COMPAT_50

Index: src/sys/compat/common/uipc_syscalls_40.c
diff -u src/sys/compat/common/uipc_syscalls_40.c:1.15.2.2 src/sys/compat/common/uipc_syscalls_40.c:1.15.2.3
--- src/sys/compat/common/uipc_syscalls_40.c:1.15.2.2	Tue Mar  6 22:46:41 2018
+++ src/sys/compat/common/uipc_syscalls_40.c	Tue Mar  6 23:17:42 2018
@@ -1,9 +1,9 @@
-/*	$NetBSD: uipc_syscalls_40.c,v 1.15.2.2 2018/03/06 22:46:41 pgoyette Exp $	*/
+/*	$NetBSD: uipc_syscalls_40.c,v 1.15.2.3 2018/03/06 23:17:42 pgoyette Exp $	*/
 
 /* written by Pavel Cahyna, 2006. Public domain. */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: uipc_syscalls_40.c,v 1.15.2.2 2018/03/06 22:46:41 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uipc_syscalls_40.c,v 1.15.2.3 2018/03/06 23:17:42 pgoyette Exp $");
 
 /*
  * System call interface to the socket abstraction.
@@ -21,6 +21,8 @@ __KERNEL_RCSID(0, "$NetBSD: uipc_syscall
 #include 
 #include 
 
+#include 
+
 #ifdef COMPAT_OIFREQ
 /*
  * Return interface configuration

Added files:

Index: src/sys/compat/common/if_40.h
diff -u /dev/null src/sys/compat/common/if_40.h:1.1.2.1
--- /dev/null	Tue Mar  6 23:17:43 2018
+++ src/sys/compat/common/if_40.h	Tue Mar  6 23:17:42 2018
@@ -0,0 +1,44 @@
+/*	$NetBSD: if_40.h,v 1.1.2.1 2018/03/06 23:17:42 pgoyette Exp $	*/
+
+/*-
+ * Copyright (c) 2016 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Paul Goyette
+ *
+ * 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.
+ */
+
+#ifndef	_COMPAT_IF_40_H_
+#define	_COMPAT_IF_40_H_
+
+#if defined(COMPAT_40)
+extern u_long (*vec_compat_cvtcmd)(u_long); 
+extern int (*vec_compat_ifioctl)(struct socket *, u_long, u_long, 
+void *, struct lwp *);
+
+void if_40_init(void);
+void if_40_fini(void);
+#endif
+
+#endif /* !_COMPAT_IF_40_H_ */



CVS commit: [pgoyette-compat] src/sys/compat/common

2018-03-06 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Tue Mar  6 22:46:41 UTC 2018

Modified Files:
src/sys/compat/common [pgoyette-compat]: uipc_syscalls_40.c

Log Message:
Typo in function declaration.


To generate a diff of this commit:
cvs rdiff -u -r1.15.2.1 -r1.15.2.2 src/sys/compat/common/uipc_syscalls_40.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/compat/common/uipc_syscalls_40.c
diff -u src/sys/compat/common/uipc_syscalls_40.c:1.15.2.1 src/sys/compat/common/uipc_syscalls_40.c:1.15.2.2
--- src/sys/compat/common/uipc_syscalls_40.c:1.15.2.1	Tue Mar  6 05:46:06 2018
+++ src/sys/compat/common/uipc_syscalls_40.c	Tue Mar  6 22:46:41 2018
@@ -1,9 +1,9 @@
-/*	$NetBSD: uipc_syscalls_40.c,v 1.15.2.1 2018/03/06 05:46:06 pgoyette Exp $	*/
+/*	$NetBSD: uipc_syscalls_40.c,v 1.15.2.2 2018/03/06 22:46:41 pgoyette Exp $	*/
 
 /* written by Pavel Cahyna, 2006. Public domain. */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: uipc_syscalls_40.c,v 1.15.2.1 2018/03/06 05:46:06 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uipc_syscalls_40.c,v 1.15.2.2 2018/03/06 22:46:41 pgoyette Exp $");
 
 /*
  * System call interface to the socket abstraction.
@@ -153,7 +153,7 @@ release_exit:
 #endif
 #if defined(COMPAT_40)
 static int (*orig_compat_ifconf)(u_long, void *);
-static void (*orig_compat_ifconf(u_long, void *);
+static int (*orig_compat_ifconf)(u_long, void *);
  
 void  
 if_40_init(void)



CVS commit: [pgoyette-compat] src/sys/compat/common

2018-03-06 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Tue Mar  6 10:00:10 UTC 2018

Modified Files:
src/sys/compat/common [pgoyette-compat]: files.common

Log Message:
compat_util.c is included in all kernels, so does not need to be
listed here.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.1 -r1.1.2.2 src/sys/compat/common/files.common

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/compat/common/files.common
diff -u src/sys/compat/common/files.common:1.1.2.1 src/sys/compat/common/files.common:1.1.2.2
--- src/sys/compat/common/files.common:1.1.2.1	Tue Mar  6 05:38:20 2018
+++ src/sys/compat/common/files.common	Tue Mar  6 10:00:10 2018
@@ -1,11 +1,10 @@
-#	$NetBSD: files.common,v 1.1.2.1 2018/03/06 05:38:20 pgoyette Exp $
+#	$NetBSD: files.common,v 1.1.2.2 2018/03/06 10:00:10 pgoyette Exp $
 
 #
 # Generic files, used by all compat options.
 #
 file	compat/common/compat_mod.c		compat_netbsd
 file	compat/common/compat_exec.c		compat_netbsd
-file	compat/common/compat_util.c		compat_netbsd
 
 #
 # Sources for syscall and ioctl compatibility across the versions.



CVS commit: [pgoyette-compat] src/sys/compat/common

2018-03-05 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Tue Mar  6 05:38:20 UTC 2018

Added Files:
src/sys/compat/common [pgoyette-compat]: files.common

Log Message:
Add a files.common to list all the compat source files.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1.2.1 src/sys/compat/common/files.common

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Added files:

Index: src/sys/compat/common/files.common
diff -u /dev/null src/sys/compat/common/files.common:1.1.2.1
--- /dev/null	Tue Mar  6 05:38:20 2018
+++ src/sys/compat/common/files.common	Tue Mar  6 05:38:20 2018
@@ -0,0 +1,89 @@
+#	$NetBSD: files.common,v 1.1.2.1 2018/03/06 05:38:20 pgoyette Exp $
+
+#
+# Generic files, used by all compat options.
+#
+file	compat/common/compat_mod.c		compat_netbsd
+file	compat/common/compat_exec.c		compat_netbsd
+file	compat/common/compat_util.c		compat_netbsd
+
+#
+# Sources for syscall and ioctl compatibility across the versions.
+#
+
+# Compatibility code for 4.3BSD
+file	compat/common/kern_exit_43.c		compat_netbsd
+file	compat/common/kern_info_43.c		compat_netbsd
+file	compat/common/kern_resource_43.c	compat_netbsd
+file	compat/common/kern_sig_43.c		compat_netbsd
+file	compat/common/tty_43.c			compat_netbsd
+file	compat/common/uipc_syscalls_43.c	compat_netbsd
+file	compat/common/vfs_syscalls_43.c		compat_netbsd
+file	compat/common/vm_43.c			compat_netbsd
+file	compat/common/if_43.c			compat_netbsd
+
+# Compatibility code for NetBSD 0.9
+file	compat/common/kern_info_09.c		compat_netbsd
+
+# Compatibility code for NetBSD 1.2
+file	compat/common/kern_xxx_12.c		compat_netbsd
+file	compat/common/vfs_syscalls_12.c		compat_netbsd
+file	compat/common/vm_12.c			compat_netbsd
+
+# Compatibility code for NetBSD 1.3
+file	compat/common/kern_sig_13.c		compat_netbsd
+
+# Compatibility code for NetBSD 1.4
+file	compat/common/rtsock_14.c		compat_netbsd
+
+# Compatibility code for NetBSD 1.6
+file	compat/common/kern_sig_16.c		compat_netbsd
+
+# Compatibility code for NetBSD 2.0
+file	compat/common/vfs_syscalls_20.c		compat_netbsd
+
+# Compatibility code for NetBSD 3.0
+file	compat/common/kern_time_30.c		compat_netbsd
+file	compat/common/vfs_syscalls_30.c		compat_netbsd
+file	compat/common/uipc_syscalls_30.c	compat_netbsd
+
+# Compatibility code for NetBSD 4.0
+file	compat/common/vfs_syscalls_40.c		compat_netbsd
+file	compat/common/uipc_syscalls_40.c	compat_netbsd
+
+# Compatibility code for NetBSD 5.0
+file	compat/common/kern_50.c			compat_netbsd
+file	compat/common/kern_time_50.c		compat_netbsd
+file	compat/common/kern_select_50.c		compat_netbsd
+file	compat/common/rndpseudo_50.c		compat_netbsd
+file	compat/common/rtsock_50.c		compat_netbsd
+file	compat/common/vfs_syscalls_50.c		compat_netbsd
+file	compat/common/uipc_syscalls_50.c	compat_netbsd
+
+# Compatibility code for NetBSD 6.0
+file	compat/common/kern_sa_60.c		compat_netbsd
+file	compat/common/tty_60.c			compat_netbsd
+file	compat/common/kern_time_60.c		compat_netbsd
+
+# Compatibility code for NetBSD 7.0
+file	compat/common/rtsock_70.c		compat_netbsd
+file	compat/common/uipc_usrreq_70.c		compat_netbsd
+
+#
+# Sources for sysv ipc compatibility across the versions.
+#
+
+# Compatibility code for NetBSD 1.0
+file	compat/common/kern_ipc_10.c		compat_netbsd
+
+# Compatibility code for NetBSD 1.4
+file	compat/common/sysv_msg_14.c		compat_netbsd
+file	compat/common/sysv_sem_14.c		compat_netbsd
+file	compat/common/sysv_shm_14.c		compat_netbsd
+
+# Compatibility code for NetBSD 5.0
+file	compat/common/sysv_ipc_50.c		compat_netbsd
+file	compat/common/sysv_msg_50.c		compat_netbsd
+file	compat/common/sysv_sem_50.c		compat_netbsd
+file	compat/common/sysv_shm_50.c		compat_netbsd
+