netbsd: Add comment about udi_speed values matching libusb enum

Point out that only because NetBSD's #define's for USB speeds happen to
match the corresponding libusb enum values, it's OK to assign struct
usb_device_info's udi_speed field to the struct libusb_devices's speed
field.

References #1230
This commit is contained in:
Edgar Fuß
2023-01-17 16:56:42 +01:00
committed by Tormod Volden
parent 285b292d73
commit e263e32f20
2 changed files with 2 additions and 2 deletions

View File

@@ -148,7 +148,7 @@ netbsd_get_device_list(struct libusb_context * ctx,
dev->bus_number = di.udi_bus;
dev->device_address = di.udi_addr;
dev->speed = di.udi_speed;
dev->speed = di.udi_speed; /* NetBSD #define's happen to match libusb enum */
dpriv = usbi_get_device_priv(dev);
strlcpy(dpriv->devnode, devnode, sizeof(devnode));

View File

@@ -1 +1 @@
#define LIBUSB_NANO 11762
#define LIBUSB_NANO 11763