Page MenuHomeFreeBSD

D43809.id134178.diff
No OneTemporary

D43809.id134178.diff

diff --git a/usr.sbin/mixer/mixer.c b/usr.sbin/mixer/mixer.c
--- a/usr.sbin/mixer/mixer.c
+++ b/usr.sbin/mixer/mixer.c
@@ -118,8 +118,21 @@
initctls(m);
- if (dflag && set_dunit(m, dunit) < 0)
- goto parse;
+ if (dflag) {
+ if (set_dunit(m, dunit) < 0)
+ goto parse;
+ else {
+ /*
+ * Open current mixer since we changed the default
+ * unit, otherwise we'll print and apply changes to the
+ * old one.
+ */
+ (void)mixer_close(m);
+ if ((m = mixer_open(NULL)) == NULL)
+ errx(1, "cannot open default mixer");
+ initctls(m);
+ }
+ }
if (sflag) {
printrecsrc(m, oflag);
(void)mixer_close(m);

File Metadata

Mime Type
text/plain
Expires
Tue, Apr 21, 12:39 AM (17 h, 37 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31875202
Default Alt Text
D43809.id134178.diff (635 B)

Event Timeline