From ef7df2416debb882c42124bddc07808c00a4503b Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Sat, 9 Jan 2010 06:40:50 -0800 Subject: Hide OSS and Solaris devices if their files can't be stat'd --- Alc/solaris.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'Alc/solaris.c') diff --git a/Alc/solaris.c b/Alc/solaris.c index 4504a680..9cb4092a 100644 --- a/Alc/solaris.c +++ b/Alc/solaris.c @@ -112,7 +112,8 @@ static ALCboolean solaris_open_playback(ALCdevice *device, const ALCchar *device if(data->fd == -1) { free(data); - AL_PRINT("Could not open %s: %s\n", driver, strerror(errno)); + if(errno != ENOENT) + AL_PRINT("Could not open %s: %s\n", driver, strerror(errno)); return ALC_FALSE; } @@ -291,6 +292,12 @@ void alc_solaris_deinit(void) void alc_solaris_probe(ALCboolean capture) { +#ifdef HAVE_STAT + struct stat buf; + if(stat(GetConfigValue("solaris", "device", "/dev/audio"), &buf) != 0) + return; +#endif + if(type == DEVICE_PROBE) AppendDeviceList(solaris_device); else if(type == ALL_DEVICE_PROBE) -- cgit v1.2.3