mixer

FreeBSD OSS mixer library implementation and a complete rewrite of mixer(8)
git clone git://git.margiolis.net/mixer.git
Log | Files | Refs | README | LICENSE

commit 99621a7bfa13d7d884215198b7e70daa5cac8dd0
parent 7d6319d403d85cebe77bbc7c02cb2983c7ce9429
Author: Christos Margiolis <christos@margiolis.net>
Date:   Thu, 30 Sep 2021 16:03:53 +0300

modified rc script and name checking in mixer_open

Diffstat:
MREADME | 3++-
Mdiff/mixer_rc.diff | 6+-----
Dlol | 4----
Mmixer_lib/mixer.c | 2+-
4 files changed, 4 insertions(+), 11 deletions(-)

diff --git a/README b/README @@ -2,7 +2,8 @@ mixer ===== An OSS mixer library implementation, a complete rewrite of mixer(8) -and sound(4) update for FreeBSD. +and sound(4) update for FreeBSD. The project was added to the base +system in FreeBSD 14.0. Usage ----- diff --git a/diff/mixer_rc.diff b/diff/mixer_rc.diff @@ -1,8 +1,4 @@ 61c61 -< /usr/sbin/mixer_prog -f ${dev} -o > /var/db/${1}-state 2>/dev/null +< /usr/sbin/mixer -f ${dev} -o > /var/db/${1}-state 2>/dev/null --- > /usr/sbin/mixer -f ${dev} -s > /var/db/${1}-state 2>/dev/null -75c75 -< /usr/sbin/mixer_prog -f ${dev} `cat ${file}` > /dev/null ---- -> /usr/sbin/mixer -f ${dev} `cat ${file}` > /dev/null diff --git a/lol b/lol @@ -1,4 +0,0 @@ -#!/bin/sh - -cd mixer_lib && doas make all install clean cleandepend && cd .. -cd mixer_prog && doas make all install clean cleandepend && cd .. diff --git a/mixer_lib/mixer.c b/mixer_lib/mixer.c @@ -82,7 +82,7 @@ mixer_open(const char *name) goto fail; if (strncmp(p, "mixer", 5) == 0 && p[5] == '\0') goto dunit; - (void)sscanf(name, "%*[^0123456789]%d", &m->unit); + (void)sscanf(p, "%*[^0123456789]%d", &m->unit); (void)strlcpy(m->name, name, sizeof(m->name)); } else { dunit: