]> err.no Git - yubikey-personalization.old/commitdiff
Make _ykusb_read return number of read bytes rather than 1.
authorSimon Josefsson <simon@josefsson.org>
Tue, 4 Aug 2009 09:01:36 +0000 (09:01 +0000)
committerSimon Josefsson <simon@josefsson.org>
Tue, 4 Aug 2009 09:01:36 +0000 (09:01 +0000)
Reported by Tollef Fog Heen <tfheen@err.no>.

ykcore/ykcore_libusb.c

index 5f826568ed84a906c9ffb5188397e448f77fe56b..8d8c83539d54ba5c43ae340a5521387ec6041a07 100644 (file)
@@ -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;
 }