CVSROOT:        /cvs
Module name:    src
Changes by:     ratc...@cvs.openbsd.org 2021/03/03 03:00:27

Modified files:
        usr.bin/sndiod : dev.c dev.h dev_sioctl.c siofile.c sock.c 

Log message:
sndiod: Move controls out of the device structure

Moving to a global server-wide controls list is necessary to expose
controls that are not associated to a particular device (ex. a device
selector).

The current hack to use the device-side sioctl_desc->addr variable as
client-side key can't work anymore. So, we use a unique dynamically
allocated ctl->addr key; this is much cleaner. A new "scope" enum
(with two "void *" arguments) is used to determine what the control
does control. This adds flexibility and allows to easily add new
control types that are not associated to devices.

No behavior change.

Reply via email to