usb 2.16.0 → 2.18.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (114) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/README.md +14 -0
  3. package/binding.gyp +2 -9
  4. package/dist/usb/bindings.d.ts +27 -2
  5. package/dist/usb/bindings.js.map +1 -1
  6. package/dist/usb/endpoint.js +1 -1
  7. package/dist/usb/endpoint.js.map +1 -1
  8. package/dist/usb/index.d.ts +0 -29
  9. package/dist/usb/index.js +4 -18
  10. package/dist/usb/index.js.map +1 -1
  11. package/dist/webusb/index.d.ts +1 -1
  12. package/dist/webusb/index.js +1 -1
  13. package/dist/webusb/index.js.map +1 -1
  14. package/dist/webusb/webusb-device.d.ts +4 -4
  15. package/dist/webusb/webusb-device.js +5 -2
  16. package/dist/webusb/webusb-device.js.map +1 -1
  17. package/libusb/.clang-tidy +36 -0
  18. package/libusb/.private/ci-build.sh +5 -1
  19. package/libusb/AUTHORS +21 -0
  20. package/libusb/ChangeLog +29 -2
  21. package/libusb/KEYS +123 -0
  22. package/libusb/README +8 -9
  23. package/libusb/Xcode/common.xcconfig +20 -0
  24. package/libusb/Xcode/libusb.xcodeproj/project.pbxproj +16 -12
  25. package/libusb/android/examples/unrooted_android.c +1 -0
  26. package/libusb/configure.ac +12 -2
  27. package/libusb/examples/dpfp.c +1 -1
  28. package/libusb/examples/ezusb.c +6 -1
  29. package/libusb/examples/fxload.c +7 -5
  30. package/libusb/examples/hotplugtest.c +19 -11
  31. package/libusb/examples/listdevs.c +41 -3
  32. package/libusb/examples/testlibusb.c +1 -0
  33. package/libusb/examples/xusb.c +142 -77
  34. package/libusb/libusb/Makefile.am +4 -0
  35. package/libusb/libusb/core.c +183 -24
  36. package/libusb/libusb/descriptor.c +404 -96
  37. package/libusb/libusb/hotplug.c +27 -8
  38. package/libusb/libusb/io.c +10 -5
  39. package/libusb/libusb/libusb-1.0.def +14 -0
  40. package/libusb/libusb/libusb.h +179 -19
  41. package/libusb/libusb/libusbi.h +101 -25
  42. package/libusb/libusb/os/darwin_usb.c +216 -90
  43. package/libusb/libusb/os/darwin_usb.h +10 -8
  44. package/libusb/libusb/os/emscripten_webusb.cpp +38 -12
  45. package/libusb/libusb/os/events_posix.c +4 -4
  46. package/libusb/libusb/os/haiku_usb_raw.cpp +4 -0
  47. package/libusb/libusb/os/linux_usbfs.c +92 -33
  48. package/libusb/libusb/os/linux_usbfs.h +13 -3
  49. package/libusb/libusb/os/netbsd_usb.c +6 -4
  50. package/libusb/libusb/os/openbsd_usb.c +4 -2
  51. package/libusb/libusb/os/sunos_usb.c +7 -5
  52. package/libusb/libusb/os/threads_posix.c +20 -19
  53. package/libusb/libusb/os/threads_posix.h +9 -3
  54. package/libusb/libusb/os/threads_windows.h +4 -3
  55. package/libusb/libusb/os/windows_common.c +86 -1
  56. package/libusb/libusb/os/windows_common.h +20 -1
  57. package/libusb/libusb/os/windows_hotplug.c +321 -0
  58. package/libusb/libusb/os/windows_hotplug.h +28 -0
  59. package/libusb/libusb/os/windows_usbdk.c +16 -8
  60. package/libusb/libusb/os/windows_winusb.c +788 -56
  61. package/libusb/libusb/os/windows_winusb.h +11 -6
  62. package/libusb/libusb/sync.c +8 -5
  63. package/libusb/libusb/version.h +1 -1
  64. package/libusb/libusb/version_nano.h +1 -1
  65. package/libusb/msvc/Base.props +1 -1
  66. package/libusb/msvc/Configuration.Base.props +2 -1
  67. package/libusb/msvc/Configuration.DynamicLibrary.props +12 -0
  68. package/libusb/msvc/ProjectConfigurations.Base.props +69 -16
  69. package/libusb/msvc/build_all.ps1 +2 -2
  70. package/libusb/msvc/config.h +4 -0
  71. package/libusb/msvc/getopt/bits/getopt_core.h +96 -0
  72. package/libusb/msvc/getopt/bits/getopt_ext.h +77 -0
  73. package/libusb/msvc/getopt/features.h +21 -0
  74. package/libusb/msvc/getopt/getopt.c +456 -705
  75. package/libusb/msvc/getopt/getopt.h +16 -158
  76. package/libusb/msvc/getopt/getopt1.c +40 -69
  77. package/libusb/msvc/getopt/getopt_int.h +118 -0
  78. package/libusb/msvc/getopt/gettext.h +7 -0
  79. package/libusb/msvc/getopt/unistd.h +5 -0
  80. package/libusb/msvc/getopt.vcxproj +11 -4
  81. package/libusb/msvc/libusb.sln +515 -268
  82. package/libusb/msvc/libusb_dll.vcxproj +2 -0
  83. package/libusb/msvc/libusb_static.vcxproj +2 -0
  84. package/libusb/msvc/xusb.vcxproj +1 -1
  85. package/libusb/tests/Makefile.am +10 -1
  86. package/libusb/tests/fuzz/corpus/bos/min.bos +0 -0
  87. package/libusb/tests/fuzz/corpus/descriptor_parsers/min_valid_config.bin +0 -0
  88. package/libusb/tests/fuzz/corpus/descriptor_parsers/regression_bug_a_endpoint_null.bin +0 -0
  89. package/libusb/tests/fuzz/corpus/descriptor_parsers/regression_bug_b_iad_oob.bin +0 -0
  90. package/libusb/tests/fuzz/fuzz_bos_descriptor.c +49 -0
  91. package/libusb/tests/fuzz/fuzz_descriptor_parsers.c +83 -0
  92. package/libusb/tests/macos.c +2 -2
  93. package/libusb/tests/stress_mt.c +6 -3
  94. package/libusb/tests/webusb-test-shim/index.js +6 -5
  95. package/libusb.gypi +5 -0
  96. package/package.json +3 -3
  97. package/prebuilds/android-arm/node.napi.armv7.node +0 -0
  98. package/prebuilds/android-arm64/node.napi.armv8.node +0 -0
  99. package/prebuilds/darwin-x64+arm64/node.napi.node +0 -0
  100. package/prebuilds/linux-arm/node.napi.armv6.node +0 -0
  101. package/prebuilds/linux-arm/node.napi.armv7.node +0 -0
  102. package/prebuilds/linux-arm64/node.napi.armv8.node +0 -0
  103. package/prebuilds/linux-ia32/node.napi.node +0 -0
  104. package/prebuilds/linux-x64/node.napi.glibc.node +0 -0
  105. package/prebuilds/linux-x64/node.napi.musl.node +0 -0
  106. package/prebuilds/win32-arm64/node.napi.node +0 -0
  107. package/prebuilds/win32-ia32/node.napi.node +0 -0
  108. package/prebuilds/win32-x64/node.napi.node +0 -0
  109. package/src/{hotplug/libusb.cc → hotplug.cc} +2 -3
  110. package/src/{hotplug/hotplug.h → hotplug.h} +2 -6
  111. package/src/node_usb.cc +3 -3
  112. package/test/usb.coffee +4 -4
  113. package/test/webusb.coffee +22 -12
  114. package/src/hotplug/windows.cc +0 -168
