-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 > > What kind of copy, memcpy()? And just for simplicity? > Yes. Handling strings is a matter of last resort. Okay, I can see that.
> > > + while (bytes_read < IMGSIZE) { > Because you don't want frustrated users hitting ctrl-c and > nothing happens. Especially with an imperfectly understood > device. Also fine with me. Can you give me a hint on how to do so? I suppose the while() needs an additional signal condition.. > The simplest way to do this is to issue the IO operation on > read if the buffer is empty. Now you are returning zero bytes > on a normal read(). That's a violation of POSIX. OK, seems reasonable, too, but where does read() return zero bytes (except at end-of-file, where POSIX requires this)? To issue a read(), the device has to be open()ed first, hasn't it? Yours, Florian - -- Homo homini lupus. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (GNU/Linux) iD8DBQFB5NfN7CzyshGvatgRAjNcAKC7He37mqf1aKO/bLczIVupxlwr/gCghy/+ 4rW6JecQyouwa/EYFR2cITY= =kz0y -----END PGP SIGNATURE----- ------------------------------------------------------- The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel