summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorprovos <provos@openbsd.org>1998-04-30 13:40:00 +0000
committerprovos <provos@openbsd.org>1998-04-30 13:40:00 +0000
commiteaa347161a74974a8f62cada50e1fd2436cce35c (patch)
tree27806f08fc21ea896981bff7bae13c1381e1fded
parentuse inet_ntoa (diff)
downloadwireguard-openbsd-eaa347161a74974a8f62cada50e1fd2436cce35c.tar.xz
wireguard-openbsd-eaa347161a74974a8f62cada50e1fd2436cce35c.zip
From NetBSD: Lennart Augustsson:
environment variable for default mixer device
-rw-r--r--usr.bin/mixerctl/mixerctl.18
-rw-r--r--usr.bin/mixerctl/mixerctl.c10
2 files changed, 13 insertions, 5 deletions
diff --git a/usr.bin/mixerctl/mixerctl.1 b/usr.bin/mixerctl/mixerctl.1
index 10121c8b21b..7ba18b9abaf 100644
--- a/usr.bin/mixerctl/mixerctl.1
+++ b/usr.bin/mixerctl/mixerctl.1
@@ -1,5 +1,5 @@
-.\" $OpenBSD: mixerctl.1,v 1.3 1998/04/26 22:27:28 provos Exp $
-.\" $NetBSD: mixerctl.1,v 1.4 1997/10/19 05:09:35 lukem Exp $
+.\" $OpenBSD: mixerctl.1,v 1.4 1998/04/30 13:40:00 provos Exp $
+.\" $NetBSD: mixerctl.1,v 1.6 1998/04/27 16:55:23 augustss Exp $
.\" Copyright (c) 1997 The NetBSD Foundation, Inc.
.\" All rights reserved.
.\"
@@ -92,6 +92,10 @@ are shown in {}.
.It Pa /dev/mixer
mixer audio device
.El
+.Sh ENVIRONMENT
+.Bl -tag -width MIXERDEVICE
+.It Pa MIXERDEVICE
+the mixer device to use.
.Sh SEE ALSO
.Xr audioctl 1 ,
.Xr audio 4 ,
diff --git a/usr.bin/mixerctl/mixerctl.c b/usr.bin/mixerctl/mixerctl.c
index 135f151b5ee..3ad33b386ec 100644
--- a/usr.bin/mixerctl/mixerctl.c
+++ b/usr.bin/mixerctl/mixerctl.c
@@ -1,5 +1,5 @@
-/* $OpenBSD: mixerctl.c,v 1.2 1998/04/26 22:27:30 provos Exp $ */
-/* $NetBSD: mixerctl.c,v 1.9 1997/10/19 07:46:04 augustss Exp $ */
+/* $OpenBSD: mixerctl.c,v 1.3 1998/04/30 13:40:01 provos Exp $ */
+/* $NetBSD: mixerctl.c,v 1.11 1998/04/27 16:55:23 augustss Exp $ */
/*
* Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -215,12 +215,16 @@ main(argc, argv)
{
int fd, i, j, ch, pos;
int aflag = 0, wflag = 0, vflag = 0;
- char *file = "/dev/mixer";
+ char *file;
char *sep = "=";
mixer_devinfo_t dinfo;
mixer_ctrl_t val;
int ndev;
+ file = getenv("MIXERDEVICE");
+ if (file == 0)
+ file = "/dev/mixer";
+
prog = *argv;
while ((ch = getopt(argc, argv, "af:nvw")) != -1) {