package/libusb/ChangeLog CHANGED
@@ -1,5 +1,32 @@
1
- For detailed information about the changes below, please see the git log
2
- or visit: http://log.libusb.info
1
+ For detailed information about the changes below, please see the git log.
2
+
3
+ 2026-05-17: v1.0.30
4
+ * Add hotplug support on Microsoft Windows
5
+ * Add RAW_IO support in WinUSB backend
6
+ * Work around a macOS 26 Tahoe compatibility breakage due to Apple changing kUSBHostPortPropertyPortNumber
7
+ * Add new API libusb_get_device_string() to access device strings without opening the device
8
+ * Add new API libusb_get_session_data() which returns the OS-specific handle
9
+ * Fix device removal races on non-hotplug builds
10
+ * Improve descriptor parsing memory safety
11
+ * On Darwin, fix concurrency issues
12
+ * On Android, fix intermittent failures in get_usbfs_fd()
13
+ * On Windows, fix bus number assignment for root hub device, preventing duplicate bus number assignments
14
+ * Fix compilation with Microsoft Visual Studio 2026
15
+ * Fix various compiler warnings, improved tests and examples
16
+
17
+ 2025-06-01: v1.0.29
18
+ * Fix regression on macOS leading to timeouts in enumeration
19
+ * LIBUSB_API_VERSION bump for the new functions in 1.0.28
20
+ * Fix xusb regression displaying wrong error on claim failure
21
+
22
+ 2025-03-18: v1.0.28
23
+ * New libusb_get_ssplus_usb_device_capability_descriptor API
24
+ for query of SuperSpeed+ Capability Descriptors
25
+ * API support for reporting USB 3.2 Gen2x2 speeds
26
+ * macOS: Fix Zero-Length Packet for multiple packets per frame
27
+ * Windows: Base HID device descriptor on OS-cached values
28
+ * Build fixes for Haiku and SunOS
29
+ * Many code correctness fixes
3
30
 
4
31
  2024-01-31: v1.0.27
5
32
  * New libusb_init_context API to replace libusb_init
