Up to [local] / src / usr.bin / sndiod
Request diff between arbitrary revisions
Default branch: MAIN
Current tag: OPENBSD_7_0_BASE
Revision 1.24 / (download) - annotate - [select for diffs], Wed Mar 3 10:00:27 2021 UTC (3 years, 3 months ago) by ratchov
Branch: MAIN
CVS Tags: OPENBSD_7_0_BASE,
OPENBSD_7_0,
OPENBSD_6_9_BASE,
OPENBSD_6_9
Changes since 1.23: +4 -5 lines
Diff to previous 1.23 (colored)
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.