madhav chauhan | 18 Jun 2012 20:19
Picon

Getting Hot Plug/Unplug Notification

Hi All,
I want to get hot plug event  in my  C code whenever USB device is
plugged in/out.
How can i get VID/PID of USB device plugged out/in??
Can somebody help me for the same, any  sample code available??

Regards,
Madhav
--
To unsubscribe from this list: send the line "unsubscribe linux-hotplug" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Greg KH | 18 Jun 2012 20:23
Favicon
Gravatar

Re: Getting Hot Plug/Unplug Notification

On Mon, Jun 18, 2012 at 11:49:32PM +0530, madhav chauhan wrote:
> Hi All,
> I want to get hot plug event  in my  C code whenever USB device is
> plugged in/out.

Link to libudev for this.

> How can i get VID/PID of USB device plugged out/in??

Yes.

> Can somebody help me for the same, any  sample code available??

Look at the libudev examples, they should help you out.

Hope this helps,

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-hotplug" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Gmane