Device change notification on Linux
Hi all,
On Windows, whenever you plug in or unplug a device such as USB external hard disk or game controller, the application is sent a WM_DEVICECHANGE message. What is the equivalent approach to detecting device changes on Linux? I don't need specific details of what changes has occurred, all I want is some notification that something has been plugged in or unplugged. Thanks in advance. |
Quote:
|
Quote:
However, I notice that udev-notify uses udev to monitor device changes, and I also see that there is a libudev library which looks promising. Is libudev the best (i.e. most efficient and most widely supported) way to check for device changes? |
I linked udev-notify because it might help you start from somewhere. I was aware your question was programming related but wasn't really sure, hence I dropped that link and know you'd pick it up from where it might lead you (to where its getting its info, from udev). Yes and it's (udev-notify) python, but it (udev) can be for any capable language.
Quote:
|
Quote:
Quote:
|
All times are GMT -5. The time now is 06:36 AM. |