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/mixerctl/mixerctl.c | |
parent | c9807e011cad59ebf6bc2efbbcee191dfdfc56ee (diff) |
From NetBSD: Lennart Augustsson:
environment variable for default mixer device
Diffstat (limited to 'usr.bin/mixerctl/mixerctl.c')
-rw-r--r-- | usr.bin/mixerctl/mixerctl.c | 10 |
1 files changed, 7 insertions, 3 deletions
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) { |