Download raw body.
sysctl(2): unlock KERN_CLOCKRATE
On Mon, Aug 05, 2024 at 11:40:59PM +0300, Vitaliy Makkoveev wrote:
> Read-only access to local `clkinfo' filled with immutable `tick', `hz',
> `profhz' and `stathz'.
OK bluhm@
> Index: sys/kern/kern_sysctl.c
> ===================================================================
> RCS file: /cvs/src/sys/kern/kern_sysctl.c,v
> diff -u -p -r1.433 kern_sysctl.c
> --- sys/kern/kern_sysctl.c 5 Aug 2024 18:47:29 -0000 1.433
> +++ sys/kern/kern_sysctl.c 5 Aug 2024 20:34:53 -0000
> @@ -507,6 +507,8 @@ kern_sysctl(int *name, u_int namelen, vo
> return (sysctl_rdstring(oldp, oldlenp, newp, version));
> case KERN_NUMVNODES: /* XXX numvnodes is a long */
> return (sysctl_rdint(oldp, oldlenp, newp, numvnodes));
> + case KERN_CLOCKRATE:
> + return (sysctl_clockrate(oldp, oldlenp, newp));
> case KERN_BOOTTIME: {
> struct timeval bt;
> memset(&bt, 0, sizeof bt);
> @@ -614,8 +616,6 @@ kern_sysctl_locked(int *name, u_int name
> error = sysctl_int(oldp, oldlenp, newp, newlen, &inthostid);
> hostid = inthostid;
> return (error);
> - case KERN_CLOCKRATE:
> - return (sysctl_clockrate(oldp, oldlenp, newp));
> case KERN_MSGBUFSIZE:
> case KERN_CONSBUFSIZE: {
> struct msgbuf *mp;
sysctl(2): unlock KERN_CLOCKRATE