summaryrefslogtreecommitdiff
path: root/lib/libsndio/sio.c
diff options
context:
space:
mode:
authorAlexandre Ratchov <ratchov@cvs.openbsd.org>2011-05-06 07:30:21 +0000
committerAlexandre Ratchov <ratchov@cvs.openbsd.org>2011-05-06 07:30:21 +0000
commit190eff314ab69909ad9e5364ad25fce82feb9636 (patch)
tree1c61948cd7b9d5edc773325dae2196825abe719c /lib/libsndio/sio.c
parent8b4404186d79b4a10fa72c4da2a2441c6548afff (diff)
remove almost two years old hack to support legacy audio/midi
device names
Diffstat (limited to 'lib/libsndio/sio.c')
-rw-r--r--lib/libsndio/sio.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/lib/libsndio/sio.c b/lib/libsndio/sio.c
index 5346650f2a3..def34daadf8 100644
--- a/lib/libsndio/sio.c
+++ b/lib/libsndio/sio.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sio.c,v 1.3 2011/05/03 20:15:23 ratchov Exp $ */
+/* $OpenBSD: sio.c,v 1.4 2011/05/06 07:30:20 ratchov Exp $ */
/*
* Copyright (c) 2008 Alexandre Ratchov <alex@caoua.org>
*
@@ -46,8 +46,7 @@ sio_open(const char *str, unsigned mode, int nbio)
static char prefix_aucat[] = "aucat";
static char prefix_sun[] = "sun";
struct sio_hdl *hdl;
- struct stat sb;
- char *sep, buf[NAME_MAX];
+ char *sep;
int len;
#ifdef DEBUG
@@ -68,15 +67,8 @@ sio_open(const char *str, unsigned mode, int nbio)
}
sep = strchr(str, ':');
if (sep == NULL) {
- /*
- * try legacy "/dev/audioxxx" or ``socket'' device name
- */
- if (stat(str, &sb) < 0 || !S_ISCHR(sb.st_mode)) {
- snprintf(buf, sizeof(buf), "0.%s", str);
- return sio_aucat_open(buf, mode, nbio);
- }
- snprintf(buf, sizeof(buf), "%u", minor(sb.st_rdev) & 0xf);
- return sio_sun_open(buf, mode, nbio);
+ DPRINTF("sio_open: %s: ':' missing in device name\n", str);
+ return NULL;
}
len = sep - str;
if (len == (sizeof(prefix_aucat) - 1) &&