Re: How to know when udev rules are done being applied to a new USB device

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <davidegrayson@xxxxxxxxx> wrote:
> On Mon, Sep 14, 2015 at 12:04 PM, Greg KH <gregkh@xxxxxxxxxxxxxxxxxxx> 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 majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux