summaryrefslogtreecommitdiffstats
path: root/src/modules/module-detect.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/module-detect.c')
-rw-r--r--src/modules/module-detect.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/modules/module-detect.c b/src/modules/module-detect.c
index 18479df3..1fe8eb8b 100644
--- a/src/modules/module-detect.c
+++ b/src/modules/module-detect.c
@@ -50,7 +50,7 @@ PA_MODULE_DESCRIPTION("Detect available audio hardware and load matching drivers
PA_MODULE_VERSION(PACKAGE_VERSION);
PA_MODULE_LOAD_ONCE(TRUE);
PA_MODULE_USAGE("just-one=<boolean>");
-PA_MODULE_DEPRECATED("Please use module-hal-detect instead of module-detect!");
+PA_MODULE_DEPRECATED("Please use module-udev-detect instead of module-detect!");
static const char* const valid_modargs[] = {
"just-one",
@@ -63,7 +63,7 @@ static int detect_alsa(pa_core *c, int just_one) {
FILE *f;
int n = 0, n_sink = 0, n_source = 0;
- if (!(f = fopen("/proc/asound/devices", "r"))) {
+ if (!(f = pa_fopen_cloexec("/proc/asound/devices", "r"))) {
if (errno != ENOENT)
pa_log_error("open(\"/proc/asound/devices\") failed: %s", pa_cstrerror(errno));
@@ -119,14 +119,14 @@ static int detect_alsa(pa_core *c, int just_one) {
}
#endif
-#ifdef HAVE_OSS
+#ifdef HAVE_OSS_OUTPUT
static int detect_oss(pa_core *c, int just_one) {
FILE *f;
int n = 0, b = 0;
- if (!(f = fopen("/dev/sndstat", "r")) &&
- !(f = fopen("/proc/sndstat", "r")) &&
- !(f = fopen("/proc/asound/oss/sndstat", "r"))) {
+ if (!(f = pa_fopen_cloexec("/dev/sndstat", "r")) &&
+ !(f = pa_fopen_cloexec("/proc/sndstat", "r")) &&
+ !(f = pa_fopen_cloexec("/proc/asound/oss/sndstat", "r"))) {
if (errno != ENOENT)
pa_log_error("failed to open OSS sndstat device: %s", pa_cstrerror(errno));
@@ -240,7 +240,7 @@ int pa__init(pa_module*m) {
#ifdef HAVE_ALSA
if ((n = detect_alsa(m->core, just_one)) <= 0)
#endif
-#ifdef HAVE_OSS
+#ifdef HAVE_OSS_OUTPUT
if ((n = detect_oss(m->core, just_one)) <= 0)
#endif
#ifdef HAVE_SOLARIS