Detecting if USB device pulled from machine

Hans Petter Selasky hps at selasky.org
Sun Mar 1 12:49:42 UTC 2020


On 2020-03-01 08:50, Farhan Khan wrote:
> Hi all,
> 
> Quick question: I am reviewing some USB code between FreeBSD and OpenBSD. In OpenBSD, there is a function called usbd_is_dying (sys/dev/usb/usbdi.c) which appears to check if a device was removed from the system. Is there an equivalent in FreeBSD?
> 
> Thanks!

Hi,

Check how "libusb20_dev_check_connected()" works in libusb.

--HPS


More information about the freebsd-usb mailing list