summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_tc.c
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>1995-11-08 08:48:36 +0000
committerphk <phk@FreeBSD.org>1995-11-08 08:48:36 +0000
commited1a50b4d7111b218b8582948fe23aa8318f68da (patch)
tree78213fe76ac78089384eab57a1fb507e8fb15619 /sys/kern/kern_tc.c
parent022ad6e83389fbbb373702949e7b57ca5029e1ac (diff)
downloadFreeBSD-src-ed1a50b4d7111b218b8582948fe23aa8318f68da.zip
FreeBSD-src-ed1a50b4d7111b218b8582948fe23aa8318f68da.tar.gz
Fix some of the sysctl broke, and add a lot more to it.
Diffstat (limited to 'sys/kern/kern_tc.c')
-rw-r--r--sys/kern/kern_tc.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/sys/kern/kern_tc.c b/sys/kern/kern_tc.c
index 1b617fa..1773287 100644
--- a/sys/kern/kern_tc.c
+++ b/sys/kern/kern_tc.c
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)kern_clock.c 8.5 (Berkeley) 1/21/94
- * $Id: kern_clock.c,v 1.16 1995/09/09 18:10:01 davidg Exp $
+ * $Id: kern_clock.c,v 1.17 1995/10/12 20:35:01 wollman Exp $
*/
/* Portions of this software are covered by the following: */
@@ -975,13 +975,10 @@ statclock(frame)
/*
* Return information about system clocks.
*/
-int
-sysctl_clockrate(where, sizep)
- register char *where;
- size_t *sizep;
+static int
+sysctl_kern_clockrate SYSCTL_HANDLER_ARGS
{
struct clockinfo clkinfo;
-
/*
* Construct clockinfo structure.
*/
@@ -989,9 +986,13 @@ sysctl_clockrate(where, sizep)
clkinfo.tick = tick;
clkinfo.profhz = profhz;
clkinfo.stathz = stathz ? stathz : hz;
- return (sysctl_rdstruct(where, sizep, NULL, &clkinfo, sizeof(clkinfo)));
+ return (sysctl_handle_opaque(
+ oidp, &clkinfo, sizeof clkinfo, oldp, oldlenp, newp, newlen));
}
+SYSCTL_OID(_kern, KERN_CLOCKRATE, clockrate,
+ CTLTYPE_STRUCT|CTLFLAG_RD, 0, 0, sysctl_kern_clockrate, "");
+
/*#ifdef PPS_SYNC*/
#if 0
/* This code is completely bogus; if anybody ever wants to use it, get
OpenPOWER on IntegriCloud