On 10/26/2014 06:05 PM, Ludovic Rousseau wrote: > 2014-10-24 22:57 GMT+02:00 Hendrik <[email protected]>: >> Hello, > > Hello, > >> i wondered about the error handling in the ReadUSB()/WriteUSB() >> functions in ccid_usb.c. >> >> After the call to libusb_bulk_transfer errno is checked and >> strerror(errno) printed to the log, resulting in confusing logs because >> the return value of libusb_bulk_transfer might indicate an error but >> strerror(errno) returns 'Success'. >> >> The libusb 1.0 API documentation does not mention that errno is set by >> libusb_bulk_transfer, so don't use it. >> >> The attached patch should clean that up and is compile tested. > > Thanks for the patch. > > The problem is that libusb_strerror() has been introduced in "recent" > version of libusb (libusb 1.0.16 from 2013-07-11). > So compiling the driver with "old" Linux distributions (like Debian > stable using libusb 1.0.11) will be problematic. > > The solution would be to use #ifdef in the code. I will try to think > about the problem again. > > Bye, > Hello,
libusb_error_name() could be used as an alternative and should be availble for Debian stable and its older version of libusb. Best regards, Hendrik
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Pcsclite-muscle mailing list [email protected] http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pcsclite-muscle
