History log of /freebsd-11-stable/usr.sbin/mixer/mixer.c
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 317795 04-May-2017 pfg

MFC r317596:
mixer(8): Prevent possible sscanf() overflow.

Fix %s buffer sizes in sscanf().

Obtained from: DragonflyBSD (git dab952e2)


# 302408 07-Jul-2016 gjb

Copy head@r302406 to stable/11 as part of the 11.0-RELEASE cycle.
Prune svn:mergeinfo from the new branch, as nothing has been merged
here.

Additional commits post-branch will follow.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


/freebsd-11-stable/MAINTAINERS
/freebsd-11-stable/cddl
/freebsd-11-stable/cddl/contrib/opensolaris
/freebsd-11-stable/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print
/freebsd-11-stable/cddl/contrib/opensolaris/cmd/zfs
/freebsd-11-stable/cddl/contrib/opensolaris/lib/libzfs
/freebsd-11-stable/contrib/amd
/freebsd-11-stable/contrib/apr
/freebsd-11-stable/contrib/apr-util
/freebsd-11-stable/contrib/atf
/freebsd-11-stable/contrib/binutils
/freebsd-11-stable/contrib/bmake
/freebsd-11-stable/contrib/byacc
/freebsd-11-stable/contrib/bzip2
/freebsd-11-stable/contrib/com_err
/freebsd-11-stable/contrib/compiler-rt
/freebsd-11-stable/contrib/dialog
/freebsd-11-stable/contrib/dma
/freebsd-11-stable/contrib/dtc
/freebsd-11-stable/contrib/ee
/freebsd-11-stable/contrib/elftoolchain
/freebsd-11-stable/contrib/elftoolchain/ar
/freebsd-11-stable/contrib/elftoolchain/brandelf
/freebsd-11-stable/contrib/elftoolchain/elfdump
/freebsd-11-stable/contrib/expat
/freebsd-11-stable/contrib/file
/freebsd-11-stable/contrib/gcc
/freebsd-11-stable/contrib/gcclibs/libgomp
/freebsd-11-stable/contrib/gdb
/freebsd-11-stable/contrib/gdtoa
/freebsd-11-stable/contrib/groff
/freebsd-11-stable/contrib/ipfilter
/freebsd-11-stable/contrib/ldns
/freebsd-11-stable/contrib/ldns-host
/freebsd-11-stable/contrib/less
/freebsd-11-stable/contrib/libarchive
/freebsd-11-stable/contrib/libarchive/cpio
/freebsd-11-stable/contrib/libarchive/libarchive
/freebsd-11-stable/contrib/libarchive/libarchive_fe
/freebsd-11-stable/contrib/libarchive/tar
/freebsd-11-stable/contrib/libc++
/freebsd-11-stable/contrib/libc-vis
/freebsd-11-stable/contrib/libcxxrt
/freebsd-11-stable/contrib/libexecinfo
/freebsd-11-stable/contrib/libpcap
/freebsd-11-stable/contrib/libstdc++
/freebsd-11-stable/contrib/libucl
/freebsd-11-stable/contrib/libxo
/freebsd-11-stable/contrib/llvm
/freebsd-11-stable/contrib/llvm/projects/libunwind
/freebsd-11-stable/contrib/llvm/tools/clang
/freebsd-11-stable/contrib/llvm/tools/lldb
/freebsd-11-stable/contrib/llvm/tools/llvm-dwarfdump
/freebsd-11-stable/contrib/llvm/tools/llvm-lto
/freebsd-11-stable/contrib/mdocml
/freebsd-11-stable/contrib/mtree
/freebsd-11-stable/contrib/ncurses
/freebsd-11-stable/contrib/netcat
/freebsd-11-stable/contrib/ntp
/freebsd-11-stable/contrib/nvi
/freebsd-11-stable/contrib/one-true-awk
/freebsd-11-stable/contrib/openbsm
/freebsd-11-stable/contrib/openpam
/freebsd-11-stable/contrib/openresolv
/freebsd-11-stable/contrib/pf
/freebsd-11-stable/contrib/sendmail
/freebsd-11-stable/contrib/serf
/freebsd-11-stable/contrib/sqlite3
/freebsd-11-stable/contrib/subversion
/freebsd-11-stable/contrib/tcpdump
/freebsd-11-stable/contrib/tcsh
/freebsd-11-stable/contrib/tnftp
/freebsd-11-stable/contrib/top
/freebsd-11-stable/contrib/top/install-sh
/freebsd-11-stable/contrib/tzcode/stdtime
/freebsd-11-stable/contrib/tzcode/zic
/freebsd-11-stable/contrib/tzdata
/freebsd-11-stable/contrib/unbound
/freebsd-11-stable/contrib/vis
/freebsd-11-stable/contrib/wpa
/freebsd-11-stable/contrib/xz
/freebsd-11-stable/crypto/heimdal
/freebsd-11-stable/crypto/openssh
/freebsd-11-stable/crypto/openssl
/freebsd-11-stable/gnu/lib
/freebsd-11-stable/gnu/usr.bin/binutils
/freebsd-11-stable/gnu/usr.bin/cc/cc_tools
/freebsd-11-stable/gnu/usr.bin/gdb
/freebsd-11-stable/lib/libc/locale/ascii.c
/freebsd-11-stable/sys/cddl/contrib/opensolaris
/freebsd-11-stable/sys/contrib/dev/acpica
/freebsd-11-stable/sys/contrib/ipfilter
/freebsd-11-stable/sys/contrib/libfdt
/freebsd-11-stable/sys/contrib/octeon-sdk
/freebsd-11-stable/sys/contrib/x86emu
/freebsd-11-stable/sys/contrib/xz-embedded
/freebsd-11-stable/usr.sbin/bhyve/atkbdc.h
/freebsd-11-stable/usr.sbin/bhyve/bhyvegc.c
/freebsd-11-stable/usr.sbin/bhyve/bhyvegc.h
/freebsd-11-stable/usr.sbin/bhyve/console.c
/freebsd-11-stable/usr.sbin/bhyve/console.h
/freebsd-11-stable/usr.sbin/bhyve/pci_fbuf.c
/freebsd-11-stable/usr.sbin/bhyve/pci_xhci.c
/freebsd-11-stable/usr.sbin/bhyve/pci_xhci.h
/freebsd-11-stable/usr.sbin/bhyve/ps2kbd.c
/freebsd-11-stable/usr.sbin/bhyve/ps2kbd.h
/freebsd-11-stable/usr.sbin/bhyve/ps2mouse.c
/freebsd-11-stable/usr.sbin/bhyve/ps2mouse.h
/freebsd-11-stable/usr.sbin/bhyve/rfb.c
/freebsd-11-stable/usr.sbin/bhyve/rfb.h
/freebsd-11-stable/usr.sbin/bhyve/sockstream.c
/freebsd-11-stable/usr.sbin/bhyve/sockstream.h
/freebsd-11-stable/usr.sbin/bhyve/usb_emul.c
/freebsd-11-stable/usr.sbin/bhyve/usb_emul.h
/freebsd-11-stable/usr.sbin/bhyve/usb_mouse.c
/freebsd-11-stable/usr.sbin/bhyve/vga.c
/freebsd-11-stable/usr.sbin/bhyve/vga.h
# 299470 11-May-2016 cem

