diff options
author | Alexandre Ratchov <ratchov@cvs.openbsd.org> | 2015-11-24 11:03:19 +0000 |
---|---|---|
committer | Alexandre Ratchov <ratchov@cvs.openbsd.org> | 2015-11-24 11:03:19 +0000 |
commit | 71652a6df6a620c8c3cb36e47e57b3acd4396e5f (patch) | |
tree | e547bffa88fcbbcff6581d88f27e18840179ab31 /lib/libsndio | |
parent | e201bdd69bc2477fe2bdcd0d75ba843812be9d63 (diff) |
Fix confusion between SIO_xxx and MIO_xxx options (copy & paste error).
Diffstat (limited to 'lib/libsndio')
-rw-r--r-- | lib/libsndio/mio_rmidi.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libsndio/mio_rmidi.c b/lib/libsndio/mio_rmidi.c index 43fef7c4af7..350e4bc9d5a 100644 --- a/lib/libsndio/mio_rmidi.c +++ b/lib/libsndio/mio_rmidi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mio_rmidi.c,v 1.20 2015/11/22 12:01:23 ratchov Exp $ */ +/* $OpenBSD: mio_rmidi.c,v 1.21 2015/11/24 11:03:18 ratchov Exp $ */ /* * Copyright (c) 2008 Alexandre Ratchov <alex@caoua.org> * @@ -83,10 +83,10 @@ mio_rmidi_getfd(const char *str, unsigned int mode, int nbio) return -1; } snprintf(path, sizeof(path), DEVPATH_PREFIX "%u", devnum); - if (mode == (SIO_PLAY | SIO_REC)) + if (mode == (MIO_IN | MIO_OUT)) flags = O_RDWR; else - flags = (mode & SIO_PLAY) ? O_WRONLY : O_RDONLY; + flags = (mode & MIO_IN) ? O_WRONLY : O_RDONLY; while ((fd = open(path, flags | O_NONBLOCK | O_CLOEXEC)) < 0) { if (errno == EINTR) continue; |