summaryrefslogtreecommitdiffstats
path: root/usr.bin/mixerctl/mixerctl.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Use /dev/audioctlN instead of /dev/mixerN.ratchov2020-04-041-11/+6
| | | | | | | /dev/audioctlN files are opened in O_WRONLY mode because mixerctl(2) doesn't need to read them. tweaks and ok mestre and kn
* When system calls indicate an error they return -1, not some arbitraryderaadt2019-06-281-7/+7
| | | | | | value < 0. errno is only updated in this case. Change all (most?) callers of syscalls to follow this better, and let's see if this strictness helps us in the future.
* add unveil(2) to mixerctl(1)mestre2018-08-081-3/+13
| | | | | | | | | | | | | | | after we know what is the mixer device to be used, either through MIXERDEVICE env var, the argument passed or by default /dev/mixer then we can unveil it in read/write mode, then if opening fails we reduce unveil to only read mode. Once open(2) succeeds then we can disable fs access by calling unveil(NULL, NULL) since all further operations occur on fds. A cleaner solution would be to just call pledge("audio") after open(2) but currently the ioctls used are not whitelisted in pledge(2), ratchov@ will investigate a better way to do this OK ratchov@
* in getopt() blocks, stop incrementing flag variable which are supposedderaadt2015-02-081-4/+4
| | | | | to just be 0/1 ok miod florian
* if a value is changed and -n is used, print the new value only.ratchov2009-11-121-14/+13
| | | | | from Pawlowski Marcin Piotr <pmp.openbsd at gmail.com> ok jakemsr
* First pass at removing clauses 3 and 4 from NetBSD licenses.ray2008-06-261-8/+1
| | | | | | | | | Not sure what's more surprising: how long it took for NetBSD to catch up to the rest of the BSDs (including UCB), or the amount of code that NetBSD has claimed for itself without attributing to the actual authors. OK deraadt@
* the mixer_devinfo structure contains next and prev pointers; they are usedratchov2008-01-131-3/+2
| | | | | | | | | to create doubly linked "chains" of mixer devices. Currently mixerctl(1) supposes that the 'next' index is never smaller than the index of the device; so it fails to handle such mixers. The fix, allows 'next' indexes to be smaller than the index of the device. ok jakemsr@
* if no arguments given, assume a nice default; ok miod jakemsr deannaderaadt2007-11-261-3/+5
|
* style(9) fixes, optional flags without arguments come first;sobrado2007-09-271-3/+3
| | | | | | while here, some spacing fixes ok deanna@, jakemsr@
* the ellipsis is not an optional argument; while here, sync the usagesobrado2007-08-061-4/+4
| | | | | | | | and synopsis of commands lots of good ideas by jmc@ ok jmc@
* missing progname, clamat@telus.netderaadt2005-10-071-2/+2
|
* toggle support from janus@area319.de. i was unsure, but a few otherderaadt2005-10-011-8/+26
| | | | people found this very useful
* Fix mixerctl -qmillert2005-05-091-5/+5
|
* Levels should be between AUDIO_MIN_GAIN and AUDIO_MAX_GAIN inclusivemillert2005-02-071-51/+41
| | | | | Truncate specified level to be within this range and avoid wrapping. Idea from espie@, OK henning@
* Fix a few memory leaks and general cleanup. From Joris Vink. ok tedu@otto2005-02-021-89/+87
|
* Minor KNF, s/for(/for (/millert2005-01-041-16/+16
|
* Fix some issues noted by Joris Vink; pedro@ OKmillert2005-01-041-5/+6
| | | | | | o g/c the changed field in struct field o increment argv for bad fields too o deal with AUDIO_MIXER_DEVINFO (unlikely) failures
* fix ndev counting loop. report from Stuart Cassofftedu2004-03-021-4/+4
|
* fix segfault when an invalid field was requestedvincent2004-01-221-4/+8
| | | | ok miod
* remove need for -w. ok beck deraadttedu2004-01-221-43/+37
|
* mixerctl.1:jmc2003-11-211-4/+4
| | | | | | | | | | | | - put SYNOPSIS in standard form - -n does not make sense with -q - adjust -width of option list - sort options - a clarity fix from snj att pobox dott com mixerctl.c: - fix spacing in usage() - sync usage() with SYNOPSIS
* unbreak tree; ok margarida@todd2003-05-151-2/+2
|
* make usage printing match what's in the manpage, which is better; ok jfb@jsyn2003-05-151-4/+4
|
* Add a -q flag to suppress all output when setting a variable, andjfb2003-05-151-6/+9
| | | | | | | remove the -v flag from the SYNOPSIS for the -w option since it has no effect ok jsyn@ millert@
* ansify, indent, check for malloc/calloc failure, proper usage()pvalchev2002-12-031-72/+62
| | | | from andrushock@korovino.net via deraadt
* strlcatderaadt2002-05-291-5/+9
|
* Part one of userland __P removal. Done with a simple regexp with some minor hand editing to make comments line up correctly. Another pass is forthcoming that handles the cases that could not be done automatically.millert2002-02-161-5/+5
|
* open RDWR only for -w, RDONLY otherwisemickey2002-01-091-11/+11
|
* fix for case no mixer devices are available, got triggered by malloc.conf->J; millert@ okmickey1999-07-191-1/+5
|
* allow relative values via +/- prefixesmillert1998-05-021-6/+41
|
* From NetBSD: Lennart Augustsson:provos1998-04-301-3/+7
| | | | environment variable for default mixer device
* $OpenBSD$provos1998-04-261-0/+1
|
* mixerctl from NetBSD, mostly by Lennart Augustsson <augustss@cs.chalmers.se>provos1998-04-261-0/+364