package/libusb/KEYS ADDED
@@ -0,0 +1,123 @@
1
+ This file contains the PGP keys of libusb release managers.
2
+
3
+ Users:
4
+ pgp < KEYS
5
+ or
6
+ gpg --import KEYS
7
+
8
+ Maintainers:
9
+ pgp -kxa <your name> and append it to this file.
10
+ or
11
+ (pgpk -ll <your name> && pgpk -xa <your name>) >> this file.
12
+ or
13
+ (gpg --list-sigs <your name> && gpg --armor --export <your name>) >> this file.
14
+
15
+ pub rsa4096 2020-06-23 [SC]
16
+ C68187379B23DE9EFC46651E2C80FF56C6830A0E
17
+ uid [ultimate] Tormod Volden <debian.tormod@gmail.com>
18
+ sub rsa4096 2020-06-23 [E]
19
+ sub rsa4096 2020-06-23 [S]
20
+
21
+ -----BEGIN PGP PUBLIC KEY BLOCK-----
22
+
23
+ mQINBF7yPL0BEADQc/2dx8H7a7r1SGYph5hmkszs0O9V/43m8XhNnbnFraXjmbEv
24
+ xm2wE6AuR301mjAqYSt/mphmH54z4GBbgmLBrK8TGdhlK0K11PeSudRN4jsLs+U3
25
+ ErtkAHODmzyg7QiW3GWudP/lJQRSqNBoadeOdOsKMoJxm7T2a9fyyf8FR/FfShjv
26
+ NB62jSWq0x0WnglI/V/ZOi/mOnqoggCoWXLzwqbKasicvfNsTPJIsjiu24US6mif
27
+ nRllMWr/6aHyCOX6+x6PsQ35NF5C5B7b0c1fY7zU/UiM/JBF4HDf7jltzTIjHjho
28
+ jTwcEkCVmunW+jSwjsLcr/zkOsu1re0W/VJJNXOhSnNUDpM7t9FeSfJ0LGlXYnGI
29
+ 5ZUCQ8w4RcKmkHYhepCjDVWYkCmxmTgO7LaAXZ5S0GeOoSDsvHNHYywAXNmB6A0s
30
+ 3kv/8i3wT8K1w9972eYW+NA6T7BfdbNk/EKxZQ74eezpRWDDPEl/zehoHQoPO3m1
31
+ N2b06nnSKLv263IJAPdpLPUJowYdWnvmw/wyakeBMRJdI1FsDkEdI2KAvQxRKHfU
32
+ /cTtMEJuGGR5qyze4jMHUuVqSvEsoXmSA2OLcWeZyn12jfd0CrGbCZ7jZ0R7Q1Ab
33
+ cZ7hPsLKtgKHKyrmAdlmTgpOb2K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m
111
+ n5ba3xTKRSS8D/44K3JJSPi2urzO+wXtcbZ1QSWypTV8dI7zLImySMmBtU7GEKLe
112
+ y8klXAQBnzyKTFrsS60A0JiNGbzw75kAi2677jgvEtzz0QAxvJUCianFT9QCqcxQ
113
+ okh/W8klVaJGLucAD5CRTLc9F4TNGV1jsHf90McWWf/bKANz875PZUDqMDtQ6hqH
114
+ Udn4AxVaLn1dAqn2ae3DQK043jViy7IivilQLLo5mmkGLs0bPQZgG4OBB0mgzS8Z
115
+ t2/3zJUvS/ygea0vqMzleEMlBJXWMyh6S8upEJVGdJfuMfRbOpvRBXZULLKwBVLn
116
+ /vcB6QianT31AtxpWRtXjk52DxrqP85jMZtrlXWECmOanNM41cN/hoVVcXYLYYrt
117
+ f8ZYM4cjB744M3XqCjh8aw8p8sg/sMQ4yJMlLuS6tGR/4WS1EU+Rq3ukg5jFfAQ/
118
+ PfXrj4iCFjUBD4CnRAQIXhPCqMl6hFMZw61BpKFpZNLlJ205R+elqGBbrLibhu3u
119
+ RAeFxk23S035hxBZnC2CDQL7zLwnzk1DPx6ywS6ky2qENwISR9tNldehFuPHXnSf
120
+ 5/DxUzfWd2Tj35vxZDhKjJ1HiT3o++HKCRX9cP/cALsd5zvIxSVN6RRCUI2U8N+b
121
+ k5/dfKNq8Q4FX9TZFSBnWudih+bT74v5f4LwhidPgOiYugiLoJh2ZqIVvQ==
122
+ =5EaQ
123
+ -----END PGP PUBLIC KEY BLOCK-----
package/libusb/README CHANGED
@@ -1,9 +1,5 @@
1
1
  # libusb
2
2
 
3
- [![Build Status](https://travis-ci.org/libusb/libusb.svg?branch=master)](https://travis-ci.org/libusb/libusb)
4
- [![Build Status](https://ci.appveyor.com/api/projects/status/xvrfam94jii4a6lw?svg=true)](https://ci.appveyor.com/project/LudovicRousseau/libusb)
5
- [![Coverity Scan Build Status](https://scan.coverity.com/projects/2180/badge.svg)](https://scan.coverity.com/projects/libusb-libusb)
6
-
7
3
  libusb is a library for USB device access from Linux, macOS,
8
4
  Windows, OpenBSD/NetBSD, Haiku, Solaris userspace, and WebAssembly
9
5
  via WebUSB.
@@ -24,10 +20,13 @@ http://api.libusb.info
24
20
  Use the mailing list for questions, comments, etc:
25
21
  http://mailing-list.libusb.info
26
22
 
27
- - Hans de Goede <hdegoede@redhat.com>
28
- - Xiaofan Chen <xiaofanc@gmail.com>
29
- - Ludovic Rousseau <ludovic.rousseau@gmail.com>
30
- - Nathan Hjelm <hjelmn@cs.unm.edu>
31
- - Chris Dickens <christopher.a.dickens@gmail.com>
23
+ - Tormod Volden
24
+ - Sylvain Fasel
25
+ - Sean McBride
26
+ - Nathan Hjelm
27
+ - Xiaofan Chen
28
+ - Hans de Goede
29
+ - Ludovic Rousseau
30
+ - Chris Dickens
32
31
 
33
32
  (Please use the mailing list rather than mailing developers directly)
@@ -65,6 +65,26 @@ CLANG_WARN_INT_CONVERSION = YES
65
65
  CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES
66
66
  CLANG_WARN_STRICT_PROTOTYPES = YES
67
67
  CLANG_WARN_SUSPICIOUS_IMPLICIT_CONVERSION = YES
68
+ CLANG_WARN_COMPLETION_HANDLER_MISUSE = YES
69
+ CLANG_WARN_IMPLICIT_FALLTHROUGH = YES
70
+ CLANG_WARN_FRAMEWORK_INCLUDE_PRIVATE_FROM_PUBLIC = YES
71
+ CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES
72
+ CLANG_WARN_SEMICOLON_BEFORE_METHOD_BODY = YES
73
+ GCC_WARN_SIGN_COMPARE = YES
74
+ CLANG_WARN__EXIT_TIME_DESTRUCTORS = YES
75
+ GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES
76
+ GCC_WARN_HIDDEN_VIRTUAL_FUNCTIONS = YES
77
+ CLANG_WARN_ATOMIC_IMPLICIT_SEQ_CST = YES
78
+ CLANG_WARN_OBJC_IMPLICIT_ATOMIC_PROPERTIES = YES
79
+ CLANG_WARN_OBJC_INTERFACE_IVARS = YES
80
+ GCC_WARN_STRICT_SELECTOR_MATCH = YES
81
+ CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES
82
+ CLANG_WARN_UNREACHABLE_CODE = YES
83
+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES
84
+ CLANG_WARN_SUSPICIOUS_MOVE = YES
85
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES
86
+ CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES
87
+ GCC_WARN_UNDECLARED_SELECTOR = YES
68
88
 
69
89
  // Static analyzer warnings.
70
90
  CLANG_ANALYZER_NONNULL = YES
@@ -231,22 +231,22 @@
231
231
 
232
232
  /* Begin PBXFileReference section */
233
233
  006AD41C1C8C5A90007F8C6A /* hotplugtest */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = hotplugtest; sourceTree = BUILT_PRODUCTS_DIR; };
234
- 006AD4231C8C5AAE007F8C6A /* hotplugtest.c */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.c; path = hotplugtest.c; sourceTree = "<group>"; tabWidth = 4; usesTabs = 1; };
234
+ 006AD4231C8C5AAE007F8C6A /* hotplugtest.c */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 8; lastKnownFileType = sourcecode.c.c; path = hotplugtest.c; sourceTree = "<group>"; tabWidth = 8; usesTabs = 1; };
235
235
  008A23C6236C8445004854AA /* stress.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = stress.c; sourceTree = "<group>"; usesTabs = 1; };
236
236
  008A23CA236C849A004854AA /* libusb_testlib.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = libusb_testlib.h; sourceTree = "<group>"; usesTabs = 1; };
237
237
  008A23CB236C849A004854AA /* testlib.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testlib.c; sourceTree = "<group>"; usesTabs = 1; };
238
238
  008A23D3236C8594004854AA /* stress */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = stress; sourceTree = BUILT_PRODUCTS_DIR; };
239
239
  008FBF311628B79300BC5BE2 /* libusb-1.0.0.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = "libusb-1.0.0.dylib"; sourceTree = BUILT_PRODUCTS_DIR; };
240
- 008FBF541628B7E800BC5BE2 /* core.c */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.c; path = core.c; sourceTree = "<group>"; tabWidth = 4; usesTabs = 1; };
241
- 008FBF551628B7E800BC5BE2 /* descriptor.c */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.c; path = descriptor.c; sourceTree = "<group>"; tabWidth = 4; usesTabs = 1; };
242
- 008FBF561628B7E800BC5BE2 /* io.c */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.c; path = io.c; sourceTree = "<group>"; tabWidth = 4; usesTabs = 1; };
240
+ 008FBF541628B7E800BC5BE2 /* core.c */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 8; lastKnownFileType = sourcecode.c.c; path = core.c; sourceTree = "<group>"; tabWidth = 8; usesTabs = 1; };
241
+ 008FBF551628B7E800BC5BE2 /* descriptor.c */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 8; lastKnownFileType = sourcecode.c.c; path = descriptor.c; sourceTree = "<group>"; tabWidth = 8; usesTabs = 1; };
242
+ 008FBF561628B7E800BC5BE2 /* io.c */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 8; lastKnownFileType = sourcecode.c.c; path = io.c; sourceTree = "<group>"; tabWidth = 8; usesTabs = 1; };
243
243
  008FBF5A1628B7E800BC5BE2 /* libusb.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = libusb.h; sourceTree = "<group>"; tabWidth = 4; usesTabs = 1; };
244
244
  008FBF671628B7E800BC5BE2 /* libusbi.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = libusbi.h; sourceTree = "<group>"; tabWidth = 4; usesTabs = 1; };
245
245
  008FBF6C1628B7E800BC5BE2 /* darwin_usb.c */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.c; path = darwin_usb.c; sourceTree = "<group>"; tabWidth = 2; usesTabs = 0; };
