From: Simon Josefsson Date: Tue, 4 Aug 2009 09:01:36 +0000 (+0000) Subject: Make _ykusb_read return number of read bytes rather than 1. X-Git-Tag: yubikey-personalisation_1.3.5-1~4^2~123 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0dfa4fa2c96738a59e8b6c0b0d43ea90c4ad5e6f;p=yubikey-personalization.old Make _ykusb_read return number of read bytes rather than 1. Reported by Tollef Fog Heen . --- diff --git a/ykcore/ykcore_libusb.c b/ykcore/ykcore_libusb.c index 5f82656..8d8c835 100644 --- a/ykcore/ykcore_libusb.c +++ b/ykcore/ykcore_libusb.c @@ -120,7 +120,7 @@ int _ykusb_read(void *dev, int report_type, int report_number, rc = rc2; } if (rc >= 0) - return 1; + return rc; yk_errno = YK_EUSBERR; return 0; }