mixer(8): Style: Tag no-return usage() as __dead2

Coverity really should have figured this out from the exit(3) call at the end
of the routine, but just make it explicit.

No functional change.

Reported by: Coverity
CID: 1304866 (false positive double-close of 'baz')
Sponsored by: EMC / Isilon Storage Division


# 230611 27-Jan-2012 mav

Return proper error message if recording device is not specified.

MFC after: 1 week


# 227255 06-Nov-2011 ed

Mark global functions and/or variables in mixer(8) static where possible.

This allows compilers and static analyzers to do more thorough analysis.


# 177198 14-Mar-2008 jkim

Fix a typo.


# 177197 14-Mar-2008 jkim

Clean up code and fix style(9) nits.


# 177195 14-Mar-2008 jkim

- Check device masks and bypass printing headers if capable device does
not exist. /etc/rc.d/mixer tried to restore non-existent recording
source because /var/var/db/mixer*-state contains '=rec' for example.
- Remove hardcoded mixer2 and mixer3 and do the right thing.
- Replace getopt(3) with hand-rolled option parser. It was not able
to handle 'mixer -rec mic' although it is a valid command.
- Make '-s' and '-S' mutualy exclusive as mixer(8) says.
- Do not re-read recording source unless it has been modified.


# 153953 01-Jan-2006 ariff

