diff options
author | Poul-Henning Kamp <phk@FreeBSD.org> | 1995-11-14 09:07:14 +0000 |
---|---|---|
committer | Poul-Henning Kamp <phk@FreeBSD.org> | 1995-11-14 09:07:14 +0000 |
commit | a52752a4572e872c703d21e13309cfdcf7973e93 (patch) | |
tree | ce0b66d1d36a04494fa9c76ac2faa01829d02c8a /sys/kern/kern_ntptime.c | |
parent | 45a4ad1146ef0a5f76222f709dd2103f713c1e0b (diff) | |
download | src-a52752a4572e872c703d21e13309cfdcf7973e93.tar.gz src-a52752a4572e872c703d21e13309cfdcf7973e93.zip |
Move KERN_NTP to a more suitable file.
Notes
Notes:
svn path=/head/; revision=12279
Diffstat (limited to 'sys/kern/kern_ntptime.c')
-rw-r--r-- | sys/kern/kern_ntptime.c | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/sys/kern/kern_ntptime.c b/sys/kern/kern_ntptime.c index 421200a37312..8a2e0063b390 100644 --- a/sys/kern/kern_ntptime.c +++ b/sys/kern/kern_ntptime.c @@ -81,23 +81,13 @@ extern long pps_errcnt; /* calibration errors */ extern long pps_stbcnt; /* stability limit exceeded */ #endif /* PPS_SYNC */ -int -ntp_sysctl(int *name, u_int namelen, void *oldp, size_t *oldlenp, - void *newp, size_t newlen, struct proc *p) +static int +ntp_sysctl SYSCTL_HANDLER_ARGS { struct timeval atv; struct ntptimeval ntv; int s; - /* All names at this level are terminal. */ - if (namelen != 1) { - return ENOTDIR; - } - - if (name[0] != NTP_PLL_GETTIME) { - return EOPNOTSUPP; - } - s = splclock(); #ifdef EXT_CLOCK /* @@ -163,9 +153,14 @@ ntp_sysctl(int *name, u_int namelen, void *oldp, size_t *oldlenp, time_status & (STA_PPSWANDER | STA_PPSERROR)) { ntv.time_state = TIME_ERROR; } - return(sysctl_rdstruct(oldp, oldlenp, newp, &ntv, sizeof ntv)); + return (sysctl_handle_opaque(oidp, &ntv, sizeof ntv, req)); } +SYSCTL_NODE(_kern, KERN_NTP_PLL, ntp_pll, CTLFLAG_RW, 0, + "NTP kernel PLL related stuff"); +SYSCTL_PROC(_kern_ntp_pll, NTP_PLL_GETTIME, gettime, CTLTYPE_OPAQUE|CTLFLAG_RD, + 0, sizeof(struct ntptimeval) , ntp_sysctl, ""); + /* * ntp_adjtime() - NTP daemon application interface */ |