246
246
  008FBF6D1628B7E800BC5BE2 /* darwin_usb.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; path = darwin_usb.h; sourceTree = "<group>"; tabWidth = 2; usesTabs = 0; };
247
247
  008FBF741628B7E800BC5BE2 /* threads_posix.c */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.c; path = threads_posix.c; sourceTree = "<group>"; tabWidth = 4; usesTabs = 1; };
248
248
  008FBF751628B7E800BC5BE2 /* threads_posix.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = threads_posix.h; sourceTree = "<group>"; tabWidth = 4; usesTabs = 1; };
249
- 008FBF7A1628B7E800BC5BE2 /* sync.c */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.c; path = sync.c; sourceTree = "<group>"; tabWidth = 4; usesTabs = 1; };
249
+ 008FBF7A1628B7E800BC5BE2 /* sync.c */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 8; lastKnownFileType = sourcecode.c.c; path = sync.c; sourceTree = "<group>"; tabWidth = 8; usesTabs = 1; };
250
250
  008FBF7B1628B7E800BC5BE2 /* version.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = version.h; sourceTree = "<group>"; tabWidth = 4; usesTabs = 1; };
251
251
  008FBF7C1628B7E800BC5BE2 /* version_nano.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = version_nano.h; sourceTree = "<group>"; tabWidth = 4; usesTabs = 1; };
252
252
  008FBFA41628B84200BC5BE2 /* config.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = config.h; sourceTree = "<group>"; tabWidth = 4; usesTabs = 1; };
@@ -264,7 +264,7 @@
264
264
  008FC0051628BBDB00BC5BE2 /* dpfp_threaded */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = dpfp_threaded; sourceTree = BUILT_PRODUCTS_DIR; };
265
265
  008FC0151628BC0300BC5BE2 /* fxload */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = fxload; sourceTree = BUILT_PRODUCTS_DIR; };
266
266
  008FC0261628BC6B00BC5BE2 /* listdevs */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = listdevs; sourceTree = BUILT_PRODUCTS_DIR; };
267
- 1438D77817A2ED9F00166101 /* hotplug.c */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.c; path = hotplug.c; sourceTree = "<group>"; tabWidth = 4; usesTabs = 1; };
267
+ 1438D77817A2ED9F00166101 /* hotplug.c */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 8; lastKnownFileType = sourcecode.c.c; path = hotplug.c; sourceTree = "<group>"; tabWidth = 8; usesTabs = 1; };
268
268
  1438D77E17A2F0EA00166101 /* strerror.c */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.c; path = strerror.c; sourceTree = "<group>"; tabWidth = 4; usesTabs = 1; };
269
269
  1443EE8416417E63007E0579 /* common.xcconfig */ = {isa = PBXFileReference; indentWidth = 4; lastKnownFileType = text.xcconfig; path = common.xcconfig; sourceTree = SOURCE_ROOT; tabWidth = 4; usesTabs = 1; };
270
270
  1443EE8516417E63007E0579 /* debug.xcconfig */ = {isa = PBXFileReference; indentWidth = 4; lastKnownFileType = text.xcconfig; path = debug.xcconfig; sourceTree = SOURCE_ROOT; tabWidth = 4; usesTabs = 1; };
