ugen partial write() amount

Anish Mistry mistry.7 at osu.edu
Fri Jun 16 21:23:59 UTC 2006


	I'm trying to reliably recover from a write() timeout using ugen.  
The problem that I'm having is that when using write() to write data 
to an endpoint and the write times out there seems no way to figure 
out the amount of that data that was actually written.  This is a 
problem when trying to write data to a printer and the paper runs 
out.  write() will timeout and you are left with no way to figure out 
where to start sending data since you don't know how much was 
received by the device before the paper ran out.
	It seems this could be possible by modifying the driver by adding and 
ioctl that would allow you to call bulk transfer and then return the 
number of bytes written.  Is there a better way of doing?

-- 
Anish Mistry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-usb/attachments/20060616/245bc083/attachment.pgp


More information about the freebsd-usb mailing list