summaryrefslogtreecommitdiff
path: root/usr.bin/sndiod
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/sndiod')
-rw-r--r--usr.bin/sndiod/dev.c5
-rw-r--r--usr.bin/sndiod/dev.h3
2 files changed, 5 insertions, 3 deletions
diff --git a/usr.bin/sndiod/dev.c b/usr.bin/sndiod/dev.c
index 4b02f1831e2..0866098c9d8 100644
--- a/usr.bin/sndiod/dev.c
+++ b/usr.bin/sndiod/dev.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dev.c,v 1.73 2020/06/18 05:11:13 ratchov Exp $ */
+/* $OpenBSD: dev.c,v 1.74 2020/06/28 05:17:25 ratchov Exp $ */
/*
* Copyright (c) 2008-2012 Alexandre Ratchov <alex@caoua.org>
*
@@ -2296,6 +2296,7 @@ ctl_log(struct ctl *c)
break;
case CTL_VEC:
case CTL_LIST:
+ case CTL_SEL:
ctl_node_log(&c->node1);
log_puts(":");
log_putu(c->curval);
@@ -2320,7 +2321,7 @@ dev_addctl(struct dev *d, char *gstr, int type, int addr,
strlcpy(c->group, gstr, CTL_NAMEMAX);
strlcpy(c->node0.name, str0, CTL_NAMEMAX);
c->node0.unit = unit0;
- if (c->type == CTL_VEC || c->type == CTL_LIST) {
+ if (c->type == CTL_VEC || c->type == CTL_LIST || c->type == CTL_SEL) {
strlcpy(c->node1.name, str1, CTL_NAMEMAX);
c->node1.unit = unit1;
} else
diff --git a/usr.bin/sndiod/dev.h b/usr.bin/sndiod/dev.h
index 73414622e5e..3a879b8b3be 100644
--- a/usr.bin/sndiod/dev.h
+++ b/usr.bin/sndiod/dev.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: dev.h,v 1.27 2020/06/18 05:11:13 ratchov Exp $ */
+/* $OpenBSD: dev.h,v 1.28 2020/06/28 05:17:26 ratchov Exp $ */
/*
* Copyright (c) 2008-2012 Alexandre Ratchov <alex@caoua.org>
*
@@ -126,6 +126,7 @@ struct ctl {
#define CTL_SW 3 /* on/off switch, only bit 7 counts */
#define CTL_VEC 4 /* number, element of vector */
#define CTL_LIST 5 /* switch, element of a list */
+#define CTL_SEL 6 /* element of a selector */
unsigned int type; /* one of above */
unsigned int addr; /* control address */
#define CTL_NAMEMAX 16 /* max name lenght */