diff options
| author | 2009-01-21 21:02:39 +0000 | |
|---|---|---|
| committer | 2009-01-21 21:02:39 +0000 | |
| commit | 2d7560137bda0599600a3c58bf72f206f26d620c (patch) | |
| tree | 567de01c8b43f6e8e4c1aada08c26515ba9567d2 /sys/kern/kern_clock.c | |
| parent | timer_nextduein returned crap. fix it. so obvious... how could that happen. (diff) | |
| download | wireguard-openbsd-2d7560137bda0599600a3c58bf72f206f26d620c.tar.xz wireguard-openbsd-2d7560137bda0599600a3c58bf72f206f26d620c.zip | |
Pass the new pointer to sysctl_clockrate(), so that trying to change the
value of kern.clockrate with sysctl(3) correctly sets errno on failure.
PR #6040, ok tedu@
Diffstat (limited to 'sys/kern/kern_clock.c')
| -rw-r--r-- | sys/kern/kern_clock.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/kern/kern_clock.c b/sys/kern/kern_clock.c index 718cdb9d6e9..7e8f0dd3b9c 100644 --- a/sys/kern/kern_clock.c +++ b/sys/kern/kern_clock.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_clock.c,v 1.67 2008/10/04 15:21:59 deraadt Exp $ */ +/* $OpenBSD: kern_clock.c,v 1.68 2009/01/21 21:02:39 miod Exp $ */ /* $NetBSD: kern_clock.c,v 1.34 1996/06/09 04:51:03 briggs Exp $ */ /*- @@ -577,7 +577,7 @@ statclock(struct clockframe *frame) * Return information about system clocks. */ int -sysctl_clockrate(char *where, size_t *sizep) +sysctl_clockrate(char *where, size_t *sizep, void *newp) { struct clockinfo clkinfo; @@ -589,7 +589,7 @@ sysctl_clockrate(char *where, size_t *sizep) clkinfo.hz = hz; clkinfo.profhz = profhz; clkinfo.stathz = stathz ? stathz : hz; - return (sysctl_rdstruct(where, sizep, NULL, &clkinfo, sizeof(clkinfo))); + return (sysctl_rdstruct(where, sizep, newp, &clkinfo, sizeof(clkinfo))); } #ifndef __HAVE_TIMECOUNTER |
