svn commit: r224903 - head/lib/libusb

Sean C. Farley scf at FreeBSD.org
Sat Aug 20 01:49:26 UTC 2011


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
-- 
scf at FreeBSD.org


More information about the svn-src-all mailing list