mirror of
https://github.com/opnsense/src.git
synced 2026-04-15 14:29:58 -04:00
Print old mixer levels when setting new ones.
This commit is contained in:
parent
d47693eb7a
commit
59bfb1ea42
1 changed files with 8 additions and 2 deletions
|
|
@ -217,8 +217,14 @@ main(int argc, char *argv[])
|
|||
else if (r > 100)
|
||||
r = 100;
|
||||
|
||||
printf("Setting the mixer %s to %d:%d.\n", names[dev],
|
||||
l, r);
|
||||
if (ioctl(baz, MIXER_READ(dev),&bar)== -1) {
|
||||
warn("MIXER_READ");
|
||||
argc--; argv++;
|
||||
continue;
|
||||
}
|
||||
|
||||
printf("Setting the mixer %s from %d:%d to %d:%d.\n",
|
||||
names[dev], bar & 0x7f, (bar >> 8) & 0x7f, l, r);
|
||||
|
||||
l |= r << 8;
|
||||
if (ioctl(baz, MIXER_WRITE(dev), &l) == -1)
|
||||
|
|
|
|||
Loading…
Reference in a new issue