- Fix possible memory leak due to repetetive strdup(3) without matching
free(3).
- print_recsrc() should honor shortflag and give appropriate output for
later consumption by /etc/rc.d/mixer. This will ensure that recording
device selections survived across reboot. Output everything to stdout
instead if stderr.

MFC after: 3 days


# 144999 13-Apr-2005 mdodd

Add the -S flag which produces the -s output without
mixing field separators.


# 124830 22-Jan-2004 grehan

Userland signed char fixes for PPC build. Problems were using a char
return for getopt() and comparing to -1, ditto with fgetc() and EOF,
and using the kg_nice value from <sys/user.h>

Submitted by: Stefan Farfeleder <stefan@fafoe.narf.at>
Reviewed by: obrien, bde (a while back)
Tested lightly on: ppc, i386, make universe


# 116388 15-Jun-2003 grog

Print out the current recording devices in the default printout.

Discussed with: cg

Break some particularly long lines.

Still not enough for: bde.


# 114601 03-May-2003 obrien

Use __FBSDID over rcsid[]. Protect copyright[] where needed.


# 113299 09-Apr-2003 mdodd

Implement relative mixer adjustment.

PR: 46679 (similar functionality)


# 108421 30-Dec-2002 jmallett

Print old mixer levels when setting new ones.


# 78778 25-Jun-2001 dd

Constify and set WARNS=2.

Submitted by: Mike Barcroft <mike@q9media.com
Reviewed by: md5(1)


# 75334 09-Apr-2001 greid

Change the behaviour of mixer slightly such that not explicitly specifying
a mixer device will set/get the master volume levels

PR: 25156
Submitted by: Tony Finch <dot@dotat.at>
Reviewed by: cg, nik


# 69258 27-Nov-2000 kris

Fix format string warnings


# 64657 15-Aug-2000 sobomax

Several cleanups:
- use getopt(3) to parse command line arguments instead of home-made incomplete
parser;
- be more verbose when error in command line encountered (i.e. incorrect
playing/recording device, incorrect recsrc syntax).


# 60741 20-May-2000 jkh

I've always wanted to be able to dump out the current values of
the mixer in a format suitable for saving and handing off to
mixer(1) at some future date to restore the settings.
Add a -s flag to do this.


# 50912 04-Sep-1999 peter

remove #ifdef FreeBSD -> <machine/soundcard.h> special case as we have it
in the standard location now.


# 50479 27-Aug-1999 peter

$Id$ -> $FreeBSD$


# 35828 07-May-1998 jmg

fix a core dump problem when you don't give -f a parameter... also compare
results of strcmp against 0 instead of !'ing results...

Closes PR: 6538


# 30028 01-Oct-1997 charnier

According to Bruce, err(-1,..) is bogus. Change it to err(1,..). More commits
to come in this area.


# 29963 29-Sep-1997 charnier

Use err(3).


# 29753 23-Sep-1997 ache

Compact usage string, devices list can be too long


# 29612 19-Sep-1997 jmg

major modifications to the mixer. currently it doesn't report errors
that it encounters (such as invalid device), but does print usage upon
this error...

but otherwise allows complex commands such as:
mixer -f /dev/mixer4 synth line 50 -rec mic +rec line =rec cd ^rec mix


# 13803 31-Jan-1996 mpp

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.


# 13435 15-Jan-1996 mpp

Fixed to not core dump if not enough arguments are given
with the +rec and -rec options.


# 8857 30-May-1995 rgrimes

Remove trailing whitespace.


# 6449 15-Feb-1995 ache

This commit was generated by cvs2svn to compensate for changes in r6448,
which included commits to RCS files with non-trunk default branches.


# 6448 15-Feb-1995 ache

non-X mixer, useful into rc.local