Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-7]: src/usr.bin/audiocfg Apply patch, requested by mrg in ticket ...
details: https://anonhg.NetBSD.org/src/rev/48645f4b31f9
branches: netbsd-7
changeset: 800453:48645f4b31f9
user: martin <martin%NetBSD.org@localhost>
date: Wed Mar 21 12:13:30 2018 +0000
description:
Apply patch, requested by mrg in ticket #1588:
Try to open the audio path with O_WRONLY if O_RDWR fails.
This makes 'audiocfg list' work in more places.
(no longer necessary in -current with the in kernel mixer.)
diffstat:
usr.bin/audiocfg/audiodev.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diffs (23 lines):
diff -r a2a5bd56502c -r 48645f4b31f9 usr.bin/audiocfg/audiodev.c
--- a/usr.bin/audiocfg/audiodev.c Wed Mar 21 12:08:43 2018 +0000
+++ b/usr.bin/audiocfg/audiodev.c Wed Mar 21 12:13:30 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: audiodev.c,v 1.5 2013/08/11 06:31:00 dholland Exp $ */
+/* $NetBSD: audiodev.c,v 1.5.4.1 2018/03/21 12:13:30 martin Exp $ */
/*
* Copyright (c) 2010 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -89,8 +89,11 @@
adev->defaultdev = true;
adev->fd = open(adev->path, O_RDWR);
- if (adev->fd == -1)
- return -1;
+ if (adev->fd == -1) {
+ adev->fd = open(adev->path, O_WRONLY);
+ if (adev->fd == -1)
+ return -1;
+ }
if (ioctl(adev->fd, AUDIO_GETDEV, &adev->audio_device) == -1) {
close(adev->fd);
return -1;
Home |
Main Index |
Thread Index |
Old Index