I have written battery driver and that driver sends an uevent
when a power supply is changed, i.e. from AC to battery
When I run udevadm monitor
I see an KERNEL and UDEVCHANGE
events from power_supply
subsystem upon removing AC supply.
My requirement is to notify the user application when there is an CHANGE
event from power_supply
subsystem. I do not want to poll for kernel message or netlink socket from user application.
Is it possible for me to register/listen for this particular
uevent
from user application and gets something like callback function whenan event occurs?