summaryrefslogtreecommitdiff
path: root/usr.bin/audioctl
diff options
context:
space:
mode:
authorJason McIntyre <jmc@cvs.openbsd.org>2023-01-09 17:13:47 +0000
committerJason McIntyre <jmc@cvs.openbsd.org>2023-01-09 17:13:47 +0000
commit7a0652f015c41bb3d7ee17e1e52aeb762eb2243e (patch)
treeb08c6c6fc88430e3db5071b0b576b84a0f8ba306 /usr.bin/audioctl
parentdb05284d0bdb84d2e9a9641034dc5cf04b18de3c (diff)
shorten SYNOPSIS from three versions to two (me) then one (ratchov),
plus all the cleanup that goes with; ok ratchov
Diffstat (limited to 'usr.bin/audioctl')
-rw-r--r--usr.bin/audioctl/audioctl.827
-rw-r--r--usr.bin/audioctl/audioctl.c6
2 files changed, 13 insertions, 20 deletions
diff --git a/usr.bin/audioctl/audioctl.8 b/usr.bin/audioctl/audioctl.8
index d7b94559bce..2d5f152c9e2 100644
--- a/usr.bin/audioctl/audioctl.8
+++ b/usr.bin/audioctl/audioctl.8
@@ -1,4 +1,4 @@
-.\" $OpenBSD: audioctl.8,v 1.6 2023/01/08 08:27:17 jmc Exp $
+.\" $OpenBSD: audioctl.8,v 1.7 2023/01/09 17:13:46 jmc Exp $
.\" $NetBSD: audioctl.1,v 1.7 1998/04/27 16:55:23 augustss Exp $
.\" Copyright (c) 1997 The NetBSD Foundation, Inc.
.\" All rights reserved.
@@ -26,7 +26,7 @@
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
-.Dd $Mdocdate: January 8 2023 $
+.Dd $Mdocdate: January 9 2023 $
.Dt AUDIOCTL 8
.Os
.Sh NAME
@@ -34,17 +34,10 @@
.Nd get or set audio driver variables
.Sh SYNOPSIS
.Nm audioctl
-.Op Fl f Ar file
-.Op Fl w Ar wait
-.Nm audioctl
-.Op Fl n
-.Op Fl f Ar file
-.Op Fl w Ar wait
-.Ar name ...
-.Nm audioctl
.Op Fl nq
.Op Fl f Ar file
-.Ar name Ns = Ns Ar value ...
+.Op Fl w Ar wait
+.Op Ar name Ns Oo = Ns Ar value Oc Ar ...
.Sh DESCRIPTION
The
.Nm
@@ -67,11 +60,13 @@ Display variables every
seconds.
.Nm
will continue to display variables until interrupted.
-.It Ar name Ns = Ns Ar value
-Attempt to set the specified variable
-.Ar name
-to
-.Ar value .
+.It Ar name Ns Op = Ns Ar value
+Retrieve the specified variable
+.Ar name ,
+or attempt to set it to value.
+Multiple
+.Ar name Ns Op = Ns Ar value
+arguments may be given.
.El
.Pp
If the audio control device is used, then values are only stored in the
diff --git a/usr.bin/audioctl/audioctl.c b/usr.bin/audioctl/audioctl.c
index 598e8cf07d4..90e301565bb 100644
--- a/usr.bin/audioctl/audioctl.c
+++ b/usr.bin/audioctl/audioctl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: audioctl.c,v 1.46 2023/01/08 08:27:17 jmc Exp $ */
+/* $OpenBSD: audioctl.c,v 1.47 2023/01/09 17:13:46 jmc Exp $ */
/*
* Copyright (c) 2016 Alexandre Ratchov <alex@caoua.org>
*
@@ -64,9 +64,7 @@ struct field {
};
const char usagestr[] =
- "usage: audioctl [-f file] [-w wait]\n"
- " audioctl [-n] [-f file] [-w wait] name ...\n"
- " audioctl [-nq] [-f file] name=value ...\n";
+ "usage: audioctl [-nq] [-f file] [-w wait] [name[=value] ...]\n";
int fd, show_names = 1, quiet = 0, wait_sec = 0;