Source-Changes-HG archive

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

[src/trunk]: src/sys/opencrypto initialize sysctl in the same way regardless ...



details:   https://anonhg.NetBSD.org/src/rev/80387f3b0b36
branches:  trunk
changeset: 824107:80387f3b0b36
user:      knakahara <knakahara%NetBSD.org@localhost>
date:      Wed May 24 05:11:29 2017 +0000

description:
initialize sysctl in the same way regardless of module or not.

diffstat:

 sys/opencrypto/crypto.c |  14 +++++---------
 1 files changed, 5 insertions(+), 9 deletions(-)

diffs (60 lines):

diff -r e598c981be81 -r 80387f3b0b36 sys/opencrypto/crypto.c
--- a/sys/opencrypto/crypto.c   Tue May 23 22:18:17 2017 +0000
+++ b/sys/opencrypto/crypto.c   Wed May 24 05:11:29 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: crypto.c,v 1.71 2017/05/17 12:11:41 knakahara Exp $ */
+/*     $NetBSD: crypto.c,v 1.72 2017/05/24 05:11:29 knakahara Exp $ */
 /*     $FreeBSD: src/sys/opencrypto/crypto.c,v 1.4.2.5 2003/02/26 00:14:05 sam Exp $   */
 /*     $OpenBSD: crypto.c,v 1.41 2002/07/17 23:52:38 art Exp $ */
 
@@ -53,7 +53,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: crypto.c,v 1.71 2017/05/17 12:11:41 knakahara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: crypto.c,v 1.72 2017/05/24 05:11:29 knakahara Exp $");
 
 #include <sys/param.h>
 #include <sys/reboot.h>
@@ -149,7 +149,8 @@
  */
 int    crypto_devallowsoft = 1;        /* only use hardware crypto */
 
-SYSCTL_SETUP(sysctl_opencrypto_setup, "sysctl opencrypto subtree setup")
+static void
+sysctl_opencrypto_setup(struct sysctllog **clog)
 {
 
        sysctl_createv(clog, 0, NULL, NULL,
@@ -212,9 +213,7 @@
 static int crypto_timing = 0;
 #endif
 
-#ifdef _MODULE
 static struct sysctllog *sysctl_opencrypto_clog;
-#endif
 
 static int
 crypto_init0(void)
@@ -249,9 +248,8 @@
                return crypto_destroy(false);
        }
 
-#ifdef _MODULE
        sysctl_opencrypto_setup(&sysctl_opencrypto_clog);
-#endif
+
        return 0;
 }
 
@@ -294,10 +292,8 @@
                mutex_spin_exit(&crypto_ret_q_mtx);
        }
 
-#ifdef _MODULE
        if (sysctl_opencrypto_clog != NULL)
                sysctl_teardown(&sysctl_opencrypto_clog);
-#endif
 
        unregister_swi(SWI_CRYPTO, cryptointr);
 



Home | Main Index | Thread Index | Old Index