Hi Paul, if it *really* is more platform independent, then go ahead with the "003" literals ...
however, from DBus i get thos numbers as integers ... and i dont see a point why it would make sense to have them as strings ... what is "more recents libusb's" behaviour in this regard ?!?! however (2nd) i would favour for the -u 1:3 syntax as this is far more intuitive ... and let the owfs-libusb interface code do the string conversion - if libusb really needs it this way ... ;) thanks for all ! regards, marcus. Am Mittwoch, den 12.05.2010, 07:15 -0400 schrieb Paul Alfille: > I want to present a design issue for discussion about the USB adapters. > > We currently have 3 modes of specifying the USB adpter to use: > > -u (which gets the first one) > -u 3 (which gets the 3rd one) > -uall (which gets all) > > Marcus wants to add an additional > > -u 1:3 which would get the adapter listed by lsusb as > > Bus 001 Device 003: ID 04fa:2490 Dallas Semiconductor DS1490F 2-in-1 > Fob, 1-Wire adapter > > I thought this was a nice unambiguous extension to the syntax, until I > looked closely at the field representation in the actual library code. > > The point is that the Bus number is actually a literal "001" and the > Device either "003" or 3 depending on which field you use from libusb. > > The more accurate (and possibly platform independent) way is to > require "001:003" rather than 1:3 but this seems like one of those > annoying "gotchas" if you are entering this at the command line. I > certainly thought 001 and 003 were numbers. > > My first thought was to allow both, and assume the text and it's > decimal (?) interpretation are equivalent. On the other hand, if the > only use for the bus:device form is with automated entries from > scripts, keeping everything literal is easier and less ambiguous. > > Any opinions? > > Paul Alfille > > Incidently, this will add an easy way to create usb entries from udev scripts. > > ------------------------------------------------------------------------------ > > _______________________________________________ > Owfs-developers mailing list > Owfs-developers@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/owfs-developers > ------------------------------------------------------------------------------ _______________________________________________ Owfs-developers mailing list Owfs-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/owfs-developers