Source-Changes-HG archive

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

[src/trunk]: src/sys/compat/common Remove explicit calls to the sysctl setup ...



details:   https://anonhg.NetBSD.org/src/rev/6059767200d9
branches:  trunk
changeset: 745282:6059767200d9
user:      pgoyette <pgoyette%NetBSD.org@localhost>
date:      Thu Feb 27 16:41:59 2020 +0000

description:
Remove explicit calls to the sysctl setup routines, since this is now
handled by the module infrastructure.

diffstat:

 sys/compat/common/compat_sysctl_09_43.c |  12 ++++--------
 sys/compat/common/kern_time_50.c        |  15 +++------------
 2 files changed, 7 insertions(+), 20 deletions(-)

diffs (108 lines):

diff -r 311753647394 -r 6059767200d9 sys/compat/common/compat_sysctl_09_43.c
--- a/sys/compat/common/compat_sysctl_09_43.c   Thu Feb 27 16:35:39 2020 +0000
+++ b/sys/compat/common/compat_sysctl_09_43.c   Thu Feb 27 16:41:59 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: compat_sysctl_09_43.c,v 1.3 2019/12/06 08:35:21 maxv Exp $     */
+/*     $NetBSD: compat_sysctl_09_43.c,v 1.4 2020/02/27 16:41:59 pgoyette Exp $ */
 
 /*
  * Copyright (c) 1989, 1993
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: compat_sysctl_09_43.c,v 1.3 2019/12/06 08:35:21 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: compat_sysctl_09_43.c,v 1.4 2020/02/27 16:41:59 pgoyette Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_compat_netbsd.h"
@@ -101,8 +101,7 @@
 /*
  * Top level filesystem related information gathering.
  */
-static int
-compat_sysctl_vfs(struct sysctllog **clog)
+SYSCTL_SETUP(compat_sysctl_vfs, "Top-level filesystem info")
 {
        int error;
 
@@ -129,20 +128,17 @@
 }
 #endif
 
-static struct sysctllog *compat_09_43_clog = NULL;
-
 int
 compat_sysctl_09_43_init(void)
 {
 
-       return compat_sysctl_vfs(&compat_09_43_clog);
+       return 0;
 }
 
 int
 compat_sysctl_09_43_fini(void)
 {
 
-       sysctl_teardown(&compat_09_43_clog);
        return 0;
 }
 
diff -r 311753647394 -r 6059767200d9 sys/compat/common/kern_time_50.c
--- a/sys/compat/common/kern_time_50.c  Thu Feb 27 16:35:39 2020 +0000
+++ b/sys/compat/common/kern_time_50.c  Thu Feb 27 16:41:59 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kern_time_50.c,v 1.34 2020/01/02 15:42:26 thorpej Exp $        */
+/*     $NetBSD: kern_time_50.c,v 1.35 2020/02/27 16:41:59 pgoyette Exp $       */
 
 /*-
  * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_time_50.c,v 1.34 2020/01/02 15:42:26 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_time_50.c,v 1.35 2020/02/27 16:41:59 pgoyette Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
@@ -73,8 +73,6 @@
 
 struct timeval50 boottime50; 
 
-static struct sysctllog *kern_time_50_clog = NULL;
-
 static const struct syscall_package kern_time_50_syscalls[] = {
        { SYS_compat_50_clock_gettime, 0,
            (sy_call_t *)compat_50_sys_clock_gettime },  
@@ -580,8 +578,7 @@
        return 0;
 }
 
-static void
-compat_sysctl_time(struct sysctllog **clog)
+SYSCTL_SETUP(compat_sysctl_time, "Old system boottime")
 {
        struct timeval tv;
 
@@ -601,11 +598,7 @@
 {               
        int error;
 
-       compat_sysctl_time(&kern_time_50_clog);
-
        error = syscall_establish(NULL, kern_time_50_syscalls);
-       if (error != 0)
-               sysctl_teardown(&kern_time_50_clog);
 
        return error;
 }       
@@ -616,8 +609,6 @@
        int error;
 
        error = syscall_disestablish(NULL, kern_time_50_syscalls);
-       if (error == 0)
-               sysctl_teardown(&kern_time_50_clog);
 
        return error;
 } 



Home | Main Index | Thread Index | Old Index