summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorratchov <ratchov@openbsd.org>2007-09-24 19:45:03 +0000
committerratchov <ratchov@openbsd.org>2007-09-24 19:45:03 +0000
commit9b362048c36994406908f2340cfc3773f82dfc64 (patch)
treef7edaaa28255d9e83d0cd60ed625e368bd2f7fd8
parentfix audioctl(1) returning bugus values of 'output_muted' because of (diff)
downloadwireguard-openbsd-9b362048c36994406908f2340cfc3773f82dfc64.tar.xz
wireguard-openbsd-9b362048c36994406908f2340cfc3773f82dfc64.zip
accept values > 1 for "output_muted". That's what SunOS do. Suggested
by deanna@ ok jakemsr@
-rw-r--r--sys/dev/audio.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/audio.c b/sys/dev/audio.c
index 8b630d1b1d8..80af5a51a97 100644
--- a/sys/dev/audio.c
+++ b/sys/dev/audio.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: audio.c,v 1.79 2007/09/24 19:23:41 ratchov Exp $ */
+/* $OpenBSD: audio.c,v 1.80 2007/09/24 19:45:03 ratchov Exp $ */
/* $NetBSD: audio.c,v 1.119 1999/11/09 16:50:47 augustss Exp $ */
/*
@@ -2298,7 +2298,7 @@ au_set_mute(struct audio_softc *sc, struct au_mixer_ports *ports, u_char mute)
DPRINTF(("au_set_mute: mute (old): %d, mute (new): %d\n",
ct.un.ord, mute));
- ct.un.ord = mute;
+ ct.un.ord = (mute != 0 ? 1 : 0);
error = sc->hw_if->set_port(sc->hw_hdl, &ct);
if (!error)