OpenBSD CVS

CVS log for src/usr.bin/sndiod/dev_sioctl.c


[BACK] Up to [local] / src / usr.bin / sndiod

Request diff between arbitrary revisions


Default branch: MAIN
Current tag: OPENBSD_7_2_BASE


Revision 1.7 / (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_5_BASE, OPENBSD_7_5, OPENBSD_7_4_BASE, OPENBSD_7_4, OPENBSD_7_3_BASE, OPENBSD_7_3, OPENBSD_7_2_BASE, OPENBSD_7_2, OPENBSD_7_1_BASE, OPENBSD_7_1, OPENBSD_7_0_BASE, OPENBSD_7_0, OPENBSD_6_9_BASE, OPENBSD_6_9
Changes since 1.6: +21 -31 lines
Diff to previous 1.6 (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.

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.