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 <sys/cdefs.h>
-__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 <compat/common/compat_util.h>
#include <compat/common/compat_mod.h>
+#include <compat/common/if_spppsubr50.h>
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 <sys/cdefs.h>
-__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 binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: compat_70_mod.c,v 1.1.2.5 2018/03/17 00:44:38 pgoyette Exp $");
+__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"
@@ -74,7 +74,8 @@ int compat_70_fini(void)
#ifdef _MODULE
-MODULE(MODULE_CLASS_EXEC, compat_70, NULL); /* XXX No compat_80 yet */
+#define REQD_70 "compat_80"
+MODULE(MODULE_CLASS_EXEC, compat_70, REQD_70);
static int
compat_70_modcmd(modcmd_t cmd, void *arg)
Added files:
Index: src/sys/compat/common/compat_80_mod.c
diff -u /dev/null src/sys/compat/common/compat_80_mod.c:1.1.2.1
--- /dev/null Wed Mar 21 10:01:04 2018
+++ src/sys/compat/common/compat_80_mod.c Wed Mar 21 10:01:04 2018
@@ -0,0 +1,95 @@
+/* $NetBSD: compat_80_mod.c,v 1.1.2.1 2018/03/21 10:01:04 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 <sys/cdefs.h>
+__KERNEL_RCSID(0, "$NetBSD: compat_80_mod.c,v 1.1.2.1 2018/03/21 10:01:04 pgoyette Exp $");
+
+#ifdef _KERNEL_OPT
+#include "opt_compat_netbsd.h"
+#include "opt_compat_43.h"
+#endif
+
+#include <sys/systm.h>
+#include <sys/module.h>
+
+#include <net/if.h>
+#include <net/route.h>
+
+#include <compat/common/compat_util.h>
+#include <compat/common/compat_mod.h>
+#include <compat/sys/sockio.h>
+
+#include <compat/net/route.h>
+#include <compat/net/route_70.h>
+
+int compat_70_init(void)
+{
+
+ vec_ocreds_valid = true;
+ rtsock_70_init();
+
+ return 0;
+}
+
+int compat_70_fini(void)
+{
+
+ rtsock_70_fini();
+ vec_ocreds_valid = false;
+
+ return 0;
+}
+
+#ifdef _MODULE
+
+#define REQD_80 NULL
+MODULE(MODULE_CLASS_EXEC, compat_80, REQD_80);
+
+static int
+compat_70_modcmd(modcmd_t cmd, void *arg)
+{
+
+ switch (cmd) {
+ case MODULE_CMD_INIT:
+ return compat_70_init();
+
+ case MODULE_CMD_FINI:
+ return compat_70_fini();
+
+ default:
+ return ENOTTY;
+ }
+}
+#endif /* _MODULE */