Good news!  I figured out that I can simply use
udev_device_get_is_initialized().  It does exactly what I want.

I tried using a udev_monitor but it doesn't seem to report
pre-existing devices (devices that were already connected to the
system).  It just reports changes.

Thanks for the help.

--David

On Mon, Sep 14, 2015 at 12:22 PM, David Grayson <davidegray...@gmail.com> wrote:
> On Mon, Sep 14, 2015 at 12:04 PM, Greg KH <gre...@linuxfoundation.org> wrote:
>> Start your program to listen and handle all devices that way through
>> udev iterators, that way will always work (for existing and new
>> devices).
>
> If by "existing devices", you mean devices that were connected to the
> computer before my program started, that sounds great.  I will look
> into that and see if I can make that work.  If my understanding of
> what you said is correct, there would be no constraint that I have to
> start monitoring before the device is connected.  I'll look into using
> udev to start a temporary udev_monitor and getting all the
> currently-connected USB devices from that.  Hopefully all those
> devices will have their rules fully applied.
>
> --David
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to