Source-Changes-HG archive

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

[src/pgoyette-compat]: src/sys Initial set-up for compat_60 module



details:   https://anonhg.NetBSD.org/src/rev/0748ed01e310
branches:  pgoyette-compat
changeset: 321038:0748ed01e310
user:      pgoyette <pgoyette%NetBSD.org@localhost>
date:      Thu Mar 15 23:23:35 2018 +0000

description:
Initial set-up for compat_60 module

diffstat:

 sys/compat/common/compat_60_mod.c |  71 +++++++++++++++++++++++++++++++++++++++
 sys/modules/Makefile              |  20 ++++++----
 sys/modules/compat_60/Makefile    |  13 +++++++
 3 files changed, 96 insertions(+), 8 deletions(-)

diffs (131 lines):

diff -r 8f1ad73143ee -r 0748ed01e310 sys/compat/common/compat_60_mod.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/compat/common/compat_60_mod.c Thu Mar 15 23:23:35 2018 +0000
@@ -0,0 +1,71 @@
+/*     $NetBSD: compat_60_mod.c,v 1.1.2.1 2018/03/15 23:23:36 pgoyette Exp $   */
+
+/*-
+ * Copyright (c) 2008 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software developed for The NetBSD Foundation
+ * by Andrew Doran.
+ *
+ * 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_60_mod.c,v 1.1.2.1 2018/03/15 23:23:36 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 <sys/sysctl.h>
+
+#include <net/if.h>
+#include <net/route.h>
+
+#include <compat/common/compat_util.h>
+#include <compat/common/compat_mod.h>
+
+#define REQUIRED_60 "compat_70"                /* XXX No compat_80 yet */
+MODULE(MODULE_CLASS_EXEC, compat_60, REQUIRED_60);
+
+static int
+compat_60_modcmd(modcmd_t cmd, void *arg)
+{
+
+       switch (cmd) {
+       case MODULE_CMD_INIT:
+               return 0;
+
+       case MODULE_CMD_FINI:
+               return 0;
+
+       default:
+               return ENOTTY;
+       }
+}
diff -r 8f1ad73143ee -r 0748ed01e310 sys/modules/Makefile
--- a/sys/modules/Makefile      Thu Mar 15 23:14:21 2018 +0000
+++ b/sys/modules/Makefile      Thu Mar 15 23:23:35 2018 +0000
@@ -1,9 +1,20 @@
-#      $NetBSD: Makefile,v 1.202.2.3 2018/03/15 05:10:05 pgoyette Exp $
+#      $NetBSD: Makefile,v 1.202.2.4 2018/03/15 23:23:35 pgoyette Exp $
 
 .include <bsd.own.mk>
 
 # For all platforms
 
+# Modules for compatability with earlier versions of NetBSD
+
+SUBDIR+=       compat    compat_70 compat_60
+.ifdef NOTYET
+SUBDIR+=       compat_50 compat_40 compat_30 compat_20 compat_16
+SUBDIR+=       compat_14 compat_13 compat_12 compat_10 compat_09
+.endif
+SUBDIR+=       compat_ossaudio
+SUBDIR+=       compat_sysv
+
+
 SUBDIR=                accf_dataready
 SUBDIR+=       accf_httpready
 SUBDIR+=       adosfs
@@ -27,13 +38,6 @@
 SUBDIR+=       crypto
 SUBDIR+=       coda
 SUBDIR+=       coda5
-SUBDIR+=       compat    compat_70
-#ifdef NOTYET
-SUBDIR+=       compat_60 compat_50 compat_40 compat_30 compat_20 compat_16
-SUBDIR+=       compat_14 compat_13 compat_12 compat_10 compat_09
-#endif
-SUBDIR+=       compat_ossaudio
-SUBDIR+=       compat_sysv
 SUBDIR+=       coredump
 SUBDIR+=       dbcool
 SUBDIR+=       des
diff -r 8f1ad73143ee -r 0748ed01e310 sys/modules/compat_60/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/modules/compat_60/Makefile    Thu Mar 15 23:23:35 2018 +0000
@@ -0,0 +1,13 @@
+#      $NetBSD: Makefile,v 1.1.2.1 2018/03/15 23:23:36 pgoyette Exp $
+
+.include "../Makefile.inc"
+
+.PATH: ${S}/compat/common
+
+KMOD=  compat_60
+
+CPPFLAGS+=     -D COMPAT_60 -DCOMPAT_70 -DCOMPAT_80
+
+SRCS+= kern_sa_60.c tty_60.c kern_time_60.c
+
+.include <bsd.kmodule.mk>



Home | Main Index | Thread Index | Old Index