opnsense-src/lib/libusb
Baptiste Daroussin 58734b1879 libusb: fix hotplug sigbus
When a hotplug callback has been registered, and the program using
libusb is calling libusb_exit then the thread handler is set to
NO_THREAD which result in the variable controlling the loop the be set
to 0, it does a last pass through device available without having done
a scan, which result in a sigbus after it tried to unregister all the
devices.

directly break the loop instead and cleanup the list of devices

this fixes the tests with LGPLed libusb's hotplugtest program

MFC After:	3 days
Reviewed by:	kevans
Differential Revision:	https://reviews.freebsd.org/D48298

(cherry picked from commit ba5834b8e11fd002a663d083a464e397e76cb3a9)
2025-01-07 10:02:57 +01:00
..
libusb-0.1.pc.in Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
libusb-1.0.pc.in libusb: claim to be version 1.0.16 2024-08-06 17:25:21 -04:00
libusb-2.0.pc.in Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
libusb.3 manuals: Fix dates 2024-11-04 12:16:22 -04:00
libusb.h Remove $FreeBSD$: one-line .c comment pattern 2023-08-16 11:54:29 -06:00
libusb01.c Remove $FreeBSD$: one-line .c comment pattern 2023-08-16 11:54:29 -06:00
libusb10.c Remove $FreeBSD$: one-line .c comment pattern 2023-08-16 11:54:29 -06:00
libusb10.h Remove $FreeBSD$: one-line .c comment pattern 2023-08-16 11:54:29 -06:00
libusb10_desc.c Remove $FreeBSD$: one-line .c comment pattern 2023-08-16 11:54:29 -06:00
libusb10_hotplug.c libusb: fix hotplug sigbus 2025-01-07 10:02:57 +01:00
libusb10_io.c Remove $FreeBSD$: one-line .c comment pattern 2023-08-16 11:54:29 -06:00
libusb20.3 Remove $FreeBSD$: two-line nroff pattern 2023-08-16 11:55:10 -06:00
libusb20.c Remove $FreeBSD$: one-line .c comment pattern 2023-08-16 11:54:29 -06:00
libusb20.h Remove $FreeBSD$: one-line .c comment pattern 2023-08-16 11:54:29 -06:00
libusb20_desc.c Remove $FreeBSD$: one-line .c comment pattern 2023-08-16 11:54:29 -06:00
libusb20_desc.h Remove $FreeBSD$: one-line .c comment pattern 2023-08-16 11:54:29 -06:00
libusb20_int.h Remove $FreeBSD$: one-line .c comment pattern 2023-08-16 11:54:29 -06:00
libusb20_ugen20.c Remove $FreeBSD$: one-line .c comment pattern 2023-08-16 11:54:29 -06:00
libusb_global_linux.h Remove $FreeBSD$: one-line .c comment pattern 2023-08-16 11:54:29 -06:00
Makefile Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
Makefile.depend Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
usb.h Remove $FreeBSD$: one-line .c comment pattern 2023-08-16 11:54:29 -06:00