projects
/
comedi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4696611
)
added munging to kcomedilib
author
Frank Mori Hess
<fmhess@speakeasy.net>
Tue, 16 Sep 2003 00:30:13 +0000
(
00:30
+0000)
committer
Frank Mori Hess
<fmhess@speakeasy.net>
Tue, 16 Sep 2003 00:30:13 +0000
(
00:30
+0000)
comedi/kcomedilib/get.c
patch
|
blob
|
history
diff --git
a/comedi/kcomedilib/get.c
b/comedi/kcomedilib/get.c
index 3146b5b28de938ff969a80a50652e463e9d6d960..2290c33fe6e11af656fed1eadc543f2fcdc3369d 100644
(file)
--- a/
comedi/kcomedilib/get.c
+++ b/
comedi/kcomedilib/get.c
@@
-186,12
+186,14
@@
int comedi_get_buffer_contents( comedi_t *d, unsigned int subdevice )
comedi_device *dev = (comedi_device *)d;
comedi_subdevice *s = dev->subdevices + subdevice;
comedi_async *async;
+ unsigned int num_bytes;
if( subdevice >= dev->n_subdevices ) return -1;
async = s->async;
- if(async == NULL) return 0;
- return async->buf_write_count - async->buf_read_count;
+ num_bytes = comedi_buf_read_n_available(s);
+ comedi_buf_munge( dev, s, async->buf_write_count - async->munge_count );
+ return num_bytes;
}
/*