summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorAlexandre Ratchov <ratchov@cvs.openbsd.org>2008-06-02 17:05:13 +0000
committerAlexandre Ratchov <ratchov@cvs.openbsd.org>2008-06-02 17:05:13 +0000
commit7acbe9bac02644fe71bdcff64b6608a143684ea9 (patch)
tree851992f247ca5c7f15b35b56307bbd9410fc35ee /usr.bin
parentaf8d1222b93dc5a82cc0a0e32e4ab53529cea230 (diff)
since underruns/overruns are handled outside devices, remove code that
check for xruns in devices. ok jakemsr
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/aucat/aproc.c10
-rw-r--r--usr.bin/aucat/aucat.c3
-rw-r--r--usr.bin/aucat/file.h4
3 files changed, 3 insertions, 14 deletions
diff --git a/usr.bin/aucat/aproc.c b/usr.bin/aucat/aproc.c
index fa060326135..b1131acdd57 100644
--- a/usr.bin/aucat/aproc.c
+++ b/usr.bin/aucat/aproc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: aproc.c,v 1.3 2008/06/02 17:03:25 ratchov Exp $ */
+/* $OpenBSD: aproc.c,v 1.4 2008/06/02 17:05:12 ratchov Exp $ */
/*
* Copyright (c) 2008 Alexandre Ratchov <alex@caoua.org>
*
@@ -104,9 +104,6 @@ rpipe_in(struct aproc *p, struct abuf *ibuf_dummy)
unsigned char *data;
unsigned count;
- if (!(f->state & FILE_RFLOW) && ABUF_FULL(obuf))
- errx(1, "%s: overrun, unimplemented", f->name);
-
if (ABUF_FULL(obuf))
return 0;
data = abuf_wgetblk(obuf, &count, 0);
@@ -167,7 +164,6 @@ rpipe_new(struct file *f)
p->u.io.file = f;
f->rproc = p;
f->events |= POLLIN;
- f->state |= FILE_RFLOW;
return p;
}
@@ -208,9 +204,6 @@ wpipe_out(struct aproc *p, struct abuf *obuf_dummy)
unsigned char *data;
unsigned count;
- if (!(f->state & FILE_WFLOW) && ABUF_EMPTY(ibuf))
- errx(1, "%s: underrun, unimplemented", f->name);
-
if (ABUF_EMPTY(ibuf))
return 0;
data = abuf_rgetblk(ibuf, &count, 0);
@@ -256,7 +249,6 @@ wpipe_new(struct file *f)
p->u.io.file = f;
f->wproc = p;
f->events |= POLLOUT;
- f->state |= FILE_WFLOW;
return p;
}
diff --git a/usr.bin/aucat/aucat.c b/usr.bin/aucat/aucat.c
index 499f332a156..5424d37292d 100644
--- a/usr.bin/aucat/aucat.c
+++ b/usr.bin/aucat/aucat.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: aucat.c,v 1.19 2008/06/02 17:04:32 ratchov Exp $ */
+/* $OpenBSD: aucat.c,v 1.20 2008/06/02 17:05:12 ratchov Exp $ */
/*
* Copyright (c) 2008 Alexandre Ratchov <alex@caoua.org>
*
@@ -644,7 +644,6 @@ main(int argc, char **argv)
if (!quiet_flag)
fprintf(stderr, "starting device...\n");
dev_start(dev->fd);
- dev->state &= ~(FILE_RFLOW | FILE_WFLOW);
while (!quit_flag) {
if (!file_poll())
break;
diff --git a/usr.bin/aucat/file.h b/usr.bin/aucat/file.h
index f81a729a7ad..9e3adcfff25 100644
--- a/usr.bin/aucat/file.h
+++ b/usr.bin/aucat/file.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: file.h,v 1.1 2008/05/23 07:15:46 ratchov Exp $ */
+/* $OpenBSD: file.h,v 1.2 2008/06/02 17:05:12 ratchov Exp $ */
/*
* Copyright (c) 2008 Alexandre Ratchov <alex@caoua.org>
*
@@ -36,8 +36,6 @@ struct file {
#define FILE_WOK 0x2 /* file writable */
#define FILE_EOF 0x4 /* eof on the read end */
#define FILE_HUP 0x8 /* eof on the write end */
-#define FILE_RFLOW 0x10 /* has flow control on read() */
-#define FILE_WFLOW 0x20 /* has flow control on write() */
int state; /* one of above */
char *name; /* for debug purposes */
struct aproc *rproc, *wproc; /* reader and/or writer */