mirror of
https://github.com/openbsd/src.git
synced 2026-04-22 21:24:34 +00:00
libsndio: Increase the length of display strings and control names
Fixes truncated uaudio(4) device names. As we're at it, increase other strings and add padding in the sioctl_desc structure, for future use.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: sndio.h,v 1.16 2026/01/22 09:24:26 ratchov Exp $ */
|
||||
/* $OpenBSD: sndio.h,v 1.17 2026/01/22 09:31:22 ratchov Exp $ */
|
||||
/*
|
||||
* Copyright (c) 2008 Alexandre Ratchov <alex@caoua.org>
|
||||
*
|
||||
@@ -27,17 +27,9 @@
|
||||
|
||||
/*
|
||||
* limits
|
||||
*
|
||||
* For now SIOCTL_DISPLAYMAX is 12 byte only. It nicely fits in the
|
||||
* padding of the sioctl_desc structure: this allows any binary linked
|
||||
* to the library version with no sioctl_desc->display to work with
|
||||
* this library version. Currently, any string reported by the lower
|
||||
* layers fits in the 12-byte buffer. Once larger strings start
|
||||
* being used (or the ABI changes for any other reason) increase
|
||||
* SIOCTL_DISPLAYMAX and properly pad the sioctl_desc structure.
|
||||
*/
|
||||
#define SIOCTL_NAMEMAX 12 /* max name length */
|
||||
#define SIOCTL_DISPLAYMAX 12 /* max display string length */
|
||||
#define SIOCTL_NAMEMAX 16 /* max name length */
|
||||
#define SIOCTL_DISPLAYMAX 32 /* max display string length */
|
||||
|
||||
/*
|
||||
* private ``handle'' structure
|
||||
@@ -119,11 +111,12 @@ struct sioctl_desc {
|
||||
#define SIOCTL_LIST 5 /* switch, element of a list */
|
||||
#define SIOCTL_SEL 6 /* element of a selector */
|
||||
unsigned int type; /* one of above */
|
||||
unsigned int maxval; /* max value */
|
||||
int __pad[3]; /* for future use */
|
||||
char func[SIOCTL_NAMEMAX]; /* function name, ex. "level" */
|
||||
char group[SIOCTL_NAMEMAX]; /* group this control belongs to */
|
||||
struct sioctl_node node0; /* affected node */
|
||||
struct sioctl_node node1; /* dito for SIOCTL_{VEC,LIST,SEL} */
|
||||
unsigned int maxval; /* max value */
|
||||
char display[SIOCTL_DISPLAYMAX]; /* free-format hint */
|
||||
};
|
||||
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
major=8
|
||||
minor=1
|
||||
major=9
|
||||
minor=0
|
||||
|
||||
Reference in New Issue
Block a user