Module Name:    src
Committed By:   pgoyette
Date:           Fri Nov 18 22:41:19 UTC 2016

Modified Files:
        src/sys/fs/nfs: files.newnfs
Added Files:
        src/sys/fs/nfs/client: nfs_clmodule.c
        src/sys/fs/nfs/common: nfs_module.c
        src/sys/fs/nfs/server: nfs_nfsdmodule.c

Log Message:
Add the initial module(9) infrastructure


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/fs/nfs/files.newnfs
cvs rdiff -u -r0 -r1.1 src/sys/fs/nfs/client/nfs_clmodule.c
cvs rdiff -u -r0 -r1.1 src/sys/fs/nfs/common/nfs_module.c
cvs rdiff -u -r0 -r1.1 src/sys/fs/nfs/server/nfs_nfsdmodule.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/fs/nfs/files.newnfs
diff -u src/sys/fs/nfs/files.newnfs:1.5 src/sys/fs/nfs/files.newnfs:1.6
--- src/sys/fs/nfs/files.newnfs:1.5	Fri Nov 18 09:58:38 2016
+++ src/sys/fs/nfs/files.newnfs	Fri Nov 18 22:41:18 2016
@@ -1,4 +1,4 @@
-#	$NetBSD: files.newnfs,v 1.5 2016/11/18 09:58:38 pgoyette Exp $
+#	$NetBSD: files.newnfs,v 1.6 2016/11/18 22:41:18 pgoyette Exp $
 
 deffs NEW_NFSCLIENT
 defflag opt_newnfs.h			DTRACEALL
@@ -10,6 +10,7 @@ defflag opt_newnfs.h			DTRACEALL
 
 # XXX
 define	new_nfsclient: vfs, net
+file	fs/nfs/client/nfs_clmodule.c	 new_nfsclient
 file	fs/nfs/client/nfs_clbio.c	 new_nfsclient
 file	fs/nfs/client/nfs_clcomsubs.c	 new_nfsclient
 file	fs/nfs/client/nfs_clkdtrace.c	 new_nfsclient & (dtnfscl | dtraceall)
@@ -24,6 +25,7 @@ file	fs/nfs/client/nfs_clvfsops.c	 new_n
 file	fs/nfs/client/nfs_clvnops.c	 new_nfsclient
 file	fs/nfs/common/bootp_subr.c	 new_nfs_boot_bootp & new_nfsclient
 file	fs/nfs/common/krpc_subr.c	 new_nfs_boot_bootp & new_nfsclient
+file	fs/nfs/common/nfs_module.c	 new_nfsclient | new_nfsserver
 file	fs/nfs/common/nfs_commonacl.c	 new_nfsclient | new_nfsserver
 file	fs/nfs/common/nfs_commonkrpc.c	 new_nfsclient | new_nfsserver
 file	fs/nfs/common/nfs_commonport.c	 new_nfsclient | new_nfsserver
@@ -39,6 +41,7 @@ file	fs/nfs/nlm/nlm_prot_server.c	 new_n
 file	fs/nfs/nlm/nlm_prot_svc.c	 new_nfslockd | new_nfsserver
 file	fs/nfs/nlm/nlm_prot_xdr.c	 new_nfslockd | new_nfsserver
 file	fs/nfs/nlm/sm_inter_xdr.c	 new_nfslockd | new_nfsserver
+file	fs/nfs/server/nfs_nfsdmodule.c	 new_nfsserver
 file	fs/nfs/server/nfs_fha_new.c	 new_nfsserver
 file	fs/nfs/server/nfs_nfsdcache.c	 new_nfsserver
 file	fs/nfs/server/nfs_nfsdkrpc.c	 new_nfsserver

Added files:

Index: src/sys/fs/nfs/client/nfs_clmodule.c
diff -u /dev/null src/sys/fs/nfs/client/nfs_clmodule.c:1.1
--- /dev/null	Fri Nov 18 22:41:19 2016
+++ src/sys/fs/nfs/client/nfs_clmodule.c	Fri Nov 18 22:41:19 2016
@@ -0,0 +1,48 @@
+/* $NetBSD: nfs_clmodule.c,v 1.1 2016/11/18 22:41:19 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.
+ */
+
+#include <sys/module.h>
+#include <sys/param.h>
+
+MODULE(MODULE_CLASS_MISC, nfs_client, "nfs_common,sysmon_taskq");
+
+static int
+nfs_client_modcmd(modcmd_t cmd, void *opaque)
+{
+
+	switch (cmd) {
+	case MODULE_CMD_INIT:
+	case MODULE_CMD_FINI:
+		return 0;
+	default:
+		return ENOTTY;
+	}
+}

Index: src/sys/fs/nfs/common/nfs_module.c
diff -u /dev/null src/sys/fs/nfs/common/nfs_module.c:1.1
--- /dev/null	Fri Nov 18 22:41:19 2016
+++ src/sys/fs/nfs/common/nfs_module.c	Fri Nov 18 22:41:19 2016
@@ -0,0 +1,48 @@
+/* $NetBSD: nfs_module.c,v 1.1 2016/11/18 22:41:19 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.
+ */
+
+#include <sys/module.h>
+#include <sys/param.h>
+
+MODULE(MODULE_CLASS_MISC, nfs_common, NULL);
+
+static int
+nfs_common_modcmd(modcmd_t cmd, void *opaque)
+{
+
+	switch (cmd) {
+	case MODULE_CMD_INIT:
+	case MODULE_CMD_FINI:
+		return 0;
+	default:
+		return ENOTTY;
+	}
+}

Index: src/sys/fs/nfs/server/nfs_nfsdmodule.c
diff -u /dev/null src/sys/fs/nfs/server/nfs_nfsdmodule.c:1.1
--- /dev/null	Fri Nov 18 22:41:19 2016
+++ src/sys/fs/nfs/server/nfs_nfsdmodule.c	Fri Nov 18 22:41:19 2016
@@ -0,0 +1,48 @@
+/* $NetBSD: nfs_nfsdmodule.c,v 1.1 2016/11/18 22:41:19 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.
+ */
+
+#include <sys/module.h>
+#include <sys/param.h>
+
+MODULE(MODULE_CLASS_MISC, nfs_server, "nfs_common");
+
+static int
+nfs_server_modcmd(modcmd_t cmd, void *opaque)
+{
+
+	switch (cmd) {
+	case MODULE_CMD_INIT:
+	case MODULE_CMD_FINI:
+		return 0;
+	default:
+		return ENOTTY;
+	}
+}

Reply via email to