- don't try to fetch from dev/apm if the fd isn't available yet (to be
discussed with upstream)
- use var/db/upower to store history files
Fixes graphs in gnome-power-statistics...
UPower is an abstraction for enumerating power devices, listening to
device events and querying history and statistics. Any application or
service on the system can access the org.freedesktop.UPower service
via the DBUS system message bus.
OpenBSD specific backend written by yours truly with help from upstream
developer. So far, battery levels and ac status works, using either apm
or acpibat/acpiac if available.
As a sidenote, if udev, udisks and friends were designed with the same
clear separation between os-specific and generic parts, porting to
'alternative OSes' would be much simpler. UPower is a nice example of
'how to design a portable service'.
with a patch for glib version check, tweaks and ok ajacoutot@