Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 01 Mar 2020 22:54:24 -0500
From:      "Farhan Khan" <farhan@farhan.codes>
To:        "Hans Petter Selasky" <hps@selasky.org>, freebsd-usb@freebsd.org
Subject:   Re: Detecting if USB device pulled from machine
Message-ID:  <0da4a58c-fcda-4755-b129-5c2da925da9e@www.fastmail.com>
In-Reply-To: <c46dbb00-44bb-6532-c430-6e6add4d8ed4@selasky.org>
References:  <52e73cc5-5881-40bd-99bf-5b69f5cbcc4f@www.fastmail.com> <c46dbb00-44bb-6532-c430-6e6add4d8ed4@selasky.org>

next in thread | previous in thread | raw e-mail | index | archive | help
I think I figured it out. There is no specific mechanism, its just that the detach() function updates that value. This was a misunderstanding on my part. Thank you!

On Sun, Mar 1, 2020, at 7:49 AM, Hans Petter Selasky wrote:
> 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
> 

--
Farhan Khan
PGP Fingerprint: 1312 89CE 663E 1EB2 179C 1C83 C41D 2281 F8DA C0DE




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?0da4a58c-fcda-4755-b129-5c2da925da9e>