On Tue, 16 Aug 2011, Hans Petter Selasky wrote:

Author: hselasky
Date: Tue Aug 16 08:34:16 2011
New Revision: 224903
URL: http://svn.freebsd.org/changeset/base/224903

Log:
 Add missing function to get device speed to the LibUSB v1.0 API.

 MFC after:     1 week
 Approved by:   re (kib)

Modified:
 head/lib/libusb/libusb.h
 head/lib/libusb/libusb10.c

Modified: head/lib/libusb/libusb.h
==============================================================================
--- head/lib/libusb/libusb.h    Tue Aug 16 06:26:51 2011        (r224902)
+++ head/lib/libusb/libusb.h    Tue Aug 16 08:34:16 2011        (r224903)
@@ -151,6 +151,14 @@ enum libusb_error {
        LIBUSB_ERROR_OTHER = -99,
};

+enum libusb_speed {
+       LIBUSB_SPEED_UNKNOWN = 0,
+       LIBUSB_SPEED_LOW = 1,
+       LIBUSB_SPEED_FULL = 2,
+       LIBUSB_SPEED_HIGH = 3,
+       LIBUSB_SPEED_SUPER = 4,
+};
+

*snip*

+enum libusb_speed
+libusb_get_device_speed(libusb_device *dev)
+{
+       if (dev == NULL)
+               return (0);             /* should not happen */

Should that return LIBUSB_SPEED_UNKNOWN instead of 0?

Sean
--
s...@freebsd.org
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to