aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristos Margiolis <christos@FreeBSD.org>2024-02-12 10:59:32 +0000
committerChristos Margiolis <christos@FreeBSD.org>2024-02-12 11:00:05 +0000
commit53c768e6836a32c8dcd0b0b422a169ef7a82a3ab (patch)
tree64f9e87cfdabb561a5958e72e857b2d8e91e7460
parent5daa7cf42f4551cb2f4a452fd038807925320eac (diff)
downloadsrc-53c768e6836a32c8dcd0b0b422a169ef7a82a3ab.tar.gz
src-53c768e6836a32c8dcd0b0b422a169ef7a82a3ab.zip
mixer(3): Do not hardcode "/dev/mixer"
We have BASEPATH defined. Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Reviewed by: dev_submerge.ch, markj Differential Revision: https://reviews.freebsd.org/D43812
-rw-r--r--lib/libmixer/mixer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libmixer/mixer.c b/lib/libmixer/mixer.c
index d78ca6e0fc87..93ace1d0c69b 100644
--- a/lib/libmixer/mixer.c
+++ b/lib/libmixer/mixer.c
@@ -87,7 +87,7 @@ mixer_open(const char *name)
dunit:
if ((m->unit = mixer_get_dunit()) < 0)
goto fail;
- (void)snprintf(m->name, sizeof(m->name), "/dev/mixer%d", m->unit);
+ (void)snprintf(m->name, sizeof(m->name), BASEPATH "%d", m->unit);
}
if ((m->fd = open(m->name, O_RDWR)) < 0)