hack to support legacy audio/midi device naming scheme is almost two
years old, ok to drop support for it?
-- Alexandre
Index: mio.c
===================================================================
RCS file: /cvs/src/lib/libsndio/mio.c,v
retrieving revision 1.10
diff -u -p -r1.10 mio.c
--- mio.c 16 Apr 2011 10:52:22 -0000 1.10
+++ mio.c 3 May 2011 20:21:39 -0000
@@ -38,8 +38,7 @@ mio_open(const char *str, unsigned mode,
static char prefix_rmidi[] = "rmidi";
static char prefix_aucat[] = "aucat";
struct mio_hdl *hdl;
- struct stat sb;
- char *sep, buf[4];
+ char *sep;
int len;
#ifdef DEBUG
@@ -57,17 +56,9 @@ mio_open(const char *str, unsigned mode,
}
sep = strchr(str, ':');
if (sep == NULL) {
- /*
- * try legacy "/dev/rmidioxxx" device name
- */
- if (stat(str, &sb) < 0 || !S_ISCHR(sb.st_mode)) {
- DPRINTF("mio_open: %s: missing ':' separator\n", str);
- return NULL;
- }
- snprintf(buf, sizeof(buf), "%u", minor(sb.st_rdev));
- return mio_rmidi_open(buf, mode, nbio);
+ DPRINTF("mio_open: %s: ':' missing in device name\n", str);
+ return NULL;
}
-
len = sep - str;
if (len == (sizeof(prefix_midithru) - 1) &&
memcmp(str, prefix_midithru, len) == 0)
Index: sio.c
===================================================================
RCS file: /cvs/src/lib/libsndio/sio.c,v
retrieving revision 1.3
diff -u -p -r1.3 sio.c
--- sio.c 3 May 2011 20:15:23 -0000 1.3
+++ sio.c 3 May 2011 20:21:39 -0000
@@ -46,8 +46,7 @@ sio_open(const char *str, unsigned mode,
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,
}
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) &&