From: Seagull <se...@ar...> - 2001-08-06 14:59:33
|
> ....BUT - if you are writing a piece if code which interacts with a > device you usually know perfectly well what _your_ device their R/W > characteristics are. So you can just as well do the R/W right ! There's only one problem with this approach: you never know what device is going to be attached to your bus. /dev/ugen0 can be an MP3 player one day, or a Web camera the next...each device would have it's own characteristics. Some might require a bulk pipe to be open for reading, others may need both reading and writing. If you don't make the endpoint devices readable and writeable by the user (I am referring to the actual permissions on the device files), then some USB devices will work and some won't. This kind of inconsistency is what one would try to avoid. :) > I really see this sort of open without a flag a 'lazy' thing - likely to > be very painful in say, a university, environemnt where you do not want to > have anyone have access to verything all the time. In a Univesity environment, I would suspect one would not want to provide generic device access at all (don't include ugen). But that's beside the point. Either way, the current sources for libusb don't work under BSD. So there's a choice: - open the endpoints O_RDWR all the time - close and reopen the endpoints as needed I haven't test the latter, but will do so today and will submit a patch that implements it. Cheers, -+JLS -- \ carpe cavy! seagull @ aracnet.com \ http://www.aracnet.com/~seagull \ (seize the guinea pig!) |