mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-01-29 01:17:04 +00:00
Let epoll_wait() wake up healthd if a receive buffer overflow has happened. If a receive buffer overflow happened, this indicates that one or more power supply uevent messages have been discarded. Handle this by updating the battery statistics. This is the approach recommended in the netlink(7) man page. From that manual page: "However, reliable transmissions from kernel to user are impossible in any case. The kernel can't send a netlink message if the socket buffer is full: the message will be dropped and the kernel and the user-space process will no longer have the same view of kernel state. It is up to the application to detect when this happens (via the ENOBUFS error returned by recvmsg(2)) and resynchronize." Bug: 362986353 Change-Id: I0c89907eaa014f9e2859a73b29239e82f066f03f Signed-off-by: Bart Van Assche <bvanassche@google.com>