summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexandre Ratchov <ratchov@cvs.openbsd.org>2010-06-20 11:32:55 +0000
committerAlexandre Ratchov <ratchov@cvs.openbsd.org>2010-06-20 11:32:55 +0000
commit40f6914df234f53195f128fe7fe159b2ea3ec390 (patch)
treecd3d639e34fb6507510e80fda4809246b5ab62df
parente8594514dec26b3702472dfb4a43a224ec2ee735 (diff)
fix midicat(1) device mode when only -i or only -o is used (ie
open the device input-only if -o is used, and output-only if -i is used).
-rw-r--r--usr.bin/aucat/aucat.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/aucat/aucat.c b/usr.bin/aucat/aucat.c
index e619167a9be..3db6b56a4da 100644
--- a/usr.bin/aucat/aucat.c
+++ b/usr.bin/aucat/aucat.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: aucat.c,v 1.94 2010/06/05 16:00:52 ratchov Exp $ */
+/* $OpenBSD: aucat.c,v 1.95 2010/06/20 11:32:54 ratchov Exp $ */
/*
* Copyright (c) 2008 Alexandre Ratchov <alex@caoua.org>
*
@@ -930,8 +930,8 @@ midicat_main(int argc, char **argv)
cm = SLIST_FIRST(&mids);
SLIST_REMOVE_HEAD(&mids, entry);
if (!dev_thruadd(d, cm->path,
- !SLIST_EMPTY(&ins) || l_flag,
- !SLIST_EMPTY(&outs) || l_flag)) {
+ !SLIST_EMPTY(&outs) || l_flag,
+ !SLIST_EMPTY(&ins) || l_flag)) {
errx(1, "%s: can't open device", cm->path);
}
free(cm);