Module Name: src
Committed By: pgoyette
Date: Sat Mar 24 01:59:16 UTC 2018
Modified Files:
src/distrib/sets/lists/modules [pgoyette-compat]: mi
src/sys/compat/common [pgoyette-compat]: Makefile.sysio compat_80_mod.c
files.common
src/sys/dev/raidframe [pgoyette-compat]: rf_compat50.c rf_compat50.h
rf_compat80.c rf_compat80.h rf_netbsdkintf.c
src/sys/kern [pgoyette-compat]: compat_stub.c
src/sys/modules [pgoyette-compat]: Makefile
src/sys/modules/compat_50 [pgoyette-compat]: Makefile
src/sys/modules/compat_80 [pgoyette-compat]: Makefile
src/sys/sys [pgoyette-compat]: compat_stub.h
Log Message:
Separate the compat_50 and compat_80 dispatching code from the main
body of raidframe, and place into the appropriate compat modules.
Enable building of the compat_80 module.
To generate a diff of this commit:
cvs rdiff -u -r1.114.2.5 -r1.114.2.6 src/distrib/sets/lists/modules/mi
cvs rdiff -u -r1.7.18.9 -r1.7.18.10 src/sys/compat/common/Makefile.sysio
cvs rdiff -u -r1.1.2.3 -r1.1.2.4 src/sys/compat/common/compat_80_mod.c
cvs rdiff -u -r1.1.2.17 -r1.1.2.18 src/sys/compat/common/files.common
cvs rdiff -u -r1.3 -r1.3.2.1 src/sys/dev/raidframe/rf_compat50.c
cvs rdiff -u -r1.2 -r1.2.16.1 src/sys/dev/raidframe/rf_compat50.h
cvs rdiff -u -r1.2 -r1.2.2.1 src/sys/dev/raidframe/rf_compat80.c \
src/sys/dev/raidframe/rf_compat80.h
cvs rdiff -u -r1.356 -r1.356.2.1 src/sys/dev/raidframe/rf_netbsdkintf.c
cvs rdiff -u -r1.1.2.4 -r1.1.2.5 src/sys/kern/compat_stub.c
cvs rdiff -u -r1.202.2.9 -r1.202.2.10 src/sys/modules/Makefile
cvs rdiff -u -r1.1.2.4 -r1.1.2.5 src/sys/modules/compat_50/Makefile
cvs rdiff -u -r1.1.2.1 -r1.1.2.2 src/sys/modules/compat_80/Makefile
cvs rdiff -u -r1.1.2.4 -r1.1.2.5 src/sys/sys/compat_stub.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/distrib/sets/lists/modules/mi
diff -u src/distrib/sets/lists/modules/mi:1.114.2.5 src/distrib/sets/lists/modules/mi:1.114.2.6
--- src/distrib/sets/lists/modules/mi:1.114.2.5 Mon Mar 19 21:55:17 2018
+++ src/distrib/sets/lists/modules/mi Sat Mar 24 01:59:15 2018
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.114.2.5 2018/03/19 21:55:17 pgoyette Exp $
+# $NetBSD: mi,v 1.114.2.6 2018/03/24 01:59:15 pgoyette Exp $
#
# Note: don't delete entries from here - mark them as "obsolete" instead.
#
@@ -74,6 +74,8 @@
./@MODULEDIR@/compat_60/compat_60.kmod base-kernel-modules kmod
./@MODULEDIR@/compat_70 base-kernel-modules kmod
./@MODULEDIR@/compat_70/compat_70.kmod base-kernel-modules kmod
+./@MODULEDIR@/compat_80 base-kernel-modules kmod
+./@MODULEDIR@/compat_80/compat_80.kmod base-kernel-modules kmod
./@MODULEDIR@/compat_ossaudio base-kernel-modules kmod
./@MODULEDIR@/compat_ossaudio/compat_ossaudio.kmod base-kernel-modules kmod
./@MODULEDIR@/compat_sysv base-kernel-modules kmod
Index: src/sys/compat/common/Makefile.sysio
diff -u src/sys/compat/common/Makefile.sysio:1.7.18.9 src/sys/compat/common/Makefile.sysio:1.7.18.10
--- src/sys/compat/common/Makefile.sysio:1.7.18.9 Fri Mar 23 09:41:10 2018
+++ src/sys/compat/common/Makefile.sysio Sat Mar 24 01:59:15 2018
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.sysio,v 1.7.18.9 2018/03/23 09:41:10 pgoyette Exp $
+# $NetBSD: Makefile.sysio,v 1.7.18.10 2018/03/24 01:59:15 pgoyette Exp $
# Sources for syscall and ioctl compatibility across the versions.
@@ -44,10 +44,12 @@ SRCS+= kern_sa_60.c tty_60.c kern_time_6
# Compatibility code for NetBSD 7.0
SRCS+= rtsock_70.c uipc_usrreq_70.c
-# Compatability code for NetBSD 8.0
-#SRCS+= raidframe80.c
-
# More compatibility code for NetBSD 5.0
.PATH: ${S}/opencrypto
SRCS+= ocryptodev.c
+# Raidframe compatibility code for NetBSD 5.0 and 8.0
+.PATH: ${S}/dev/raidframe
+SRCS+= rf_compat50.c
+SRCS+= rf_compat80.c
+
Index: src/sys/compat/common/compat_80_mod.c
diff -u src/sys/compat/common/compat_80_mod.c:1.1.2.3 src/sys/compat/common/compat_80_mod.c:1.1.2.4
--- src/sys/compat/common/compat_80_mod.c:1.1.2.3 Fri Mar 23 09:38:48 2018
+++ src/sys/compat/common/compat_80_mod.c Sat Mar 24 01:59:15 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: compat_80_mod.c,v 1.1.2.3 2018/03/23 09:38:48 pgoyette Exp $ */
+/* $NetBSD: compat_80_mod.c,v 1.1.2.4 2018/03/24 01:59:15 pgoyette Exp $ */
/*-
* Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: compat_80_mod.c,v 1.1.2.3 2018/03/23 09:38:48 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: compat_80_mod.c,v 1.1.2.4 2018/03/24 01:59:15 pgoyette Exp $");
#ifdef _KERNEL_OPT
#include "opt_compat_netbsd.h"
@@ -86,7 +86,7 @@ int compat_80_fini(void)
MODULE(MODULE_CLASS_EXEC, compat_80, REQD_80);
static int
-compat_70_modcmd(modcmd_t cmd, void *arg)
+compat_80_modcmd(modcmd_t cmd, void *arg)
{
switch (cmd) {
Index: src/sys/compat/common/files.common
diff -u src/sys/compat/common/files.common:1.1.2.17 src/sys/compat/common/files.common:1.1.2.18
--- src/sys/compat/common/files.common:1.1.2.17 Fri Mar 23 09:38:48 2018
+++ src/sys/compat/common/files.common Sat Mar 24 01:59:15 2018
@@ -1,4 +1,4 @@
-# $NetBSD: files.common,v 1.1.2.17 2018/03/23 09:38:48 pgoyette Exp $
+# $NetBSD: files.common,v 1.1.2.18 2018/03/24 01:59:15 pgoyette Exp $
#
# Generic files, used by all compat options.
@@ -83,7 +83,6 @@ 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
#
# Sources for sysv ipc compatibility across the versions.
Index: src/sys/dev/raidframe/rf_compat50.c
diff -u src/sys/dev/raidframe/rf_compat50.c:1.3 src/sys/dev/raidframe/rf_compat50.c:1.3.2.1
--- src/sys/dev/raidframe/rf_compat50.c:1.3 Thu Jan 18 00:32:49 2018
+++ src/sys/dev/raidframe/rf_compat50.c Sat Mar 24 01:59:15 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: rf_compat50.c,v 1.3 2018/01/18 00:32:49 mrg Exp $ */
+/* $NetBSD: rf_compat50.c,v 1.3.2.1 2018/03/24 01:59:15 pgoyette Exp $ */
/*-
* Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -40,6 +40,8 @@
#include <sys/param.h>
#include <sys/systm.h>
+#include <sys/compat_stub.h>
+
#include <dev/raidframe/raidframeio.h>
#include <dev/raidframe/raidframevar.h>
@@ -214,3 +216,38 @@ out:
RF_Free(d_cfg, sizeof(RF_DeviceConfig50_t));
return error;
}
+
+int
+raidframe_ioctl_50(int cmd, int initted, RF_Raid_t *raidPtr, int unit,
+ void *data, RF_Config_t **k_cfg)
+{
+ int error;
+
+ switch (cmd) {
+ case RAIDFRAME_GET_INFO50:
+ if (initted == 0)
+ return ENXIO;
+ return rf_get_info50(raidPtr, data);
+
+ case RAIDFRAME_CONFIGURE50:
+ error = rf_config50(raidPtr, unit, data, k_cfg);
+ if (error != 0)
+ return error;
+ return EAGAIN; /* flag mainline to call generic config */
+ }
+ return EPASSTHROUGH;
+}
+
+void
+raidframe_50_init(void)
+{
+
+ raidframe50_ioctl = raidframe_ioctl_50;
+}
+
+void
+raidframe_50_fini(void)
+{
+
+ raidframe50_ioctl = (void *)enosys;
+}
Index: src/sys/dev/raidframe/rf_compat50.h
diff -u src/sys/dev/raidframe/rf_compat50.h:1.2 src/sys/dev/raidframe/rf_compat50.h:1.2.16.1
--- src/sys/dev/raidframe/rf_compat50.h:1.2 Sun Sep 6 06:01:00 2015
+++ src/sys/dev/raidframe/rf_compat50.h Sat Mar 24 01:59:15 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: rf_compat50.h,v 1.2 2015/09/06 06:01:00 dholland Exp $ */
+/* $NetBSD: rf_compat50.h,v 1.2.16.1 2018/03/24 01:59:15 pgoyette Exp $ */
/*-
* Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -47,4 +47,9 @@
int rf_config50(RF_Raid_t *, int, void *, RF_Config_t **);
int rf_get_info50(RF_Raid_t *, void *);
+int raidframe_ioctl_50(int, int, RF_Raid_t *, int, void *, RF_Config_t **);
+
+void raidframe_50_fini(void);
+void raidframe_50_init(void);
+
#endif /* _RF_COMPAT50_H_ */
Index: src/sys/dev/raidframe/rf_compat80.c
diff -u src/sys/dev/raidframe/rf_compat80.c:1.2 src/sys/dev/raidframe/rf_compat80.c:1.2.2.1
--- src/sys/dev/raidframe/rf_compat80.c:1.2 Sat Jan 20 01:32:45 2018
+++ src/sys/dev/raidframe/rf_compat80.c Sat Mar 24 01:59:15 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: rf_compat80.c,v 1.2 2018/01/20 01:32:45 mrg Exp $ */
+/* $NetBSD: rf_compat80.c,v 1.2.2.1 2018/03/24 01:59:15 pgoyette Exp $ */
/*
* Copyright (c) 2017 Matthew R. Green
@@ -32,6 +32,8 @@
#include <sys/param.h>
#include <sys/systm.h>
+#include <sys/compat_stub.h>
+
#include <dev/raidframe/raidframeio.h>
#include <dev/raidframe/raidframevar.h>
@@ -217,3 +219,61 @@ rf_config80(RF_Raid_t *raidPtr, int unit
*k_cfgp = k_cfg;
return 0;
}
+
+int
+raidframe_ioctl_80(int cmd, int initted, RF_Raid_t *raidPtr, int unit,
+ void *data, RF_Config_t **k_cfg)
+{
+int error;
+
+ switch (cmd) {
+ case RAIDFRAME_CHECK_RECON_STATUS_EXT80:
+ case RAIDFRAME_CHECK_PARITYREWRITE_STATUS_EXT80:
+ case RAIDFRAME_CHECK_COPYBACK_STATUS_EXT80:
+ case RAIDFRAME_GET_INFO80:
+ case RAIDFRAME_GET_COMPONENT_LABEL80:
+ if (initted == 0)
+ return ENXIO;
+ break;
+ case RAIDFRAME_CONFIGURE80:
+ break;
+ case RAIDFRAME_FAIL_DISK80:
+ return EPASSTHROUGH;
+ default:
+ return EINVAL;
+ }
+
+ switch (cmd) {
+ case RAIDFRAME_CHECK_RECON_STATUS_EXT80:
+ return rf_check_recon_status_ext80(raidPtr, data);
+ case RAIDFRAME_CHECK_PARITYREWRITE_STATUS_EXT80:
+ return rf_check_parityrewrite_status_ext80(raidPtr, data);
+ case RAIDFRAME_CHECK_COPYBACK_STATUS_EXT80:
+ return rf_check_copyback_status_ext80(raidPtr, data);
+ case RAIDFRAME_GET_INFO80:
+ return rf_get_info80(raidPtr, data);
+ case RAIDFRAME_GET_COMPONENT_LABEL80:
+ return rf_get_component_label80(raidPtr, data);
+ case RAIDFRAME_CONFIGURE80:
+ error = rf_config80(raidPtr, unit, data, k_cfg);
+ if (error != 0)
+ return error;
+ return EAGAIN; /* flag mainline to call generic config */
+ }
+ return EPASSTHROUGH;
+}
+
+void
+raidframe_80_init(void)
+{
+
+ raidframe80_ioctl = raidframe_ioctl_80;
+}
+
+void
+raidframe_80_fini(void)
+{
+
+ raidframe80_ioctl = (void *)enosys;
+}
+
Index: src/sys/dev/raidframe/rf_compat80.h
diff -u src/sys/dev/raidframe/rf_compat80.h:1.2 src/sys/dev/raidframe/rf_compat80.h:1.2.2.1
--- src/sys/dev/raidframe/rf_compat80.h:1.2 Sat Jan 20 01:32:45 2018
+++ src/sys/dev/raidframe/rf_compat80.h Sat Mar 24 01:59:15 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: rf_compat80.h,v 1.2 2018/01/20 01:32:45 mrg Exp $ */
+/* $NetBSD: rf_compat80.h,v 1.2.2.1 2018/03/24 01:59:15 pgoyette Exp $ */
/*
* Copyright (c) 2017 Matthew R. Green
@@ -132,4 +132,9 @@ int rf_get_info80(RF_Raid_t *, void *);
int rf_get_component_label80(RF_Raid_t *, void *);
int rf_config80(RF_Raid_t *, int, void *, RF_Config_t **);
+int raidframe_ioctl_80(int, int, RF_Raid_t *, int, void *, RF_Config_t **);
+
+void raidframe_80_init(void);
+void raidframe_80_fini(void);
+
#endif /* _RF_COMPAT80_H_ */
Index: src/sys/dev/raidframe/rf_netbsdkintf.c
diff -u src/sys/dev/raidframe/rf_netbsdkintf.c:1.356 src/sys/dev/raidframe/rf_netbsdkintf.c:1.356.2.1
--- src/sys/dev/raidframe/rf_netbsdkintf.c:1.356 Tue Jan 23 22:42:29 2018
+++ src/sys/dev/raidframe/rf_netbsdkintf.c Sat Mar 24 01:59:15 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: rf_netbsdkintf.c,v 1.356 2018/01/23 22:42:29 pgoyette Exp $ */
+/* $NetBSD: rf_netbsdkintf.c,v 1.356.2.1 2018/03/24 01:59:15 pgoyette Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998, 2008-2011 The NetBSD Foundation, Inc.
@@ -101,7 +101,7 @@
***********************************************************/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.356 2018/01/23 22:42:29 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.356.2.1 2018/03/24 01:59:15 pgoyette Exp $");
#ifdef _KERNEL_OPT
#include "opt_compat_netbsd.h"
@@ -128,6 +128,7 @@ __KERNEL_RCSID(0, "$NetBSD: rf_netbsdkin
#include <sys/reboot.h>
#include <sys/kauth.h>
#include <sys/module.h>
+#include <sys/compat_stub.h>
#include <prop/proplib.h>
@@ -149,13 +150,9 @@ __KERNEL_RCSID(0, "$NetBSD: rf_netbsdkin
#include "rf_parityscan.h"
#include "rf_threadstuff.h"
-#ifdef COMPAT_50
#include "rf_compat50.h"
-#endif
-#ifdef COMPAT_80
#include "rf_compat80.h"
-#endif
#ifdef COMPAT_NETBSD32
#include "rf_compat32.h"
@@ -1104,16 +1101,6 @@ raidioctl(dev_t dev, u_long cmd, void *d
case RAIDFRAME_PARITYMAP_GET_DISABLE:
case RAIDFRAME_PARITYMAP_SET_DISABLE:
case RAIDFRAME_PARITYMAP_SET_PARAMS:
-#ifdef COMPAT_50
- case RAIDFRAME_GET_INFO50:
-#endif
-#ifdef COMPAT_80
- case RAIDFRAME_CHECK_RECON_STATUS_EXT80:
- case RAIDFRAME_CHECK_PARITYREWRITE_STATUS_EXT80:
- case RAIDFRAME_CHECK_COPYBACK_STATUS_EXT80:
- case RAIDFRAME_GET_INFO80:
- case RAIDFRAME_GET_COMPONENT_LABEL80:
-#endif
#ifdef COMPAT_NETBSD32
#ifdef _LP64
case RAIDFRAME_GET_INFO32:
@@ -1123,38 +1110,41 @@ raidioctl(dev_t dev, u_long cmd, void *d
return (ENXIO);
}
- switch (cmd) {
-#ifdef COMPAT_50
- case RAIDFRAME_GET_INFO50:
- return rf_get_info50(raidPtr, data);
-
- case RAIDFRAME_CONFIGURE50:
- if ((retcode = rf_config50(raidPtr, unit, data, &k_cfg)) != 0)
- return retcode;
+ /*
+ * Handle compat ioctl calls
+ *
+ * * If compat code is not loaded, stub returns ENOSYS and we just
+ * check the "native" cmd's
+ * * If compat code is loaded but does not recognize the cmd, it
+ * returns EPASSTHROUGH, and we just check the "native" cmd's
+ * * If compat code returns EAGAIN, we need to finish via config
+ * * Otherwise the cmd has been handled and we just return
+ */
+ retcode = (*raidframe50_ioctl)(cmd, (rs->sc_flags & RAIDF_INITED),
+ raidPtr, unit, data, &k_cfg);
+ if (retcode == ENOSYS)
+ retcode = EINVAL;
+ else if (retcode == EAGAIN)
goto config;
-#endif
-
-#ifdef COMPAT_80
- case RAIDFRAME_CHECK_RECON_STATUS_EXT80:
- return rf_check_recon_status_ext80(raidPtr, data);
-
- case RAIDFRAME_CHECK_PARITYREWRITE_STATUS_EXT80:
- return rf_check_parityrewrite_status_ext80(raidPtr, data);
-
- case RAIDFRAME_CHECK_COPYBACK_STATUS_EXT80:
- return rf_check_copyback_status_ext80(raidPtr, data);
-
- case RAIDFRAME_GET_INFO80:
- return rf_get_info80(raidPtr, data);
+ else if (retcode != EPASSTHROUGH)
+ return retcode;
- case RAIDFRAME_GET_COMPONENT_LABEL80:
- return rf_get_component_label80(raidPtr, data);
-
- case RAIDFRAME_CONFIGURE80:
- if ((retcode = rf_config80(raidPtr, unit, data, &k_cfg)) != 0)
- return retcode;
+ retcode = (*raidframe80_ioctl)(cmd, (rs->sc_flags & RAIDF_INITED),
+ raidPtr, unit, data, &k_cfg);
+ if (retcode == ENOSYS)
+ retcode = EINVAL;
+ else if (retcode == EAGAIN)
goto config;
-#endif
+ else if (retcode != EPASSTHROUGH)
+ return retcode;
+ /*
+ * XXX
+ * Handling of FAIL_DISK80 command requires us to retain retcode's
+ * value of EPASSTHROUGH. If you add more compat code later, make
+ * sure you don't overwrite retcode and break this!
+ */
+
+ switch (cmd) {
/* configure the system */
case RAIDFRAME_CONFIGURE:
@@ -1563,11 +1553,12 @@ raidioctl(dev_t dev, u_long cmd, void *d
return (0);
/* fail a disk & optionally start reconstruction */
- case RAIDFRAME_FAIL_DISK:
-#ifdef COMPAT_80
case RAIDFRAME_FAIL_DISK80:
-#endif
-
+ /* Check if we called compat code for this cmd */
+ if (retcode != EPASSTHROUGH)
+ return EINVAL;
+ /* FALLTHRU */
+ case RAIDFRAME_FAIL_DISK:
if (raidPtr->Layout.map->faultsTolerated == 0) {
/* Can't do this on a RAID 0!! */
return(EINVAL);
Index: src/sys/kern/compat_stub.c
diff -u src/sys/kern/compat_stub.c:1.1.2.4 src/sys/kern/compat_stub.c:1.1.2.5
--- src/sys/kern/compat_stub.c:1.1.2.4 Fri Mar 23 09:41:10 2018
+++ src/sys/kern/compat_stub.c Sat Mar 24 01:59:15 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: compat_stub.c,v 1.1.2.4 2018/03/23 09:41:10 pgoyette Exp $ */
+/* $NetBSD: compat_stub.c,v 1.1.2.5 2018/03/24 01:59:15 pgoyette Exp $ */
/*-
* Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -53,23 +53,29 @@ int (*vec_ntp_timestatus)(void) = NULL;
/*
* ccd device compatability ioctl
*/
-int (*compat_ccd_ioctl_60)(dev_t dev, u_long cmd, void *data, int flag,
- struct lwp *l, int (*f)(dev_t, u_long, void *, int, struct lwp *)) =
- (void *)enosys;
+int (*compat_ccd_ioctl_60)(dev_t, u_long, void *, int, struct lwp *,
+ int (*f)(dev_t, u_long, void *, int, struct lwp *)) = (void *)enosys;
/*
* clockctl device compatability ioctl
*/
-int (*compat_clockctl_ioctl_50)(dev_t dev, u_long cmd, void *data, int flag,
- struct lwp *l) = (void *)enosys;
+int (*compat_clockctl_ioctl_50)(dev_t, u_long, void *, int, struct lwp *) =
+ (void *)enosys;
/*
* if_sppp device compatability ioctl subroutine
*/
-int (*sppp_params50)(struct sppp *sp, u_long cmd, void *data) = (void *)enosys;
+int (*sppp_params50)(struct sppp *, u_long, void *) = (void *)enosys;
/*
* cryptodev compatability ioctl
*/
int (*ocryptof50_ioctl)(struct file *, u_long, void *) = (void *)enosys;
+/*
+ * raidframe compatability
+ */
+int (*raidframe50_ioctl)(int, int, struct RF_Raid_s *, int, void *,
+ struct RF_Config_s **) = (void *)enosys;
+int (*raidframe80_ioctl)(int, int, struct RF_Raid_s *, int, void *,
+ struct RF_Config_s **) = (void *)enosys;
Index: src/sys/modules/Makefile
diff -u src/sys/modules/Makefile:1.202.2.9 src/sys/modules/Makefile:1.202.2.10
--- src/sys/modules/Makefile:1.202.2.9 Mon Mar 19 21:54:43 2018
+++ src/sys/modules/Makefile Sat Mar 24 01:59:15 2018
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.202.2.9 2018/03/19 21:54:43 pgoyette Exp $
+# $NetBSD: Makefile,v 1.202.2.10 2018/03/24 01:59:15 pgoyette Exp $
.include <bsd.own.mk>
@@ -6,9 +6,9 @@
# Modules for compatability with earlier versions of NetBSD
-SUBDIR+= compat compat_70 compat_60 compat_50 # compat_40
-SUBDIR+= # compat_30 compat_20 compat_16 compat_14 compat_13
-SUBDIR+= # compat_12 compat_10 compat_09
+SUBDIR+= compat compat_80 compat_70 compat_60 compat_50
+#SUBDIR+= compat_40 compat_30 compat_20 compat_16 compat_14
+#SUBDIR+= compat_13 compat_12 compat_10 compat_09
SUBDIR+= compat_ossaudio
SUBDIR+= compat_sysv
Index: src/sys/modules/compat_50/Makefile
diff -u src/sys/modules/compat_50/Makefile:1.1.2.4 src/sys/modules/compat_50/Makefile:1.1.2.5
--- src/sys/modules/compat_50/Makefile:1.1.2.4 Fri Mar 23 09:41:10 2018
+++ src/sys/modules/compat_50/Makefile Sat Mar 24 01:59:16 2018
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.1.2.4 2018/03/23 09:41:10 pgoyette Exp $
+# $NetBSD: Makefile,v 1.1.2.5 2018/03/24 01:59:16 pgoyette Exp $
.include "../Makefile.inc"
@@ -18,4 +18,8 @@ SRCS+= rndpseudo_50.c clockctl_50.c if_s
SRCS+= ocryptodev.c
+.PATH: ${S}/dev/raidframe
+
+SRCS+= rf_compat50.c
+
.include <bsd.kmodule.mk>
Index: src/sys/modules/compat_80/Makefile
diff -u src/sys/modules/compat_80/Makefile:1.1.2.1 src/sys/modules/compat_80/Makefile:1.1.2.2
--- src/sys/modules/compat_80/Makefile:1.1.2.1 Wed Mar 21 10:12:49 2018
+++ src/sys/modules/compat_80/Makefile Sat Mar 24 01:59:16 2018
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.1.2.1 2018/03/21 10:12:49 pgoyette Exp $
+# $NetBSD: Makefile,v 1.1.2.2 2018/03/24 01:59:16 pgoyette Exp $
.include "../Makefile.inc"
@@ -8,6 +8,10 @@ KMOD= compat_80
CPPFLAGS+= -DCOMPAT_80
-SRCS+= compat_80_mod.c raidframe80.c
+SRCS+= compat_80_mod.c
+
+.PATH: ${S}/dev/raidframe
+
+SRCS+= rf_compat80.c
.include <bsd.kmodule.mk>
Index: src/sys/sys/compat_stub.h
diff -u src/sys/sys/compat_stub.h:1.1.2.4 src/sys/sys/compat_stub.h:1.1.2.5
--- src/sys/sys/compat_stub.h:1.1.2.4 Fri Mar 23 09:41:10 2018
+++ src/sys/sys/compat_stub.h Sat Mar 24 01:59:16 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: compat_stub.h,v 1.1.2.4 2018/03/23 09:41:10 pgoyette Exp $ */
+/* $NetBSD: compat_stub.h,v 1.1.2.5 2018/03/24 01:59:16 pgoyette Exp $ */
/*-
* Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -65,7 +65,19 @@ extern int (*sppp_params50)(struct sppp
/*
* cryptodev compatability ioctl
*/
-extern
-int (*ocryptof50_ioctl)(struct file *, u_long, void *);
+extern int (*ocryptof50_ioctl)(struct file *, u_long, void *);
+
+/*
+ * raidframe compatability
+ */
+
+struct RF_Raid_s;
+struct RF_Config_s;
+struct raid_softc;
+
+extern int (*raidframe50_ioctl)(int, int, struct RF_Raid_s *, int, void *,
+ struct RF_Config_s **);
+extern int (*raidframe80_ioctl)(int, int, struct RF_Raid_s *, int, void *,
+ struct RF_Config_s **);
#endif /* _SYS_COMPAT_STUB_H */