@@ -272,23 +272,25 @@
272
272
  1443EE8716417E63007E0579 /* libusb.xcconfig */ = {isa = PBXFileReference; indentWidth = 4; lastKnownFileType = text.xcconfig; path = libusb.xcconfig; sourceTree = SOURCE_ROOT; tabWidth = 4; usesTabs = 1; };
273
273
  1443EE8816417E63007E0579 /* release.xcconfig */ = {isa = PBXFileReference; indentWidth = 4; lastKnownFileType = text.xcconfig; path = release.xcconfig; sourceTree = SOURCE_ROOT; tabWidth = 4; usesTabs = 1; };
274
274
  1443EE8916417EA6007E0579 /* libusb_release.xcconfig */ = {isa = PBXFileReference; indentWidth = 4; lastKnownFileType = text.xcconfig; path = libusb_release.xcconfig; sourceTree = SOURCE_ROOT; tabWidth = 4; usesTabs = 1; };
275
+ 145F5D8D2E60B46B004ABA5D /* windows_hotplug.h */ = {isa = PBXFileReference; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = windows_hotplug.h; sourceTree = "<group>"; tabWidth = 4; usesTabs = 0; };
276
+ 145F5D8E2E60B46B004ABA5D /* windows_hotplug.c */ = {isa = PBXFileReference; indentWidth = 4; lastKnownFileType = sourcecode.c.c; path = windows_hotplug.c; sourceTree = "<group>"; tabWidth = 4; usesTabs = 0; };
275
277
  14EC13E12B3D5BA600CF9AD0 /* emscripten_webusb.cpp */ = {isa = PBXFileReference; indentWidth = 4; lastKnownFileType = sourcecode.cpp.cpp; path = emscripten_webusb.cpp; sourceTree = "<group>"; tabWidth = 4; usesTabs = 0; };
276
278
  14EC13E22B3D5BBE00CF9AD0 /* sunos_usb.h */ = {isa = PBXFileReference; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = sunos_usb.h; sourceTree = "<group>"; tabWidth = 4; usesTabs = 0; };
277
279
  14EC13E32B3D5BBE00CF9AD0 /* openbsd_usb.c */ = {isa = PBXFileReference; indentWidth = 4; lastKnownFileType = sourcecode.c.c; path = openbsd_usb.c; sourceTree = "<group>"; tabWidth = 4; usesTabs = 0; };
278
280
  14EC13E42B3D5BBE00CF9AD0 /* netbsd_usb.c */ = {isa = PBXFileReference; indentWidth = 4; lastKnownFileType = sourcecode.c.c; path = netbsd_usb.c; sourceTree = "<group>"; tabWidth = 4; usesTabs = 0; };
279
281
  14EC13E52B3D5BBE00CF9AD0 /* events_windows.c */ = {isa = PBXFileReference; indentWidth = 4; lastKnownFileType = sourcecode.c.c; path = events_windows.c; sourceTree = "<group>"; tabWidth = 4; usesTabs = 0; };
280
282
  14EC13E62B3D5BBE00CF9AD0 /* haiku_usb_raw.h */ = {isa = PBXFileReference; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = haiku_usb_raw.h; sourceTree = "<group>"; tabWidth = 4; usesTabs = 0; };
281
- 14EC13E72B3D5BBE00CF9AD0 /* linux_netlink.c */ = {isa = PBXFileReference; indentWidth = 4; lastKnownFileType = sourcecode.c.c; path = linux_netlink.c; sourceTree = "<group>"; tabWidth = 4; usesTabs = 0; };
283
+ 14EC13E72B3D5BBE00CF9AD0 /* linux_netlink.c */ = {isa = PBXFileReference; indentWidth = 8; lastKnownFileType = sourcecode.c.c; path = linux_netlink.c; sourceTree = "<group>"; tabWidth = 8; usesTabs = 1; };
282
284
  14EC13E82B3D5BBE00CF9AD0 /* haiku_usb_backend.cpp */ = {isa = PBXFileReference; indentWidth = 4; lastKnownFileType = sourcecode.cpp.cpp; path = haiku_usb_backend.cpp; sourceTree = "<group>"; tabWidth = 4; usesTabs = 0; };
283
285
  14EC13E92B3D5BBE00CF9AD0 /* haiku_usb_raw.cpp */ = {isa = PBXFileReference; indentWidth = 4; lastKnownFileType = sourcecode.cpp.cpp; path = haiku_usb_raw.cpp; sourceTree = "<group>"; tabWidth = 4; usesTabs = 0; };
284
286
  14EC13EA2B3D5BBE00CF9AD0 /* linux_usbfs.h */ = {isa = PBXFileReference; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = linux_usbfs.h; sourceTree = "<group>"; tabWidth = 4; usesTabs = 0; };
285
287
  14EC13EB2B3D5BBE00CF9AD0 /* sunos_usb.c */ = {isa = PBXFileReference; indentWidth = 4; lastKnownFileType = sourcecode.c.c; path = sunos_usb.c; sourceTree = "<group>"; tabWidth = 4; usesTabs = 0; };
286
- 14EC13EC2B3D5BBE00CF9AD0 /* linux_udev.c */ = {isa = PBXFileReference; indentWidth = 4; lastKnownFileType = sourcecode.c.c; path = linux_udev.c; sourceTree = "<group>"; tabWidth = 4; usesTabs = 0; };
288
+ 14EC13EC2B3D5BBE00CF9AD0 /* linux_udev.c */ = {isa = PBXFileReference; indentWidth = 8; lastKnownFileType = sourcecode.c.c; path = linux_udev.c; sourceTree = "<group>"; tabWidth = 8; usesTabs = 1; };
287
289
  14EC13ED2B3D5BBE00CF9AD0 /* haiku_usb.h */ = {isa = PBXFileReference; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = haiku_usb.h; sourceTree = "<group>"; tabWidth = 4; usesTabs = 0; };
