On Thu, Aug 22, 2024 at 08:55:59PM -0400, José Maldonado wrote:
> El jue, 22 ago 2024 a la(s) 8:26 p.m., Renato Aguiar
> (ren...@renatoaguiar.net) escribió:
> >
> >
> > On recent snapshots, 'sysctl kern.audio.record' is broken:
> >
> >     $ sysctl kern.audio.record
> >     sysctl: kern.audio.record: specification is incomplete
> >
> >
> > It works for me again after reverting this commit:
> >
> > https://github.com/openbsd/src/commit/19686eace8335789f669ab42af1dd151660ec9a8
> >
> >     commit 19686eace8335789f669ab42af1dd151660ec9a8
> >     Author: mvs <m...@openbsd.org>
> >     Date:   Tue Aug 20 07:44:36 2024 +0000
> >
> >         Unlock sysctl_audio().
> >
> >         It is the only KERN_AUDIO_RECORD. `audio_record_enable' is 
> > atomically
> >         accessed integer.
> >
> >         Reasonable from deraadt
> >
> >
> > --
> > Renato Aguiar
> >
> 
> I confirm the bug on  GENERIC.MP#270 amd64 kernel.
>

Sorry. This diff should fix the problem.

Index: sys/kern/kern_sysctl.c
===================================================================
RCS file: /cvs/src/sys/kern/kern_sysctl.c,v
retrieving revision 1.443
diff -u -p -r1.443 kern_sysctl.c
--- sys/kern/kern_sysctl.c      22 Aug 2024 10:08:25 -0000      1.443
+++ sys/kern/kern_sysctl.c      23 Aug 2024 01:14:57 -0000
@@ -487,7 +487,7 @@ kern_sysctl(int *name, u_int namelen, vo
                switch (name[0]) {
 #if NAUDIO > 0
                case KERN_AUDIO:
-                       return (sysctl_audio(name, namelen, oldp, oldlenp,
+                       return (sysctl_audio(name + 1, namelen - 1, oldp, 
oldlenp,
                            newp, newlen));
 #endif
                default:

Reply via email to