Source-Changes-HG archive

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

[src/trunk]: src/sys/net Actually commit the changes for making this into a l...



details:   https://anonhg.NetBSD.org/src/rev/b0c039a37510
branches:  trunk
changeset: 816996:b0c039a37510
user:      pgoyette <pgoyette%NetBSD.org@localhost>
date:      Fri Aug 05 08:56:36 2016 +0000

description:
Actually commit the changes for making this into a loadable module.  The
module infrastructure was committed earlier, but the "guts" of the commit
were somehow missed.

diffstat:

 sys/net/slcompress.c |  23 +++++++++++++++++++++--
 1 files changed, 21 insertions(+), 2 deletions(-)

diffs (48 lines):

diff -r 6404cc0a4a83 -r b0c039a37510 sys/net/slcompress.c
--- a/sys/net/slcompress.c      Fri Aug 05 08:55:28 2016 +0000
+++ b/sys/net/slcompress.c      Fri Aug 05 08:56:36 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: slcompress.c,v 1.39 2015/08/24 22:21:26 pooka Exp $   */
+/*     $NetBSD: slcompress.c,v 1.40 2016/08/05 08:56:36 pgoyette Exp $   */
 /*     Id: slcompress.c,v 1.3 1996/05/24 07:04:47 paulus Exp   */
 
 /*
@@ -41,7 +41,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: slcompress.c,v 1.39 2015/08/24 22:21:26 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: slcompress.c,v 1.40 2016/08/05 08:56:36 pgoyette Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -51,6 +51,7 @@
 #include <sys/param.h>
 #include <sys/mbuf.h>
 #include <sys/systm.h>
+#include <sys/module.h>
 
 #include <netinet/in.h>
 #include <netinet/in_systm.h>
@@ -617,3 +618,21 @@
        return (-1);
 }
 #endif
+
+MODULE(MODULE_CLASS_MISC, slcompress, NULL);
+
+static int
+slcompress_modcmd(modcmd_t cmd, void *arg)
+{
+       switch (cmd) {
+       case MODULE_CMD_INIT:
+       case MODULE_CMD_FINI:
+#ifdef INET
+               return 0;
+#endif
+       case MODULE_CMD_STAT:
+       case MODULE_CMD_AUTOUNLOAD:
+       default:
+               return ENOTTY;
+       }
+}



Home | Main Index | Thread Index | Old Index