288
290
  14EC13EE2B3D5BBE00CF9AD0 /* events_windows.h */ = {isa = PBXFileReference; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = events_windows.h; sourceTree = "<group>"; tabWidth = 4; usesTabs = 0; };
289
291
  14EC13EF2B3D5BBE00CF9AD0 /* null_usb.c */ = {isa = PBXFileReference; indentWidth = 4; lastKnownFileType = sourcecode.c.c; path = null_usb.c; sourceTree = "<group>"; tabWidth = 4; usesTabs = 0; };
290
292
  14EC13F02B3D5BBE00CF9AD0 /* haiku_pollfs.cpp */ = {isa = PBXFileReference; indentWidth = 4; lastKnownFileType = sourcecode.cpp.cpp; path = haiku_pollfs.cpp; sourceTree = "<group>"; tabWidth = 4; usesTabs = 0; };
291
- 14EC13F12B3D5BBE00CF9AD0 /* linux_usbfs.c */ = {isa = PBXFileReference; indentWidth = 4; lastKnownFileType = sourcecode.c.c; path = linux_usbfs.c; sourceTree = "<group>"; tabWidth = 4; usesTabs = 0; };
293
+ 14EC13F12B3D5BBE00CF9AD0 /* linux_usbfs.c */ = {isa = PBXFileReference; indentWidth = 8; lastKnownFileType = sourcecode.c.c; path = linux_usbfs.c; sourceTree = "<group>"; tabWidth = 8; usesTabs = 1; };
292
294
  14EC13F22B3D5BC800CF9AD0 /* windows_common.h */ = {isa = PBXFileReference; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = windows_common.h; sourceTree = "<group>"; tabWidth = 4; usesTabs = 0; };
293
295
  14EC13F32B3D5BC800CF9AD0 /* threads_windows.c */ = {isa = PBXFileReference; indentWidth = 4; lastKnownFileType = sourcecode.c.c; path = threads_windows.c; sourceTree = "<group>"; tabWidth = 4; usesTabs = 0; };
294
296
  14EC13F42B3D5BC800CF9AD0 /* windows_winusb.c */ = {isa = PBXFileReference; indentWidth = 4; lastKnownFileType = sourcecode.c.c; path = windows_winusb.c; sourceTree = "<group>"; tabWidth = 4; usesTabs = 0; };
@@ -297,10 +299,10 @@
297
299
  14EC13F72B3D5BC800CF9AD0 /* threads_windows.h */ = {isa = PBXFileReference; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = threads_windows.h; sourceTree = "<group>"; tabWidth = 4; usesTabs = 0; };
298
300
  14EC13F82B3D5BC800CF9AD0 /* windows_usbdk.h */ = {isa = PBXFileReference; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = windows_usbdk.h; sourceTree = "<group>"; tabWidth = 4; usesTabs = 0; };
299
301
  14EC13F92B3D5BC800CF9AD0 /* windows_usbdk.c */ = {isa = PBXFileReference; indentWidth = 4; lastKnownFileType = sourcecode.c.c; path = windows_usbdk.c; sourceTree = "<group>"; tabWidth = 4; usesTabs = 0; };
300
- 1472E1592B43D66B00850BA3 /* init_context.c */ = {isa = PBXFileReference; indentWidth = 4; lastKnownFileType = sourcecode.c.c; path = init_context.c; sourceTree = "<group>"; tabWidth = 4; usesTabs = 0; };
302
+ 1472E1592B43D66B00850BA3 /* init_context.c */ = {isa = PBXFileReference; indentWidth = 2; lastKnownFileType = sourcecode.c.c; path = init_context.c; sourceTree = "<group>"; tabWidth = 2; usesTabs = 0; };
301
303
  1472E15A2B43D68600850BA3 /* stress_mt.c */ = {isa = PBXFileReference; indentWidth = 4; lastKnownFileType = sourcecode.c.c; path = stress_mt.c; sourceTree = "<group>"; tabWidth = 4; usesTabs = 0; };
302
- 1472E15D2B43D68600850BA3 /* macos.c */ = {isa = PBXFileReference; indentWidth = 4; lastKnownFileType = sourcecode.c.c; path = macos.c; sourceTree = "<group>"; tabWidth = 4; usesTabs = 0; };
303
- 1472E15F2B43D68600850BA3 /* set_option.c */ = {isa = PBXFileReference; indentWidth = 4; lastKnownFileType = sourcecode.c.c; path = set_option.c; sourceTree = "<group>"; tabWidth = 4; usesTabs = 0; };
304
+ 1472E15D2B43D68600850BA3 /* macos.c */ = {isa = PBXFileReference; indentWidth = 2; lastKnownFileType = sourcecode.c.c; path = macos.c; sourceTree = "<group>"; tabWidth = 2; usesTabs = 0; };
305
+ 1472E15F2B43D68600850BA3 /* set_option.c */ = {isa = PBXFileReference; indentWidth = 2; lastKnownFileType = sourcecode.c.c; path = set_option.c; sourceTree = "<group>"; tabWidth = 2; usesTabs = 0; };
304
306
  1472E1602B43D69800850BA3 /* umockdev.c */ = {isa = PBXFileReference; indentWidth = 4; lastKnownFileType = sourcecode.c.c; path = umockdev.c; sourceTree = "<group>"; tabWidth = 4; usesTabs = 0; };
305
307
  2018D95E24E453BA001589B2 /* events_posix.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = events_posix.c; sourceTree = "<group>"; };
306
308
  2018D96024E453D0001589B2 /* events_posix.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = events_posix.h; sourceTree = "<group>"; };
@@ -493,6 +495,8 @@
493
495
  14EC13F72B3D5BC800CF9AD0 /* threads_windows.h */,
494
496
  14EC13F52B3D5BC800CF9AD0 /* windows_common.c */,
495
497
  14EC13F22B3D5BC800CF9AD0 /* windows_common.h */,
498
+ 145F5D8D2E60B46B004ABA5D /* windows_hotplug.h */,
499
+ 145F5D8E2E60B46B004ABA5D /* windows_hotplug.c */,
496
500
  14EC13F92B3D5BC800CF9AD0 /* windows_usbdk.c */,
