diff options
author | Niels Provos <provos@cvs.openbsd.org> | 1998-04-30 13:40:02 +0000 |
---|---|---|
committer | Niels Provos <provos@cvs.openbsd.org> | 1998-04-30 13:40:02 +0000 |
commit | f1904abf35754c451d1c381421f6310c8c7bd707 (patch) | |
tree | ced0dff3e442f38ab378fcb1045af0dd7e9d4ccd /usr.bin | |
parent | c9807e011cad59ebf6bc2efbbcee191dfdfc56ee (diff) |
From NetBSD: Lennart Augustsson:
environment variable for default mixer device
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/mixerctl/mixerctl.1 | 8 | ||||
-rw-r--r-- | usr.bin/mixerctl/mixerctl.c | 10 |
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) { |