Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/pgoyette-compat]: src/sys/compat/common Add a compat_80 module - we need...



details:   https://anonhg.NetBSD.org/src/rev/5ef68075cc1f
branches:  pgoyette-compat
changeset: 321076:5ef68075cc1f
user:      pgoyette <pgoyette%NetBSD.org@localhost>
date:      Wed Mar 21 10:01:04 2018 +0000

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

Update other modules to add compat_80 to the required lists.

diffstat:

 sys/compat/common/compat_50_mod.c |  16 ++++--
 sys/compat/common/compat_60_mod.c |  10 ++--
 sys/compat/common/compat_70_mod.c |  11 ++--
 sys/compat/common/compat_80_mod.c |  95 +++++++++++++++++++++++++++++++++++++++
 4 files changed, 116 insertions(+), 16 deletions(-)

diffs (242 lines):

diff -r 5343d4667f59 -r 5ef68075cc1f sys/compat/common/compat_50_mod.c
--- a/sys/compat/common/compat_50_mod.c Wed Mar 21 04:48:31 2018 +0000
+++ b/sys/compat/common/compat_50_mod.c Wed Mar 21 10:01:04 2018 +0000
@@ -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 @@
 
 #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 @@
        uvm_50_init();
        if_50_init();
        clockctl_50_init();
+       if_spppsubr_50_init();
 
        return error;
 
@@ -97,6 +99,7 @@
 {
        int error = 0;
 
+       if_spppsubr_50_fini();
        clockctl_50_fini();
        if_50_fini();
        uvm_50_fini();
@@ -130,15 +133,16 @@
        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)
diff -r 5343d4667f59 -r 5ef68075cc1f sys/compat/common/compat_60_mod.c
--- a/sys/compat/common/compat_60_mod.c Wed Mar 21 04:48:31 2018 +0000
+++ b/sys/compat/common/compat_60_mod.c Wed Mar 21 10:01:04 2018 +0000
@@ -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 @@
 
 #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
diff -r 5343d4667f59 -r 5ef68075cc1f sys/compat/common/compat_70_mod.c
--- a/sys/compat/common/compat_70_mod.c Wed Mar 21 04:48:31 2018 +0000
+++ b/sys/compat/common/compat_70_mod.c Wed Mar 21 10:01:04 2018 +0000
@@ -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 @@
 
 #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)
diff -r 5343d4667f59 -r 5ef68075cc1f sys/compat/common/compat_80_mod.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/compat/common/compat_80_mod.c Wed Mar 21 10:01:04 2018 +0000
@@ -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 */



Home | Main Index | Thread Index | Old Index