497
501
  14EC13F82B3D5BC800CF9AD0 /* windows_usbdk.h */,
498
502
  14EC13F42B3D5BC800CF9AD0 /* windows_winusb.c */,
@@ -210,6 +210,7 @@ static void print_device(libusb_device *dev, libusb_device_handle *handle)
210
210
  case LIBUSB_SPEED_HIGH: speed = "480M"; break;
211
211
  case LIBUSB_SPEED_SUPER: speed = "5G"; break;
212
212
  case LIBUSB_SPEED_SUPER_PLUS: speed = "10G"; break;
213
+ case LIBUSB_SPEED_SUPER_PLUS_X2: speed = "20G"; break;
213
214
  default: speed = "Unknown";
214
215
  }
215
216
 
@@ -31,9 +31,9 @@ dnl Library versioning
31
31
  dnl These numbers should be tweaked on every release. Read carefully:
32
32
  dnl http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
33
33
  dnl http://sourceware.org/autobook/autobook/autobook_91.html
34
- lt_current=4
34
+ lt_current=6
35
35
  lt_revision=0
36
- lt_age=4
36
+ lt_age=6
37
37
  LT_LDFLAGS="-version-info ${lt_current}:${lt_revision}:${lt_age} -no-undefined"
38
38
 
39
39
  m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
@@ -397,10 +397,20 @@ AM_CONDITIONAL([OS_EMSCRIPTEN], [test "x$backend" = xemscripten])
397
397
  AM_CONDITIONAL([PLATFORM_POSIX], [test "x$platform" = xposix])
398
398
  AM_CONDITIONAL([PLATFORM_WINDOWS], [test "x$platform" = xwindows])
399
399
  AM_CONDITIONAL([USE_UDEV], [test "x$use_udev" = xyes])
400
+ AM_CONDITIONAL([LIBUSB_WINDOWS_HOTPLUG], [test "x$enable_windows_hotplug" = xyes])
400
401
 
401
402
  dnl The -Wcast-function-type warning causes a flurry of warnings when compiling
402
403
  dnl Windows with GCC 8 or later because of dynamically loaded functions
403
404
  if test "x$backend" = xwindows; then
405
+ AC_ARG_ENABLE([windows-hotplug],
406
+ AS_HELP_STRING([--enable-windows-hotplug], [Enable Windows hotplug support]),
407
+ [enable_windows_hotplug="$enableval"],
408
+ [enable_windows_hotplug=no])
409
+
410
+ if test "x$enable_windows_hotplug" = "xyes"; then
411
+ AC_DEFINE([LIBUSB_WINDOWS_HOTPLUG], [1], [Define to enable Windows hotplug support])
412
+ fi
413
+
404
414
  saved_CFLAGS="${CFLAGS}"
405
415
  CFLAGS="-Werror -Wcast-function-type"
406
416
  AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [])],
@@ -388,7 +388,7 @@ static int save_to_file(unsigned char *data)
388
388
  return -1;
389
389
 
390
390
  fputs("P5 384 289 255 ", f);
391
- (void)fwrite(data + 64, 1, 384*289, f);
391
+ (void)fwrite(data + 64, 1, 384L*289L, f);
392
392
  fclose(f);
393
393
  printf("saved image to %s\n", filename);
394
394
  return 0;
@@ -815,7 +815,12 @@ int ezusb_load_ram(libusb_device_handle *device, const char *path, int fx_type,
815
815
  }
816
816
 
817
817
  /* at least write the interrupt vectors (at 0x0000) for reset! */
818
- rewind(image);
818
+ status = fseek(image, 0L, SEEK_SET);
819
+ if (status < 0) {
820
+ logerror("unable to rewind file %s\n", path);
821
+ ret = status;
822
+ goto exit;
823
+ }
819
824
  if (verbose)
820
825
  logerror("2nd stage: write on-chip memory\n");
821
826
  status = parse_ihex(image, &ctx, is_external, ram_poke);
@@ -38,7 +38,9 @@
38
38
  #include <syslog.h>
39
39
  static bool dosyslog = false;
40
40
  #include <strings.h>
41
- #define _stricmp strcasecmp
41
+ #define libusb_strcasecmp strcasecmp
42
+ #else
43
+ #define libusb_strcasecmp _stricmp
42
44
  #endif
43
45
 
44
46
  #ifndef FXLOAD_VERSION
