Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F140030154
D54296.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
634 B
Referenced Files
None
Subscribers
None
D54296.id.diff
View Options
diff --git a/lib/libusb/libusb10.c b/lib/libusb/libusb10.c
--- a/lib/libusb/libusb10.c
+++ b/lib/libusb/libusb10.c
@@ -639,7 +639,20 @@
err = libusb20_dev_open(pdev, LIBUSB_NUM_SW_ENDPOINTS);
if (err) {
libusb_unref_device(dev);
- return (LIBUSB_ERROR_NO_MEM);
+ switch (err) {
+ /*
+ * These are all equal in value to
+ * their LIBUSB_ERROR_* counterparts.
+ */
+ case LIBUSB20_ERROR_ACCESS:
+ case LIBUSB20_ERROR_BUSY:
+ case LIBUSB20_ERROR_INVALID_PARAM:
+ case LIBUSB20_ERROR_NO_DEVICE:
+ case LIBUSB20_ERROR_NO_MEM:
+ return (err);
+ default:
+ return (LIBUSB_ERROR_OTHER);
+ }
}
/*
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Dec 20, 7:01 AM (12 h, 59 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
27087245
Default Alt Text
D54296.id.diff (634 B)
Attached To
Mode
D54296: PR 291774: expand range of errors reported by libusb_open(3)
Attached
Detach File
Event Timeline
Log In to Comment