summaryrefslogtreecommitdiffstats
path: root/usr.sbin/mixer
diff options
context:
space:
mode:
authormpp <mpp@FreeBSD.org>1996-01-31 18:01:22 +0000
committermpp <mpp@FreeBSD.org>1996-01-31 18:01:22 +0000
commit9eb26b886bd082f149d2116dde0d90215de340cc (patch)
treed292e55c560d6b8bff6cba26d633a3e900572320 /usr.sbin/mixer
parentb1de99285aef1d37a3d56742e575d25487e9f004 (diff)
downloadFreeBSD-src-9eb26b886bd082f149d2116dde0d90215de340cc.zip
FreeBSD-src-9eb26b886bd082f149d2116dde0d90215de340cc.tar.gz
Make mixer print out all of the current mixer settings by defualt
instead of making the user run a separate command for each setting they are interested in. Closes PR#432.
Diffstat (limited to 'usr.sbin/mixer')
-rw-r--r--usr.sbin/mixer/mixer.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/usr.sbin/mixer/mixer.c b/usr.sbin/mixer/mixer.c
index ac60294..9415a42 100644
--- a/usr.sbin/mixer/mixer.c
+++ b/usr.sbin/mixer/mixer.c
@@ -90,10 +90,26 @@ main(int argc, char *argv[])
case 2:
bar = 0;
break;
+ case 1:
+ bar = -1;
+ break;
default:
usage();
}
+ if (bar < 0) {
+ for (foo = 0; foo < SOUND_MIXER_NRDEVICES; foo++) {
+ if (!((1 << foo) & devmask))
+ continue;
+ if (ioctl(baz, MIXER_READ(foo),&bar)== -1) {
+ perror("MIXER_READ");
+ continue;
+ }
+ printf("Mixer %-8s is currently set to %3d:%d\n", names[foo], bar & 0x7f, (bar >> 8) & 0x7f);
+ }
+ return(0);
+ }
+
for (foo = 0; foo < SOUND_MIXER_NRDEVICES && strcmp(names[foo], argv[1]); foo++);
if (foo >= SOUND_MIXER_NRDEVICES) {
OpenPOWER on IntegriCloud