@@ -263,13 +265,13 @@ int main(int argc, char*argv[])
263
265
  for (i=0; i<ARRAYSIZE(path); i++) {
264
266
  if (path[i] != NULL) {
265
267
  ext = path[i] + strlen(path[i]) - 4;
266
- if ((_stricmp(ext, ".hex") == 0) || (strcmp(ext, ".ihx") == 0))
268
+ if ((libusb_strcasecmp(ext, ".hex") == 0) || (libusb_strcasecmp(ext, ".ihx") == 0))
267
269
  img_type[i] = IMG_TYPE_HEX;
268
- else if (_stricmp(ext, ".iic") == 0)
270
+ else if (libusb_strcasecmp(ext, ".iic") == 0)
269
271
  img_type[i] = IMG_TYPE_IIC;
270
- else if (_stricmp(ext, ".bix") == 0)
272
+ else if (libusb_strcasecmp(ext, ".bix") == 0)
271
273
  img_type[i] = IMG_TYPE_BIX;
272
- else if (_stricmp(ext, ".img") == 0)
274
+ else if (libusb_strcasecmp(ext, ".img") == 0)
273
275
  img_type[i] = IMG_TYPE_IMG;
274
276
  else {
275
277
  logerror("%s is not a recognized image type\n", path[i]);
@@ -23,12 +23,14 @@
23
23
 
24
24
  #include "libusb.h"
25
25
 
26
- int done = 0;
26
+ int done_attach = 0;
27
+ int done_detach = 0;
27
28
  libusb_device_handle *handle = NULL;
28
29
 
29
30
  static int LIBUSB_CALL hotplug_callback(libusb_context *ctx, libusb_device *dev, libusb_hotplug_event event, void *user_data)
30
31
  {
31
32
  struct libusb_device_descriptor desc;
33
+ libusb_device_handle *new_handle;
32
34
  int rc;
33
35
 
34
36
  (void)ctx;
@@ -45,18 +47,23 @@ static int LIBUSB_CALL hotplug_callback(libusb_context *ctx, libusb_device *dev,
45
47
  libusb_strerror((enum libusb_error)rc));
46
48
  }
47
49
 
48
- if (handle) {
49
- libusb_close (handle);
50
- handle = NULL;
51
- }
52
-
53
- rc = libusb_open (dev, &handle);
54
- if (LIBUSB_SUCCESS != rc) {
50
+ rc = libusb_open (dev, &new_handle);
51
+ if (LIBUSB_SUCCESS == rc) {
52
+ if (handle) {
53
+ libusb_close (handle);
54
+ }
55
+ handle = new_handle;
56
+ } else if (LIBUSB_ERROR_ACCESS != rc
57
+ #if defined(PLATFORM_WINDOWS)
58
+ && LIBUSB_ERROR_NOT_SUPPORTED != rc
59
+ && LIBUSB_ERROR_NOT_FOUND != rc
60
+ #endif
61
+ ) {
55
62
  fprintf (stderr, "No access to device: %s\n",
56
63
  libusb_strerror((enum libusb_error)rc));
57
64
  }
58
65
 
59
- done++;
66
+ done_attach++;
60
67
 
61
68
  return 0;
62
69
  }
@@ -85,7 +92,7 @@ static int LIBUSB_CALL hotplug_callback_detach(libusb_context *ctx, libusb_devic
85
92
  handle = NULL;
86
93
  }
87
94
 
88
- done++;
95
+ done_detach++;
89
96
 
90
97
  return 0;
91
98
  }
@@ -130,7 +137,7 @@ int main(int argc, char *argv[])
130
137
  return EXIT_FAILURE;
131
138
  }
132
139
 
133
- while (done < 2) {
140
+ while (done_detach < done_attach || done_attach == 0) {
134
141
  rc = libusb_handle_events (NULL);
135
142
  if (LIBUSB_SUCCESS != rc)
136
143
  printf ("libusb_handle_events() failed: %s\n",
@@ -138,6 +145,7 @@ int main(int argc, char *argv[])
138
145
  }
139
146
 
140
147
  if (handle) {
148
+ printf ("Warning: Closing left-over open handle\n");
141
149
  libusb_close (handle);
142
150
  }
143
151
 
@@ -18,14 +18,16 @@
18
18
  */
19
19
 
20
20
  #include <stdio.h>
21
+ #include <string.h>
21
22
 
22
23
  #include "libusb.h"
23
24
 
24
- static void print_devs(libusb_device **devs)
25
+ static void print_devs(libusb_device **devs, int verbose)
25
26
  {
26
27
  libusb_device *dev;
27
28
  int i = 0, j = 0;
28
29
  uint8_t path[8];
30
+ char string_buffer[LIBUSB_DEVICE_STRING_BYTES_MAX];
29
31
 
30
32
  while ((dev = devs[i++]) != NULL) {
31
33
  struct libusb_device_descriptor desc;
@@ -45,16 +47,52 @@ static void print_devs(libusb_device **devs)
45
47
  for (j = 1; j < r; j++)
46
48
  printf(".%d", path[j]);
47
49
  }
50
+
51
+ if (verbose) {
52
+ r = libusb_get_device_string(dev, LIBUSB_DEVICE_STRING_MANUFACTURER,
53
+ string_buffer, sizeof(string_buffer));
54
+ if (r >= 0) {
55
+ printf("\n manufacturer = %s", string_buffer);
56
+ }
57
+
58
+ r = libusb_get_device_string(dev, LIBUSB_DEVICE_STRING_PRODUCT,
59
+ string_buffer, sizeof(string_buffer));
60
+ if (r >= 0) {
61
+ printf("\n product = %s", string_buffer);
62
+ }
63
+
64
+ r = libusb_get_device_string(dev, LIBUSB_DEVICE_STRING_SERIAL_NUMBER,
65
+ string_buffer, sizeof(string_buffer));
66
+ if (r >= 0) {
67
+ printf("\n serial_number = %s", string_buffer);
68
+ }
69
+ }
48
70
  printf("\n");
49
71
  }
50
72
  }
51
73
 
52
- int main(void)
74
+ static int usage(void) {
75
+ printf("usage: listdevs [--verbose]\n");
76
+ return 1;
77
+ }
78
+
79
+ int main(int argc, char *argv[])
53
80
  {
81
+ int verbose = 0;
54
82
  libusb_device **devs;
55
83
  int r;
56
84
  ssize_t cnt;
57
85
 
86
+ --argc; ++argv; /* consume argument */
87
+ while (argc) {
88
+ if ((0 == strcmp("-v", argv[0])) || (0 == strcmp("--verbose", argv[0]))) {
89
+ ++verbose;
90
+ --argc; ++argv; /* consume argument */
91
+ } else {
92
+ return usage();
93
+ }
94
+ }
95
+
58
96
  r = libusb_init_context(/*ctx=*/NULL, /*options=*/NULL, /*num_options=*/0);
59
97
  if (r < 0)
60
98
  return r;
@@ -65,7 +103,7 @@ int main(void)
65
103
  return (int) cnt;
66
104
  }
67
105
 
68
- print_devs(devs);
106
+ print_devs(devs, verbose);
69
107
  libusb_free_device_list(devs, 1);
70
108
 
71
109
  libusb_exit(NULL);
@@ -174,6 +174,7 @@ static void print_device(libusb_device *dev, libusb_device_handle *handle)
174
174
  case LIBUSB_SPEED_HIGH: speed = "480M"; break;
175
175
  case LIBUSB_SPEED_SUPER: speed = "5G"; break;
176
176
  case LIBUSB_SPEED_SUPER_PLUS: speed = "10G"; break;
177
+ case LIBUSB_SPEED_SUPER_PLUS_X2: speed = "20G"; break;
177
178
  default: speed = "Unknown";
178
179
  }
179
180